+ // 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;
+
+ return publishLocalRepo;
+ }
+
+ private void publishLocalRepo(String dataModelName, Repository repository) {
+ Hashtable<String, Object> properties = new Hashtable<>();
+ // properties.put(LEGACY_JCR_REPOSITORY_ALIAS, name);
+ properties.put(NodeConstants.CN, dataModelName);
+ if (dataModelName.equals(NodeConstants.NODE))
+ properties.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE);
+ LocalRepository localRepository;
+ String[] classes;
+ if (repository instanceof RepositoryImpl) {
+ localRepository = new JackrabbitLocalRepository((RepositoryImpl) repository, dataModelName);
+ classes = new String[] { Repository.class.getName(), LocalRepository.class.getName(),
+ JackrabbitLocalRepository.class.getName() };
+ } else {
+ localRepository = new LocalRepository(repository, dataModelName);
+ classes = new String[] { Repository.class.getName(), LocalRepository.class.getName() };