@Override public String getStoredQueryPath() throws RepositoryException { if (storedQueryPath == null) { throw new ItemNotFoundException("Not a stored query"); } return storedQueryPath; }
@Override public String getStoredQueryPath() throws RepositoryException { if (storedQueryPath == null) { throw new ItemNotFoundException("Not a stored query"); } return storedQueryPath; }
/** * @see Query#getStoredQueryPath() */ public String getStoredQueryPath() throws ItemNotFoundException, RepositoryException { if (node == null) { throw new ItemNotFoundException("Not a persistent query."); } return node.getPath(); }
/** * {@inheritDoc} */ public String getStoredQueryPath() throws ItemNotFoundException, RepositoryException { checkInitialized(); if (node == null) { throw new ItemNotFoundException("not a persistent query"); } return node.getPath(); }
@Override public Node getNodeByIdentifier(final String id) throws RepositoryException { if (id == null) { throw new IllegalArgumentException("id cannot be null"); } final Node result = getNodeOrDecendantByIdentifier(id, this.root); if (result == null) { throw new ItemNotFoundException("Node with identifier '" + id + "' does not exist"); } return result; }
protected Node getVariant(final Node handle, final WorkflowUtils.Variant variant) throws RepositoryException { final Optional<Node> optional = WorkflowUtils.getDocumentVariantNode(handle, variant); if(optional.isPresent()) { return optional.get(); } throw new ItemNotFoundException("No " + variant + " variant found under path: " + handle.getPath()); }
@Override protected Node doExec(Node context, ErrorHandler errorHandler) throws RepositoryException { if (!context.hasProperty(name)) { throw new ItemNotFoundException(String.format("Property %s does not exist at %s", name, context.getPath())); } final Value value = PropertyUtil.createValue(newValue, context.getSession().getValueFactory()); context.setProperty(name, value); return context; } };
@Override public Value getValue( String arg0 ) throws ItemNotFoundException { int pos = getColumnPosition(arg0); if (pos >= 0) { return createValue(tuple.get(pos)); } throw new ItemNotFoundException("Item " + arg0 + " not found"); }
@NotNull @Override public Node perform() throws RepositoryException { NodeDelegate nd = sd.getNodeByIdentifier(id); if (nd == null) { throw new ItemNotFoundException("Node with id " + id + " does not exist."); } return NodeImpl.createNode(nd, sessionContext); } });
@Override public Node getNodeByUUID(String uuid) throws ItemNotFoundException, RepositoryException { Node node = super.getNodeByUUID(uuid); if (!contentDecorator.evaluateNode(node)) { throw new ItemNotFoundException(uuid); } return wrapNode(node); }
@Override public Node getNode() throws ItemNotFoundException, ValueFormatException, RepositoryException { Node node = super.getNode(); if (!contentDecorator.evaluateNode(node)) { throw new ItemNotFoundException(); } return wrapNode(node); }
@Override public Property getProperty() throws ItemNotFoundException, ValueFormatException, RepositoryException { Property property = super.getProperty(); if (!contentDecorator.evaluateProperty(property)) { throw new ItemNotFoundException(); } return wrapProperty(property); }
public Node perform(SessionContext context) throws RepositoryException { NodeId parentId = getParentId(); if (parentId != null) { return (Node) context.getItemManager().getItem(parentId); } else { throw new ItemNotFoundException( "Root node doesn't have a parent"); } } public String toString() {
@Override public Node getParent() throws ItemNotFoundException { if (isRoot()) { throw new ItemNotFoundException("This is the rootNode - it doesn't have a parent!"); } return parent; }
@Override public Value getValue( String arg0 ) throws ItemNotFoundException { for (int i = 0; i < TestUtil.COLUMN_NAMES.length; i++) { if (TestUtil.COLUMN_NAMES[i].equals(arg0)) { return JdbcJcrValueFactory.createValue(tuple[i]); } } throw new ItemNotFoundException("Item " + arg0 + " not found"); }
@Override public Item getAncestor(final int depth) throws RepositoryException { if (depth < 0 || depth > getDepth()) { throw new ItemNotFoundException(); } return this.session.getItem(ResourceUtil.getParent(this.path, depth)); }
public void orderBefore(String source, String target) throws ItemNotFoundException, InvalidItemStateException { Tree tree = getTree(); if (!tree.getChild(source).exists()) { throw new ItemNotFoundException("Not a child: " + source); } else if (target != null && !tree.getChild(target).exists()) { throw new ItemNotFoundException("Not a child: " + target); } else { tree.getChild(source).orderBefore(target); } }
@Override protected Content doExec(Content context, ErrorHandler errorHandler) throws RepositoryException { if (!context.hasNodeData(name)) { throw new ItemNotFoundException(name); } final Value value = NodeDataUtil.createValue(newValue, context.getJCRNode().getSession().getValueFactory()); context.setNodeData(name, value); return context; } };
public PropertyImpl perform(SessionContext context) throws RepositoryException { try { return (PropertyImpl) context.getItemManager().getItem( new PropertyId(getNodeId(), name)); } catch (AccessDeniedException ade) { String n = context.getJCRName(name); throw new ItemNotFoundException( "Property " + n + " not found"); } } public String toString() {
@Override public String getStoredQueryPath() throws ItemNotFoundException { if (storedAtPath == null) { throw new ItemNotFoundException(JcrI18n.notStoredQuery.text(getStatement())); } return this.context.getExecutionContext().getValueFactories().getStringFactory().create(storedAtPath); }