Can set bundle context in a RAP E4 app.
[lgpl/argeo-commons.git] / org.argeo.cms.e4.rap / src / org / argeo / cms / e4 / rap / AbstractRapE4App.java
index 8bf16a265c6665a3b1aaa22b613b654a306ae4c6..8c43a8089fcbabcb7a136ddab53e68ee3ff32742 100644 (file)
@@ -21,7 +21,7 @@ public abstract class AbstractRapE4App implements ApplicationConfiguration {
        private Map<String, String> baseProperties = new HashMap<String, String>();
 
        private BundleContext bundleContext;
-       private final static String CONTEXT_NAME_PROPERTY = "contextName";
+       public final static String CONTEXT_NAME_PROPERTY = "contextName";
        private String contextName;
 
        /**
@@ -105,10 +105,18 @@ public abstract class AbstractRapE4App implements ApplicationConfiguration {
                return bundleContext;
        }
 
-       protected String getContextName() {
+       protected void setBundleContext(BundleContext bundleContext) {
+               this.bundleContext = bundleContext;
+       }
+
+       public String getContextName() {
                return contextName;
        }
 
+       public void setContextName(String contextName) {
+               this.contextName = contextName;
+       }
+
        public void init(BundleContext bundleContext, Map<String, Object> properties) {
                this.bundleContext = bundleContext;
                for (String key : properties.keySet()) {