javax.jcr.nodetype.NoSuchNodeTypeException Java Examples
The following examples show how to use
javax.jcr.nodetype.NoSuchNodeTypeException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NodeImpl.java From jackalope with Apache License 2.0 | 5 votes |
@Override public Node addNode(String relPath, String primaryNodeTypeName) throws ItemExistsException, PathNotFoundException, NoSuchNodeTypeException, LockException, VersionException, ConstraintViolationException, RepositoryException { Node node = new NodeImpl(session, Paths.resolve(getPath(), relPath)); node.setPrimaryType(primaryNodeTypeName); session.changeItem(this); return node; }
Example #2
Source File: NodeWrapper.java From sling-whiteboard with Apache License 2.0 | 4 votes |
@Override public Node addNode(String relPath, String primaryNodeTypeName) throws ItemExistsException, PathNotFoundException, NoSuchNodeTypeException, LockException, VersionException, ConstraintViolationException, RepositoryException { return sessionWrapper.addNode(getPath(), concat(getPath(), relPath), relPath, primaryNodeTypeName); }
Example #3
Source File: NodeWrapper.java From sling-whiteboard with Apache License 2.0 | 4 votes |
@Override public void setPrimaryType(String nodeTypeName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException { this.delegate.setPrimaryType(nodeTypeName); }
Example #4
Source File: NodeWrapper.java From sling-whiteboard with Apache License 2.0 | 4 votes |
@Override public void addMixin(String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException { this.delegate.addMixin(mixinName); }
Example #5
Source File: NodeWrapper.java From sling-whiteboard with Apache License 2.0 | 4 votes |
@Override public void removeMixin(String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException { this.delegate.removeMixin(mixinName); }
Example #6
Source File: NodeWrapper.java From sling-whiteboard with Apache License 2.0 | 4 votes |
@Override public boolean canAddMixin(String mixinName) throws NoSuchNodeTypeException, RepositoryException { return this.delegate.canAddMixin(mixinName); }
Example #7
Source File: NodeTypeManagerWrapper.java From sling-whiteboard with Apache License 2.0 | 4 votes |
@Override public NodeType getNodeType(String nodeTypeName) throws NoSuchNodeTypeException, RepositoryException { return nodeTypeManager.getNodeType(nodeTypeName); }
Example #8
Source File: NodeTypeManagerWrapper.java From sling-whiteboard with Apache License 2.0 | 4 votes |
@Override public void unregisterNodeType(String name) throws UnsupportedRepositoryOperationException, NoSuchNodeTypeException, RepositoryException { nodeTypeManager.unregisterNodeType(name); }
Example #9
Source File: NodeTypeManagerWrapper.java From sling-whiteboard with Apache License 2.0 | 4 votes |
@Override public void unregisterNodeTypes(String[] names) throws UnsupportedRepositoryOperationException, NoSuchNodeTypeException, RepositoryException { nodeTypeManager.unregisterNodeTypes(names); }
Example #10
Source File: ItemWrapper.java From sling-whiteboard with Apache License 2.0 | 4 votes |
@Override public void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException, InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException { this.sessionWrapper.save(); }
Example #11
Source File: SessionWrapper.java From sling-whiteboard with Apache License 2.0 | 4 votes |
@Override public void save() throws AccessDeniedException, ItemExistsException, ReferentialIntegrityException, ConstraintViolationException, InvalidItemStateException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException { this.wrappedSession.save(); }
Example #12
Source File: NodeImpl.java From jackalope with Apache License 2.0 | 4 votes |
@Override public void setPrimaryType(String nodeTypeName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException { setProperty("jcr:primaryType", nodeTypeName); }
Example #13
Source File: NodeImpl.java From jackalope with Apache License 2.0 | 4 votes |
@Override public void addMixin(String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException { //Not Implemented }
Example #14
Source File: NodeImpl.java From jackalope with Apache License 2.0 | 4 votes |
@Override public void removeMixin(String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException { //Not Implemented }
Example #15
Source File: NodeImpl.java From jackalope with Apache License 2.0 | 4 votes |
@Override public boolean canAddMixin(String mixinName) throws NoSuchNodeTypeException, RepositoryException { return false; }
Example #16
Source File: SessionFactoryUtils.java From mycollab with GNU Affero General Public License v3.0 | 4 votes |
/** * Jcr exception translator - it converts specific JSR-170 checked exceptions into unchecked Spring DA * exception. * @author Guillaume Bort <[email protected]> * @author Costin Leau * @author Sergio Bossa * @author Salvatore Incandela * @param ex * @return */ public static DataAccessException translateException(RepositoryException ex) { if (ex instanceof AccessDeniedException) { return new DataRetrievalFailureException("Access denied to this data", ex); } if (ex instanceof ConstraintViolationException) { return new DataIntegrityViolationException("Constraint has been violated", ex); } if (ex instanceof InvalidItemStateException) { return new ConcurrencyFailureException("Invalid item state", ex); } if (ex instanceof InvalidQueryException) { return new DataRetrievalFailureException("Invalid query", ex); } if (ex instanceof InvalidSerializedDataException) { return new DataRetrievalFailureException("Invalid serialized data", ex); } if (ex instanceof ItemExistsException) { return new DataIntegrityViolationException("An item already exists", ex); } if (ex instanceof ItemNotFoundException) { return new DataRetrievalFailureException("Item not found", ex); } if (ex instanceof LoginException) { return new DataAccessResourceFailureException("Bad login", ex); } if (ex instanceof LockException) { return new ConcurrencyFailureException("Item is locked", ex); } if (ex instanceof MergeException) { return new DataIntegrityViolationException("Merge failed", ex); } if (ex instanceof NamespaceException) { return new InvalidDataAccessApiUsageException("Namespace not registred", ex); } if (ex instanceof NoSuchNodeTypeException) { return new InvalidDataAccessApiUsageException("No such node type", ex); } if (ex instanceof NoSuchWorkspaceException) { return new DataAccessResourceFailureException("Workspace not found", ex); } if (ex instanceof PathNotFoundException) { return new DataRetrievalFailureException("Path not found", ex); } if (ex instanceof ReferentialIntegrityException) { return new DataIntegrityViolationException("Referential integrity violated", ex); } if (ex instanceof UnsupportedRepositoryOperationException) { return new InvalidDataAccessApiUsageException("Unsupported operation", ex); } if (ex instanceof ValueFormatException) { return new InvalidDataAccessApiUsageException("Incorrect value format", ex); } if (ex instanceof VersionException) { return new DataIntegrityViolationException("Invalid version graph operation", ex); } // fallback return new JcrSystemException(ex); }