import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import org.argeo.jcr.JcrUtils;
import org.argeo.slc.SlcConstants;
import org.argeo.slc.SlcException;
import org.argeo.jcr.JcrUtils;
import org.argeo.slc.SlcConstants;
import org.argeo.slc.SlcException;
import org.argeo.slc.repo.maven.MavenConventionsUtils;
import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.artifact.DefaultArtifact;
/** Default implementation of {@link OsgiFactory}. */
public class OsgiFactoryImpl implements OsgiFactory, SlcNames {
import org.argeo.slc.repo.maven.MavenConventionsUtils;
import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.artifact.DefaultArtifact;
/** Default implementation of {@link OsgiFactory}. */
public class OsgiFactoryImpl implements OsgiFactory, SlcNames {
private Map<String, List<String>> mirrors = new HashMap<String, List<String>>();
private List<String> mavenRepositories = new ArrayList<String>();
private Map<String, List<String>> mirrors = new HashMap<String, List<String>>();
private List<String> mavenRepositories = new ArrayList<String>();
- JcrUtils.addPrivilege(javaSession, "/", SlcConstants.ROLE_SLC, "jcr:all");
- JcrUtils.addPrivilege(distSession, "/", SlcConstants.ROLE_SLC, "jcr:all");
+ JcrUtils.addPrivilege(javaSession, "/", SlcConstants.ROLE_SLC, Privilege.JCR_ALL);
+ JcrUtils.addPrivilege(distSession, "/", SlcConstants.ROLE_SLC, Privilege.JCR_ALL);
} catch (RepositoryException e) {
throw new SlcException("Cannot initialize OSGi Factory " + workspace, e);
} finally {
} catch (RepositoryException e) {
throw new SlcException("Cannot initialize OSGi Factory " + workspace, e);
} finally {