- Hashtable<String, Object> properties = new Hashtable<>();
- properties.put(ArgeoJcrConstants.JCR_REPOSITORY_ALIAS, name);
- properties.put(NodeConstants.CN, name);
- if (name.equals(ArgeoJcrConstants.ALIAS_NODE))
- properties.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE);
- bc.registerService(Repository.class, adminSession.getRepository(), properties);
- if (log.isDebugEnabled())
- log.debug("Published data model " + name);
+ if (KernelUtils.asBoolean((String) attrs.get(DataModelNamespace.ABSTRACT)))
+ return;
+ // Non abstract
+ boolean isStandalone = deployConfig.isStandalone(name);
+ boolean publishLocalRepo;
+ if (isStandalone && name.equals(cn))// includes the node itself
+ publishLocalRepo = true;
+ else if (!isStandalone && cn.equals(NodeConstants.NODE))
+ publishLocalRepo = true;
+ else
+ publishLocalRepo = false;
+
+ if (publishLocalRepo) {
+ Hashtable<String, Object> properties = new Hashtable<>();
+ // properties.put(LEGACY_JCR_REPOSITORY_ALIAS, name);
+ properties.put(NodeConstants.CN, name);
+ if (name.equals(NodeConstants.NODE))
+ properties.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE);
+ LocalRepository localRepository = new LocalRepository(adminSession.getRepository(), capability);
+ bc.registerService(Repository.class, localRepository, properties);
+ if (log.isDebugEnabled())
+ log.debug("Published data model " + name);
+ }