import org.argeo.cms.internal.jcr.RepoConf;
import org.argeo.cms.jcr.internal.osgi.CmsJcrActivator;
import org.osgi.framework.BundleContext;
import org.argeo.cms.internal.jcr.RepoConf;
import org.argeo.cms.jcr.internal.osgi.CmsJcrActivator;
import org.osgi.framework.BundleContext;
* {@link Repository} as OSGi services.
*/
public class NodeRepositoryFactory implements RepositoryFactory {
* {@link Repository} as OSGi services.
*/
public class NodeRepositoryFactory implements RepositoryFactory {
// private final BundleContext bundleContext = FrameworkUtil.getBundle(getClass()).getBundleContext();
// private Resource fileRepositoryConfiguration = new ClassPathResource(
// private final BundleContext bundleContext = FrameworkUtil.getBundle(getClass()).getBundleContext();
// private Resource fileRepositoryConfiguration = new ClassPathResource(
if (bundleContext != null) {
try {
Collection<ServiceReference<Repository>> srs = bundleContext.getServiceReferences(Repository.class,
if (bundleContext != null) {
try {
Collection<ServiceReference<Repository>> srs = bundleContext.getServiceReferences(Repository.class,
else if (parameters.containsKey(KernelConstants.JACKRABBIT_REPOSITORY_URI))
uri = parameters.get(KernelConstants.JACKRABBIT_REPOSITORY_URI).toString();
else if (parameters.containsKey(KernelConstants.JACKRABBIT_REPOSITORY_URI))
uri = parameters.get(KernelConstants.JACKRABBIT_REPOSITORY_URI).toString();
// publish(alias, repository, properties);
// log.info("Registered JCR repository under alias '" + alias + "'
// with properties " + properties);
// publish(alias, repository, properties);
// log.info("Registered JCR repository under alias '" + alias + "'
// with properties " + properties);