import org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory;
import org.argeo.api.NodeConstants;
import org.argeo.cms.internal.jcr.RepoConf;
import org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory;
import org.argeo.api.NodeConstants;
import org.argeo.cms.internal.jcr.RepoConf;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.InvalidSyntaxException;
Collection<ServiceReference<Repository>> srs = bundleContext.getServiceReferences(Repository.class,
"(" + NodeConstants.CN + "=" + alias + ")");
if (srs.size() == 0)
Collection<ServiceReference<Repository>> srs = bundleContext.getServiceReferences(Repository.class,
"(" + NodeConstants.CN + "=" + alias + ")");
if (srs.size() == 0)
srs.size() + " repositories with alias " + alias + " found in OSGi registry");
return bundleContext.getService(srs.iterator().next());
} catch (InvalidSyntaxException e) {
srs.size() + " repositories with alias " + alias + " found in OSGi registry");
return bundleContext.getService(srs.iterator().next());
} catch (InvalidSyntaxException e) {
params.put(KernelConstants.JACKRABBIT_REMOTE_DEFAULT_WORKSPACE, defaultWorkspace);
Repository repository = new Jcr2davRepositoryFactory().getRepository(params);
if (repository == null)
params.put(KernelConstants.JACKRABBIT_REMOTE_DEFAULT_WORKSPACE, defaultWorkspace);
Repository repository = new Jcr2davRepositoryFactory().getRepository(params);
if (repository == null)
alias = alias.substring(0, alias.length() - 1);
return alias;
} catch (URISyntaxException e) {
alias = alias.substring(0, alias.length() - 1);
return alias;
} catch (URISyntaxException e) {