public SQLSession( org.nuxeo.ecm.core.storage.sql.Session session, Repository repository, String sessionId) { this.session = session; this.repository = repository; Node rootNode = session.getRootNode(); this.sessionId = sessionId; root = newDocument(rootNode); negativeAclAllowed = Framework.isBooleanPropertyTrue(ALLOW_NEGATIVE_ACL_PROPERTY); copyFindFreeNameDisabled = Framework.isBooleanPropertyTrue(COPY_FINDFREENAME_DISABLED_PROP); }
@Override public Document resolvePath(String path) throws NoSuchDocumentException { if (path.endsWith("/") && path.length() > 1) { path = path.substring(0, path.length() - 1); } Node node = session.getNodeByPath(path, session.getRootNode()); Document doc = newDocument(node); if (doc == null) { throw new NoSuchDocumentException(path); } return doc; }