RegistryConstants.QUERIES_COLLECTION_PATH +
"/custom-queries";
}
public Node storeAsNode(String s) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, UnsupportedRepositoryOperationException, RepositoryException {
RegistryNode node = new RegistryNode(s, session);
CollectionImpl subCollection = null;
try {
subCollection = (CollectionImpl) session.getUserRegistry().newCollection();
subCollection.setDescription("nt:query");
session.getUserRegistry().put(s, subCollection);
} catch (RegistryException e) {
e.printStackTrace();
}
node.nodeType = (RegistryNodeType) node.getParent().getPrimaryNodeType();
node.setPrimaryType("nt:query");
node.nodeType.setNode(node);
return node;
}