|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JcrOperations
Interface that specifies a basic set of JCR operations. Not often used, but a useful option to enhance testability, as it can easily be mocked or stubbed.
Provides JcrTemplate's data access methods that mirror various Session methods. See the JCR Session javadocs for details on those methods.
| Method Summary | |
|---|---|
java.lang.String |
dump(javax.jcr.Node node)
Dump the contents of the given node in a String. |
java.lang.Object |
execute(JcrCallback callback)
Execute the action specified by the given action object within a Session. |
java.lang.Object |
execute(JcrCallback action,
boolean exposeNativeSession)
Execute the action specified by the given action object within a Session. |
void |
rename(javax.jcr.Node node,
java.lang.String newName)
Renames a node (with the given name) |
| Methods inherited from interface org.springframework.extensions.jcr.JcrOptionalOperations |
|---|
addLockToken, getLockTokens, removeLockToken |
| Methods inherited from interface org.springframework.extensions.jcr.JcrModel2Operations |
|---|
hasPendingChanges, importXML, move, refresh, save, setNamespacePrefix |
| Methods inherited from interface org.springframework.extensions.jcr.JcrModel1Operations |
|---|
getAttribute, getAttributeNames, getImportContentHandler, getItem, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getNodeByUUID, getRootNode, getUserID, getValueFactory, isLive, itemExists, query, query, query, query, query |
| Method Detail |
|---|
java.lang.Object execute(JcrCallback action,
boolean exposeNativeSession)
throws org.springframework.dao.DataAccessException
action - callback object that specifies the Jcr actionexposeNativeSession - whether to expose the native Jcr Session to callback code
org.springframework.dao.DataAccessException - in case of Jcr errors
java.lang.Object execute(JcrCallback callback)
throws org.springframework.dao.DataAccessException
Session. Application
exceptions thrown by the action object get propagated to the caller (can only be unchecked). JCR
exceptions are transformed into appropriate DAO ones. Allows for returning a result object, i.e. a
domain object or a collection of domain objects. Note: Callback code does not need to explicitly log
out of the Session; this method will handle that itself. The workspace logged into will be
that named by the workspaceName property; if that property is null, the
repository's default workspace will be used.
callback - the JCRCallback that executes the client operation
org.springframework.dao.DataAccessExceptionjava.lang.String dump(javax.jcr.Node node)
node - node to be dumped (null is equivalent to the root node)
void rename(javax.jcr.Node node,
java.lang.String newName)
node - node to renamenewName - new name for the node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||