<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="argeo.product.knowledge.structureLayer">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="init" deactivate="destroy" name="argeo.product.knowledge.structureLayer">
<implementation class="org.argeo.app.swt.ux.DefaultEditionLayer"/>
<service>
<provide interface="org.argeo.app.swt.ux.SwtAppLayer"/>
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="argeo.product.knowledge.termsLayer">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="init" deactivate="destroy" name="argeo.product.knowledge.termsLayer">
<implementation class="org.argeo.app.swt.ux.DefaultEditionLayer"/>
<service>
<provide interface="org.argeo.app.swt.ux.SwtAppLayer"/>
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import org.argeo.api.acr.Content;
import org.argeo.app.ux.SuiteIcon;
public void init(BundleContext bundleContext, Map<String, Object> properties) {
String pid = (String) properties.get(Constants.SERVICE_PID);
id = pid;
+ Objects.requireNonNull(id, "Layer id must be set.");
weights = LangUtils.toStringList(properties.get(Property.weights.name()));
startMaximized = properties.containsKey(Property.startMaximized.name())
}
public void addLayer(String id, SwtAppLayer layer) {
+ if (!id.equals(layer.getId())) {
+ log.error("Layer id as key '" + id + "' is not consistent with layer id '" + layer.getId()
+ + "', ignoring...");
+ return;
+ }
layers.put(id, layer);
}
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="Content Layer">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="init" deactivate="destroy" name="Content Layer">
<implementation class="org.argeo.app.swt.ux.DefaultEditionLayer"/>
<service>
<provide interface="org.argeo.app.swt.ux.SwtAppLayer"/>
<properties entry="config/leadPane.properties"/>
<property name="defaultLayers" type="String">argeo.suite.ui.dashboardLayer
argeo.library.ui.contentLayer
+argeo.product.knowledge.structureLayer
argeo.people.ui.peopleLayer
argeo.geo.ui.mapLayer
</property>