import org.argeo.cms.CmsException;
import org.argeo.cms.KernelHeader;
import org.argeo.cms.internal.auth.GrantedAuthorityPrincipal;
-import org.osgi.framework.BundleContext;
import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.core.Authentication;
return asDictionary(props);
}
- static File getOsgiInstanceDir(BundleContext bundleContext) {
- return new File(bundleContext.getProperty(OSGI_INSTANCE_AREA)
- .substring("file:".length())).getAbsoluteFile();
+ static File getOsgiInstanceDir() {
+ return new File(Activator.getBundleContext()
+ .getProperty(OSGI_INSTANCE_AREA).substring("file:".length()))
+ .getAbsoluteFile();
+ }
+
+ static String getFrameworkProp(String key, String def) {
+ String value = Activator.getBundleContext().getProperty(key);
+ if (value == null)
+ return def;
+ return value;
+ }
+
+ static String getFrameworkProp(String key) {
+ return getFrameworkProp(key, null);
}
// Security