/** * Returns the UUID of this node. * <p> * The default implementation checks if this node is referenceable (i.e. of * type <code>mix:referenceable</code>) and returns the contents of the * <code>jcr:uuid</code> property if it is. * * @return node UUID * @throws UnsupportedRepositoryOperationException * if this node is not referenceable * @throws RepositoryException if an error occurs */ public String getUUID() throws UnsupportedRepositoryOperationException, RepositoryException { if (isNodeType(getName("mix:referenceable"))) { return getProperty(getName("jcr:uuid")).getString(); } else { throw new UnsupportedRepositoryOperationException( "This node is not referenceable: " + getPath()); } }
/** * Returns the UUID of this node. * <p> * The default implementation checks if this node is referenceable (i.e. of * type <code>mix:referenceable</code>) and returns the contents of the * <code>jcr:uuid</code> property if it is. * * @return node UUID * @throws UnsupportedRepositoryOperationException * if this node is not referenceable * @throws RepositoryException if an error occurs */ public String getUUID() throws UnsupportedRepositoryOperationException, RepositoryException { if (isNodeType(getName("mix:referenceable"))) { return getProperty(getName("jcr:uuid")).getString(); } else { throw new UnsupportedRepositoryOperationException( "This node is not referenceable: " + getPath()); } }
/** * Returns the UUID of this node. * <p> * The default implementation checks if this node is referenceable (i.e. of * type <code>mix:referenceable</code>) and returns the contents of the * <code>jcr:uuid</code> property if it is. * * @return node UUID * @throws UnsupportedRepositoryOperationException * if this node is not referenceable * @throws RepositoryException if an error occurs */ public String getUUID() throws UnsupportedRepositoryOperationException, RepositoryException { if (isNodeType(getName("mix:referenceable"))) { return getProperty(getName("jcr:uuid")).getString(); } else { throw new UnsupportedRepositoryOperationException( "This node is not referenceable: " + getPath()); } }
/** * Returns the UUID of this node. * <p> * The default implementation checks if this node is referenceable (i.e. of * type <code>mix:referenceable</code>) and returns the contents of the * <code>jcr:uuid</code> property if it is. * * @return node UUID * @throws UnsupportedRepositoryOperationException * if this node is not referenceable * @throws RepositoryException if an error occurs */ public String getUUID() throws UnsupportedRepositoryOperationException, RepositoryException { if (isNodeType(getName(MIX, "referenceable"))) { return getProperty(getName(JCR, "uuid")).getString(); } else { throw new UnsupportedRepositoryOperationException( "This node is not referenceable: " + getPath()); } }
/** * Checks whether this node is checked out. * <p> * The default implementation checks the <code>jcr:isCheckedOut</code> * property if this node is versionable, and recursively calls this method * on the parent node if this node is not versionable. A non-versionable * root node always returns <code>true</code> from this method. * * @return <code>true</code> if this node is checked out, * <code>false</code> otherwise * @throws RepositoryException if an error occurs */ public boolean isCheckedOut() throws RepositoryException { if (isNodeType(getName("jcr:versionable"))) { // This node is versionable, check the jcr:isCheckedOut property return getProperty(getName("jcr:isCheckedOut")).getBoolean(); } else { try { // This node is not versionable, is the parent checked out? return getParent().isCheckedOut(); } catch (ItemNotFoundException e) { // This node is the root node, always checked out return true; } } }
/** * Checks whether this node is checked out. * <p> * The default implementation checks the <code>jcr:isCheckedOut</code> * property if this node is versionable, and recursively calls this method * on the parent node if this node is not versionable. A non-versionable * root node always returns <code>true</code> from this method. * * @return <code>true</code> if this node is checked out, * <code>false</code> otherwise * @throws RepositoryException if an error occurs */ public boolean isCheckedOut() throws RepositoryException { if (isNodeType(getName("jcr:versionable"))) { // This node is versionable, check the jcr:isCheckedOut property return getProperty(getName("jcr:isCheckedOut")).getBoolean(); } else { try { // This node is not versionable, is the parent checked out? return getParent().isCheckedOut(); } catch (ItemNotFoundException e) { // This node is the root node, always checked out return true; } } }
/** * Checks whether this node is checked out. * <p> * The default implementation checks the <code>jcr:isCheckedOut</code> * property if this node is versionable, and recursively calls this method * on the parent node if this node is not versionable. A non-versionable * root node always returns <code>true</code> from this method. * * @return <code>true</code> if this node is checked out, * <code>false</code> otherwise * @throws RepositoryException if an error occurs */ public boolean isCheckedOut() throws RepositoryException { if (isNodeType(getName(MIX, "versionable"))) { // This node is versionable, check the jcr:isCheckedOut property return getProperty(getName(JCR, "isCheckedOut")).getBoolean(); } else { try { // This node is not versionable, is the parent checked out? return getParent().isCheckedOut(); } catch (ItemNotFoundException e) { // This node is the root node, always checked out return true; } } }
/** * Checks whether this node is checked out. * <p> * The default implementation checks the <code>jcr:isCheckedOut</code> * property if this node is versionable, and recursively calls this method * on the parent node if this node is not versionable. A non-versionable * root node always returns <code>true</code> from this method. * * @return <code>true</code> if this node is checked out, * <code>false</code> otherwise * @throws RepositoryException if an error occurs */ public boolean isCheckedOut() throws RepositoryException { if (isNodeType(getName("jcr:versionable"))) { // This node is versionable, check the jcr:isCheckedOut property return getProperty(getName("jcr:isCheckedOut")).getBoolean(); } else { try { // This node is not versionable, is the parent checked out? return getParent().isCheckedOut(); } catch (ItemNotFoundException e) { // This node is the root node, always checked out return true; } } }