public Object call() { return pathFactory.getRootPath(); }}, "getRootPath()", new Object[]{}); }
public Object call() { return pathFactory.getRootPath(); }}, "getRootPath()", new Object[]{}); }
static PathConstraint create(String pathString) { // constraint format: String representation of an absolute or relative // Path object with optionally having a trailing wild card if (WILDCARD.equals(pathString)) { return new PathConstraint(pathString, PATH_FACTORY.getRootPath(), true); } else { boolean deep = pathString.endsWith(WILDCARD); Path path; if (deep) { path = PATH_FACTORY.create(pathString.substring(0, pathString.length() - WILDCARD.length())); } else { path = PATH_FACTORY.create(pathString); } return new PathConstraint(pathString, path, deep); } }
private List<PathMap.Element<LRUEntry>> getCachedPaths(NodeId id) { // JCR-2720: Handle the root path as a special case if (rootNodeId.equals(id)) { return Collections.singletonList(pathCache.map( PathFactoryImpl.getInstance().getRootPath(), true)); } LRUEntry entry = (LRUEntry) idCache.get(id); if (entry != null) { return Arrays.asList(entry.getElements()); } else { return Collections.emptyList(); } }
private List<PathMap.Element<LRUEntry>> getCachedPaths(NodeId id) { // JCR-2720: Handle the root path as a special case if (rootNodeId.equals(id)) { return Collections.singletonList(pathCache.map( PathFactoryImpl.getInstance().getRootPath(), true)); } LRUEntry entry = (LRUEntry) idCache.get(id); if (entry != null) { return Arrays.asList(entry.getElements()); } else { return Collections.emptyList(); } }
/** * Return the path of this element. * @return path * @throws MalformedPathException if building the path fails */ public Path getPath() throws MalformedPathException { if (parent == null) { return PATH_FACTORY.getRootPath(); } PathBuilder builder = new PathBuilder(); getPath(builder); return builder.getPath(); }
/** * Return the path of this element. * @return path * @throws MalformedPathException if building the path fails */ public Path getPath() throws MalformedPathException { if (parent == null) { return PATH_FACTORY.getRootPath(); } PathBuilder builder = new PathBuilder(); getPath(builder); return builder.getPath(); }
/** * Return the path of this element. * @return path * @throws MalformedPathException if building the path fails */ public Path getPath() throws MalformedPathException { if (parent == null) { return PATH_FACTORY.getRootPath(); } PathBuilder builder = new PathBuilder(); getPath(builder); return builder.getPath(); }
public NodeState createRootState(NodeEntry entry) throws ItemNotFoundException, RepositoryException { IdFactory idFactory = service.getIdFactory(); PathFactory pf = service.getPathFactory(); return createNodeState(idFactory.createNodeId((String) null, pf.getRootPath()), entry); }
public QNodeDefinition getRootNodeDefinition() throws RepositoryException { if (rootNodeDefinition == null) { IdFactory idFactory = service.getIdFactory(); PathFactory pf = service.getPathFactory(); rootNodeDefinition = service.getNodeDefinition( sessionInfo, idFactory.createNodeId((String) null, pf.getRootPath())); } return rootNodeDefinition; }
public NodeState createRootState(NodeEntry entry) throws ItemNotFoundException, RepositoryException { IdFactory idFactory = service.getIdFactory(); PathFactory pf = service.getPathFactory(); return createNodeState(idFactory.createNodeId((String) null, pf.getRootPath()), entry); }
public QNodeDefinition getRootNodeDefinition() throws RepositoryException { if (rootNodeDefinition == null) { IdFactory idFactory = service.getIdFactory(); PathFactory pf = service.getPathFactory(); rootNodeDefinition = service.getNodeDefinition( sessionInfo, idFactory.createNodeId((String) null, pf.getRootPath())); } return rootNodeDefinition; }
/** * @see HierarchyEntryImpl#buildPath(boolean) */ @Override Path buildPath(boolean wspPath) throws RepositoryException { PathFactory pf = getPathFactory(); // shortcut for root state if (parent == null) { return pf.getRootPath(); } // build path otherwise PathBuilder builder = new PathBuilder(pf); buildPath(builder, this, wspPath); return builder.getPath(); }
private NodeId getId(boolean wspId) throws RepositoryException { if (parent == null) { // shortcut for root return getIdFactory().createNodeId((String) null, getPathFactory().getRootPath()); } else if (uniqueID != null) { // shortcut for uniqueID based IDs return getIdFactory().createNodeId(uniqueID); } else { return buildNodeId(this, getPathFactory(), getIdFactory(), wspId); } }
private NodeId getId(boolean wspId) throws RepositoryException { if (parent == null) { // shortcut for root return getIdFactory().createNodeId((String) null, getPathFactory().getRootPath()); } else if (uniqueID != null) { // shortcut for uniqueID based IDs return getIdFactory().createNodeId(uniqueID); } else { return buildNodeId(this, getPathFactory(), getIdFactory(), wspId); } }
protected void setUp() throws Exception { factory = InternalValueFactory.getInstance(); rootPath = PathFactoryImpl.getInstance().getRootPath(); testName = NameFactoryImpl.getInstance().create(Name.NS_JCR_URI, "data"); reference = NodeId.randomId().toString(); }
protected void setUp() throws Exception { factory = InternalValueFactory.getInstance(); rootPath = PathFactoryImpl.getInstance().getRootPath(); testName = NameFactoryImpl.getInstance().create(Name.NS_JCR_URI, "data"); reference = NodeId.randomId().toString(); }
protected void setUp() throws Exception { super.setUp(); RepositoryService service = helper.getRepositoryService(); factory = service.getQValueFactory(); rootPath = service.getPathFactory().getRootPath(); testName = service.getNameFactory().create(Name.NS_JCR_URI, "data"); reference = getProperty("reference"); }
protected void setUp() throws Exception { super.setUp(); RepositoryService service = helper.getRepositoryService(); factory = service.getQValueFactory(); rootPath = service.getPathFactory().getRootPath(); testName = service.getNameFactory().create(Name.NS_JCR_URI, "data"); reference = getProperty("reference"); }
public void testIsGrantedPathToNonExistingItem() throws NotExecutableException, RepositoryException { AccessManager acMgr = getAccessManager(superuser); Path p = PathFactoryImpl.getInstance().getRootPath(); // existing node-path assertTrue(acMgr.isGranted(p, Permission.ALL)); // not existing property: assertTrue(acMgr.isGranted(p, NameConstants.JCR_CREATED, Permission.ALL)); // existing property assertTrue(acMgr.isGranted(p, NameConstants.JCR_PRIMARYTYPE, Permission.ALL)); }