|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.graph.request.processor.RequestProcessor
org.modeshape.connector.jcr.JcrRequestProcessor
@NotThreadSafe public class JcrRequestProcessor
A RequestProcessor
that processes Request
s by operating against the JCR Repository
.
Nested Class Summary | |
---|---|
protected class |
JcrRequestProcessor.Workspace
An encapsulation of a remote JCR Session, with an ExecutionContext that contains a namespace registry which mirrors the session's registry, and with factories that convert the JCR-specific values, paths, and names into their graph-equivalents. |
Nested classes/interfaces inherited from class org.modeshape.graph.request.processor.RequestProcessor |
---|
RequestProcessor.LocationWithDepth |
Constructor Summary | |
---|---|
JcrRequestProcessor(String sourceName,
ExecutionContext context,
Repository repository,
Observer observer,
Credentials credentials,
CachePolicy defaultCachePolicy)
|
Method Summary | |
---|---|
void |
close()
Close this processor, allowing it to clean up any open resources. |
void |
commit()
Commit all changes to any sessions. |
void |
process(CloneBranchRequest request)
Process a request to clone a branch into a new workspace. |
void |
process(CloneWorkspaceRequest request)
Process a request to clone an existing workspace as a new workspace. |
void |
process(CopyBranchRequest request)
Process a request to copy a branch into another location. |
void |
process(CreateNodeRequest request)
Process a request to create a node at a specified location. |
void |
process(CreateWorkspaceRequest request)
Process a request to create a new workspace. |
void |
process(DeleteBranchRequest request)
Process a request to delete a branch at a specified location. |
void |
process(DestroyWorkspaceRequest request)
Process a request to permanently destroy a workspace. |
void |
process(GetWorkspacesRequest request)
Process a request to get the information about the available workspaces. |
void |
process(MoveBranchRequest request)
Process a request to move a branch at a specified location into a different location. |
void |
process(ReadAllChildrenRequest request)
Process a request to read all of the children of a node. |
void |
process(ReadAllPropertiesRequest request)
Process a request to read the properties of a node at the supplied location. |
void |
process(ReadNodeRequest request)
Process a request to read the properties and children of a node at the supplied location. |
void |
process(UpdatePropertiesRequest request)
Process a request to remove the specified properties from a node. |
void |
process(VerifyWorkspaceRequest request)
Process a request to verify a named workspace. |
void |
rollback()
Rollback all changes made to any sessions. |
protected JcrRequestProcessor.Workspace |
workspace()
Use the first workspace that's available, or if none is available establish one for the default workspace. |
protected boolean |
workspaceExistsNamed(String workspaceName)
Determine if there is an existing workspace with the supplied name. |
protected JcrRequestProcessor.Workspace |
workspaceFor(String workspaceName)
Obtain the JCR session for the named workspace in the current repository using the credentials given to this processor during instantiation. |
Methods inherited from class org.modeshape.graph.request.processor.RequestProcessor |
---|
absoluteMaximumDepthForBranchReads, completeRequest, getChanges, getDefaultCachePolicy, getExecutionContext, getNowInUtc, getSourceName, includeChildrenInSubgraph, notifyObserverOfChanges, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, process, processUnknownRequest, recordChange, setCacheableInfo, setCacheableInfo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JcrRequestProcessor(String sourceName, ExecutionContext context, Repository repository, Observer observer, Credentials credentials, CachePolicy defaultCachePolicy)
sourceName
- context
- repository
- observer
- credentials
- defaultCachePolicy
- Method Detail |
---|
protected JcrRequestProcessor.Workspace workspaceFor(String workspaceName) throws RepositoryException
This method caches a single Session
object for each named (or default) workspace, so multiple calls with the same
workspace name will always result in the same Session
object. These cached Session objects are released only when
this processor is closed
.
workspaceName
- the name of the workspace for which a Session is to be found, or null if a session to the default
workspace should be returned
NoSuchWorkspaceException
- if the named workspace does not exist
RepositoryException
- if there is an error creating a Sessionprotected JcrRequestProcessor.Workspace workspace() throws RepositoryException
RepositoryException
- if there is an error creating a Sessionprotected boolean workspaceExistsNamed(String workspaceName) throws RepositoryException
workspaceName
- the name of the workspace
RepositoryException
- if there is an error working with the sessionpublic void commit() throws RepositoryException
RepositoryException
- if there is a problem committing any changespublic void rollback() throws RepositoryException
RepositoryException
- if there is a problem committing any changespublic void close()
close
in class RequestProcessor
RequestProcessor.close()
public void process(VerifyWorkspaceRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the requestRequestProcessor.process(org.modeshape.graph.request.VerifyWorkspaceRequest)
public void process(GetWorkspacesRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the requestRequestProcessor.process(org.modeshape.graph.request.GetWorkspacesRequest)
public void process(CreateWorkspaceRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the requestRequestProcessor.process(org.modeshape.graph.request.CreateWorkspaceRequest)
public void process(CloneWorkspaceRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the requestRequestProcessor.process(org.modeshape.graph.request.CloneWorkspaceRequest)
public void process(DestroyWorkspaceRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the requestRequestProcessor.process(org.modeshape.graph.request.DestroyWorkspaceRequest)
public void process(ReadNodeRequest request)
This method does nothing if the request is null. Unless overridden, this method converts the single request into a
ReadAllChildrenRequest
and a ReadAllPropertiesRequest
.
process
in class RequestProcessor
request
- the read requestRequestProcessor.process(org.modeshape.graph.request.ReadNodeRequest)
public void process(ReadAllChildrenRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the read requestRequestProcessor.process(org.modeshape.graph.request.ReadAllChildrenRequest)
public void process(ReadAllPropertiesRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the read requestRequestProcessor.process(org.modeshape.graph.request.ReadAllPropertiesRequest)
public void process(CreateNodeRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the create requestRequestProcessor.process(org.modeshape.graph.request.CreateNodeRequest)
public void process(CloneBranchRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the requestRequestProcessor.process(org.modeshape.graph.request.CloneBranchRequest)
public void process(CopyBranchRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the copy requestRequestProcessor.process(org.modeshape.graph.request.CopyBranchRequest)
public void process(DeleteBranchRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the delete requestRequestProcessor.process(org.modeshape.graph.request.DeleteBranchRequest)
public void process(MoveBranchRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the move requestRequestProcessor.process(org.modeshape.graph.request.MoveBranchRequest)
public void process(UpdatePropertiesRequest request)
This method does nothing if the request is null.
process
in class RequestProcessor
request
- the remove requestRequestProcessor.process(org.modeshape.graph.request.UpdatePropertiesRequest)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |