org.jboss.dna.repository.util
Class JcrTools

java.lang.Object
  extended by org.jboss.dna.repository.util.JcrTools

public class JcrTools
extends Object

Author:
Randall Hauch

Constructor Summary
JcrTools()
           
 
Method Summary
 javax.jcr.Node findOrCreateChild(javax.jcr.Session session, javax.jcr.Node parent, String name)
           
 javax.jcr.Node findOrCreateChild(javax.jcr.Session session, javax.jcr.Node parent, String name, String nodeType)
           
 javax.jcr.Node findOrCreateNode(javax.jcr.Session session, javax.jcr.Node parentNode, String path, String defaultNodeType, String finalNodeType)
           
 javax.jcr.Node findOrCreateNode(javax.jcr.Session session, String path)
           
 javax.jcr.Node findOrCreateNode(javax.jcr.Session session, String path, String nodeType)
           
 javax.jcr.Node findOrCreateNode(javax.jcr.Session session, String path, String defaultNodeType, String finalNodeType)
           
 javax.jcr.Node getNode(javax.jcr.Node node, String relativePath, boolean required, Problems problems)
           
 String getPropertyAsString(javax.jcr.Node node, String propertyName, boolean required, Problems problems)
           
 String getPropertyAsString(javax.jcr.Node node, String propertyName, boolean required, String defaultValue, Problems problems)
           
 String[] getPropertyAsStringArray(javax.jcr.Node node, String propertyName, boolean required, Problems problems, String... defaultValues)
           
 Object getPropertyValue(javax.jcr.Node node, String propertyName, boolean required, Problems problems)
           
 String getReadable(javax.jcr.Node node)
           
 Map<String,Object> loadProperties(javax.jcr.Node propertyContainer, Map<String,Object> properties, Problems problems)
           
 Map<String,Object> loadProperties(javax.jcr.Node propertyContainer, Problems problems)
           
 int removeAllChildren(javax.jcr.Node node)
           
 boolean removeProblems(javax.jcr.Node parent)
           
 boolean storeProblems(javax.jcr.Node parent, Problems problems)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JcrTools

public JcrTools()
Method Detail

loadProperties

public Map<String,Object> loadProperties(javax.jcr.Node propertyContainer,
                                         Problems problems)

loadProperties

public Map<String,Object> loadProperties(javax.jcr.Node propertyContainer,
                                         Map<String,Object> properties,
                                         Problems problems)

removeProblems

public boolean removeProblems(javax.jcr.Node parent)
                       throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

storeProblems

public boolean storeProblems(javax.jcr.Node parent,
                             Problems problems)
                      throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

removeAllChildren

public int removeAllChildren(javax.jcr.Node node)
                      throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getPropertyAsString

public String getPropertyAsString(javax.jcr.Node node,
                                  String propertyName,
                                  boolean required,
                                  Problems problems)

getPropertyAsString

public String getPropertyAsString(javax.jcr.Node node,
                                  String propertyName,
                                  boolean required,
                                  String defaultValue,
                                  Problems problems)

getPropertyValue

public Object getPropertyValue(javax.jcr.Node node,
                               String propertyName,
                               boolean required,
                               Problems problems)

getPropertyAsStringArray

public String[] getPropertyAsStringArray(javax.jcr.Node node,
                                         String propertyName,
                                         boolean required,
                                         Problems problems,
                                         String... defaultValues)

getNode

public javax.jcr.Node getNode(javax.jcr.Node node,
                              String relativePath,
                              boolean required,
                              Problems problems)

getReadable

public String getReadable(javax.jcr.Node node)

findOrCreateNode

public javax.jcr.Node findOrCreateNode(javax.jcr.Session session,
                                       String path)
                                throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

findOrCreateNode

public javax.jcr.Node findOrCreateNode(javax.jcr.Session session,
                                       String path,
                                       String nodeType)
                                throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

findOrCreateNode

public javax.jcr.Node findOrCreateNode(javax.jcr.Session session,
                                       String path,
                                       String defaultNodeType,
                                       String finalNodeType)
                                throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

findOrCreateNode

public javax.jcr.Node findOrCreateNode(javax.jcr.Session session,
                                       javax.jcr.Node parentNode,
                                       String path,
                                       String defaultNodeType,
                                       String finalNodeType)
                                throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

findOrCreateChild

public javax.jcr.Node findOrCreateChild(javax.jcr.Session session,
                                        javax.jcr.Node parent,
                                        String name)
                                 throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

findOrCreateChild

public javax.jcr.Node findOrCreateChild(javax.jcr.Session session,
                                        javax.jcr.Node parent,
                                        String name,
                                        String nodeType)
                                 throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.