org.springframework.extensions.jcr
Interface JcrModel1Operations

All Known Subinterfaces:
JcrModel2Operations, JcrOperations, JcrOptionalOperations
All Known Implementing Classes:
JcrTemplate

public interface JcrModel1Operations

Interface used for delimiting Jcr operations based on what the underlying repository supports (in this case model 1 operations). Normally not used but useful for casting to restrict access in some situations.

Author:
Costin Leau, Sergio Bossa, Salvatore Incandela

Method Summary
 java.lang.Object getAttribute(java.lang.String name)
           
 java.lang.String[] getAttributeNames()
           
 org.xml.sax.ContentHandler getImportContentHandler(java.lang.String parentAbsPath, int uuidBehavior)
           
 javax.jcr.Item getItem(java.lang.String absPath)
           
 java.lang.String getNamespacePrefix(java.lang.String uri)
           
 java.lang.String[] getNamespacePrefixes()
           
 java.lang.String getNamespaceURI(java.lang.String prefix)
           
 javax.jcr.Node getNodeByUUID(java.lang.String uuid)
           
 javax.jcr.Node getRootNode()
           
 java.lang.String getUserID()
           
 javax.jcr.ValueFactory getValueFactory()
           
 boolean isLive()
           
 boolean itemExists(java.lang.String absPath)
           
 java.util.Map query(java.util.List list)
          Default method for doing multiple queries.
 java.util.Map query(java.util.List list, java.lang.String language, boolean ignoreErrors)
          Utility method for executing a list of queries against the repository.
 javax.jcr.query.QueryResult query(javax.jcr.Node node)
          Execute a persistent query from the given node.
 javax.jcr.query.QueryResult query(java.lang.String statement)
          Execute a query with the given strings with XPATH as default language.
 javax.jcr.query.QueryResult query(java.lang.String statement, java.lang.String language)
          Execute a query with the given strings.
 

Method Detail

getAttribute

java.lang.Object getAttribute(java.lang.String name)
See Also:
Session.getAttribute(java.lang.String)

getAttributeNames

java.lang.String[] getAttributeNames()
See Also:
Session.getAttributeNames()

getImportContentHandler

org.xml.sax.ContentHandler getImportContentHandler(java.lang.String parentAbsPath,
                                                   int uuidBehavior)
See Also:
Session.getImportContentHandler(java.lang.String, int)

getItem

javax.jcr.Item getItem(java.lang.String absPath)
See Also:
Session.getItem(java.lang.String)

getNamespacePrefix

java.lang.String getNamespacePrefix(java.lang.String uri)
See Also:
Session.getNamespacePrefix(java.lang.String)

getNamespacePrefixes

java.lang.String[] getNamespacePrefixes()
See Also:
Session.getNamespacePrefixes()

getNamespaceURI

java.lang.String getNamespaceURI(java.lang.String prefix)
See Also:
Session.getNamespaceURI(java.lang.String)

getNodeByUUID

javax.jcr.Node getNodeByUUID(java.lang.String uuid)
See Also:
Session.getNodeByUUID(java.lang.String)

getRootNode

javax.jcr.Node getRootNode()
See Also:
Session.getRootNode();

getUserID

java.lang.String getUserID()
See Also:
Session.getUserID()

getValueFactory

javax.jcr.ValueFactory getValueFactory()
See Also:
Session.getValueFactory()

isLive

boolean isLive()
See Also:
Session.isLive()

itemExists

boolean itemExists(java.lang.String absPath)
See Also:
Session.itemExists(java.lang.String)

query

javax.jcr.query.QueryResult query(javax.jcr.Node node)
Execute a persistent query from the given node.

Parameters:
node - node to be dumped
Returns:
query result
See Also:
QueryManager.getQuery(javax.jcr.Node)

query

javax.jcr.query.QueryResult query(java.lang.String statement)
Execute a query with the given strings with XPATH as default language. It's the same as #query(java.lang.String, java.lang.String)

Parameters:
statement - query statement
Returns:
query result
See Also:
QueryManager.createQuery(java.lang.String, java.lang.String)

query

javax.jcr.query.QueryResult query(java.lang.String statement,
                                  java.lang.String language)
Execute a query with the given strings.

Parameters:
statement - query statement
language - language statement
Returns:
query result
See Also:
QueryManager.createQuery(java.lang.String, java.lang.String)

query

java.util.Map query(java.util.List list)
Default method for doing multiple queries. It assumes the language is XPATH and that errors will not be ignored.

Parameters:
list - a list of queries that will be executed against the repository
Returns:
a map containing the queries as keys and results as values

query

java.util.Map query(java.util.List list,
                    java.lang.String language,
                    boolean ignoreErrors)
Utility method for executing a list of queries against the repository. Reads the queries given and returns the results in a map.

If possible the map will be a LinkedHashSet on JDK 1.4+, otherwise LinkedHashSet from Commons collections 3.1 if the package is found. If the above fails a HashMap will be returned.

Parameters:
list - list of queries
language - language of the queries. If null XPATH is assumed.
ignoreErrors - if true it will populate unfound nodes with null
Returns:
a map containing the queries as keys and results as values
See Also:
CollectionFactory


Copyright © 2009. All Rights Reserved.