/** * This default implementation first calls {@link #checkSessionInfo(SessionInfo)} * with the <code>sessionInfo</code>, then lazily initializes {@link #rootNodeDefinition} * if <code>nodeId</code> denotes the root node; otherwise throws a * {@link UnsupportedRepositoryOperationException}. */ public QNodeDefinition getNodeDefinition(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException { checkSessionInfo(sessionInfo); if (nodeId.getUniqueID() == null && nodeId.getPath().denotesRoot()) { synchronized (this) { if (rootNodeDefinition == null) { rootNodeDefinition = createRootNodeDefinition(sessionInfo); } return rootNodeDefinition; } } throw new UnsupportedRepositoryOperationException(); }
/** * This default implementation first calls {@link #checkSessionInfo(SessionInfo)} * with the <code>sessionInfo</code>, then lazily initializes {@link #rootNodeDefinition} * if <code>nodeId</code> denotes the root node; otherwise throws a * {@link UnsupportedRepositoryOperationException}. */ public QNodeDefinition getNodeDefinition(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException { checkSessionInfo(sessionInfo); if (nodeId.getUniqueID() == null && nodeId.getPath().denotesRoot()) { synchronized (this) { if (rootNodeDefinition == null) { rootNodeDefinition = createRootNodeDefinition(sessionInfo); } return rootNodeDefinition; } } throw new UnsupportedRepositoryOperationException(); }