/** * Load the subgraph below this node, and print it to System.out if printing is enabled. * * @param node the root of the subgraph * @throws RepositoryException */ public void printSubgraph( Node node ) throws RepositoryException { printSubgraph(node, Integer.MAX_VALUE); }
public void uploadFilesAndBlock( String destinationPath, String... resourcePaths ) throws Exception { for (String resourcePath : resourcePaths) { uploadFilesAndBlock(resourcePath, destinationPath); } }
/** * Execute the supplied JCR-SQL2 query and, if printing is enabled, print out the results. * * @param session the session * @param jcrSql2 the JCR-SQL2 query * @return the results * @throws RepositoryException */ public QueryResult printQuery( Session session, String jcrSql2 ) throws RepositoryException { return printQuery(session, jcrSql2, Query.JCR_SQL2, -1, null); }
protected void printSubgraph( Node node ) throws RepositoryException { if (print) { JcrTools tools = new JcrTools(); tools.printSubgraph(node); } }
/** * Get or create a node at the specified path. * * @param session the JCR session. may not be null * @param path the path of the desired node to be found or created. may not be null * @return the existing or newly created node * @throws RepositoryException * @throws IllegalArgumentException if either the session or path argument is null */ public Node findOrCreateNode( Session session, String path ) throws RepositoryException { return findOrCreateNode(session, path, null, null); }
/** * Get or create a node with the specified node under the specified parent node. * * @param parent the parent node. may not be null * @param name the name of the child node. may not be null * @return the existing or newly created child node * @throws RepositoryException * @throws IllegalArgumentException if either the parent or name argument is null */ public Node findOrCreateChild( Node parent, String name ) throws RepositoryException { return findOrCreateChild(parent, name, null); }
public void uploadFileAndBlock( Session session, String folder, String fileName, String parentPath ) throws RepositoryException, IOException { uploadFileAndBlock(session, resourceUrl(folder + fileName), parentPath); }
static void shutdown() { repositoriesContainer.shutdown(); } }
protected Repository repositoryFor( String name, Map<String, String> parameters ) throws RepositoryException { return repositoriesContainer.getRepository(name, parameters); } }
public static void importContent( Session session, Class<?> testClass, String pathToResourceFile, String jcrPathToImportUnder ) throws Exception { int behavior = ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW; importContent(session, testClass, pathToResourceFile, null, behavior); }
/** * Create a new instance of the anonymous credentials, with the supplied attributes. * * @param attributeName the name of the attribute; may not be null * @param attributeValue the value of the attribute */ public AnonymousCredentials( String attributeName, Object attributeValue ) { setAttribute(attributeName, attributeValue); }
public Variable var( String key, String value ) { return new Variable(key, value); }
/** * Load the subgraph below this node, and print it to System.out if printing is enabled. * * @param node the root of the subgraph * @throws RepositoryException */ public void printSubgraph( Node node ) throws RepositoryException { printSubgraph(node, Integer.MAX_VALUE); }
public void uploadFileAndBlock( Session session, String folder, String fileName, String parentPath ) throws RepositoryException, IOException { uploadFileAndBlock(session, resourceUrl(folder + fileName), parentPath); }
static void shutdown() { repositoriesContainer.shutdown(); } }
public void uploadFilesAndBlock( String destinationPath, String... resourcePaths ) throws Exception { for (String resourcePath : resourcePaths) { uploadFilesAndBlock(resourcePath, destinationPath); } }
/** * Execute the supplied JCR-SQL2 query and, if printing is enabled, print out the results. * * @param session the session * @param jcrSql2 the JCR-SQL2 query * @return the results * @throws RepositoryException */ public QueryResult printQuery( Session session, String jcrSql2 ) throws RepositoryException { return printQuery(session, jcrSql2, Query.JCR_SQL2, -1, null); }
public static void importContent( Session session, Class<?> testClass, String pathToResourceFile, String jcrPathToImportUnder ) throws Exception { int behavior = ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW; importContent(session, testClass, pathToResourceFile, null, behavior); }
/** * Create a new instance of the anonymous credentials, with the supplied attributes. * * @param attributeName the name of the attribute; may not be null * @param attributeValue the value of the attribute */ public AnonymousCredentials( String attributeName, Object attributeValue ) { setAttribute(attributeName, attributeValue); }