org.modeshape.graph.request
Class VerifyWorkspaceRequest

java.lang.Object
  extended by org.modeshape.graph.request.Request
      extended by org.modeshape.graph.request.VerifyWorkspaceRequest
All Implemented Interfaces:
Serializable

public final class VerifyWorkspaceRequest
extends Request

Verify that a workspace exists with the supplied name. This is useful to determine the name of the "default" workspace for a source.

See Also:
Serialized Form

Constructor Summary
VerifyWorkspaceRequest(String workspaceName)
          Create a request to verify the existance of the named workspace.
 
Method Summary
 void cancel()
          Cancel this request.
 boolean equals(Object obj)
          
 Location getActualLocationOfRoot()
          Get the actual location of the root node in the new workspace, or null if the workspace was not (yet) created.
 String getActualWorkspaceName()
          Get the actual name of the workspace.
 int hashCode()
          
 boolean isReadOnly()
          Return whether this request only reads information.
 void setActualRootLocation(Location actualLocationOfRoot)
          Set the actual location of the root node in the new workspace.
 void setActualWorkspaceName(String actualWorkspaceName)
          Set the actual name of the workspace.
 String toString()
          
 String workspaceName()
          Get the desired name for the workspace.
 
Methods inherited from class org.modeshape.graph.request.Request
freeze, getError, hasError, isCancelled, isFrozen, setError, setLatchForFreezing
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VerifyWorkspaceRequest

public VerifyWorkspaceRequest(String workspaceName)
Create a request to verify the existance of the named workspace.

Parameters:
workspaceName - the desired name of the workspace, or null if the source's default workspace should be used
Method Detail

workspaceName

public String workspaceName()
Get the desired name for the workspace.

Returns:
the desired name for the workspace, or null if the source's default workspace is to be verified

getActualWorkspaceName

public String getActualWorkspaceName()
Get the actual name of the workspace.

Returns:
the actual name of the workspace, or null if a workspace was not verified (yet)

setActualWorkspaceName

public void setActualWorkspaceName(String actualWorkspaceName)
Set the actual name of the workspace.

Parameters:
actualWorkspaceName - the actual name of the workspace; never null
Throws:
IllegalStateException - if the request is frozen

getActualLocationOfRoot

public Location getActualLocationOfRoot()
Get the actual location of the root node in the new workspace, or null if the workspace was not (yet) created.

Returns:
the actual location of the root node in the new workspace, or null if the workspace was not (yet) created

setActualRootLocation

public void setActualRootLocation(Location actualLocationOfRoot)
Set the actual location of the root node in the new workspace.

Parameters:
actualLocationOfRoot - the actual location of the workspace's root node.
Throws:
IllegalStateException - if the request is frozen

isReadOnly

public boolean isReadOnly()
Return whether this request only reads information.

Specified by:
isReadOnly in class Request
Returns:
true if this request reads information, or false if it requests that the repository content be changed in some way
See Also:
Request.isReadOnly()

cancel

public void cancel()
Cancel this request. After this method is called, the cancellation flag is set, and any current or future processing of the request may be affected by the cancellation. (Note however, that processors may choose to not respect this request.)

This method is safe to be called by different threads.

Overrides:
cancel in class Request
See Also:
Request.cancel()

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()


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