org.jboss.dna.graph.request
Class DestroyWorkspaceRequest

java.lang.Object
  extended by org.jboss.dna.graph.request.Request
      extended by org.jboss.dna.graph.request.ChangeRequest
          extended by org.jboss.dna.graph.request.DestroyWorkspaceRequest
All Implemented Interfaces:
Serializable

public final class DestroyWorkspaceRequest
extends ChangeRequest

Request that an existing workspace with the supplied name be destroyed.

See Also:
Serialized Form

Constructor Summary
DestroyWorkspaceRequest(String workspaceName)
          Create a request to destroy an existing workspace.
 
Method Summary
 Location changedLocation()
          Get the location of the top-most node that is to be changed by this request.
 String changedWorkspace()
          Get the name of the workspace that was changed by this request.
 boolean changes(String workspace, Path path)
          Determine if this request changes the branch at the given path.
 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.
 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.
 String toString()
          
 String workspaceName()
          Get the name for the workspace that is to be destroyed.
 
Methods inherited from class org.jboss.dna.graph.request.Request
cancel, freeze, getError, hasError, isCancelled, isFrozen, setError, setLatchForFreezing
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DestroyWorkspaceRequest

public DestroyWorkspaceRequest(String workspaceName)
Create a request to destroy an existing workspace.

Parameters:
workspaceName - the name of the workspace that is to be destroyed
Throws:
IllegalArgumentException - if the workspace name is null
Method Detail

workspaceName

public String workspaceName()
Get the name for the workspace that is to be destroyed.

Returns:
the name for the workspace; never null

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()

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()

changedLocation

public Location changedLocation()
Get the location of the top-most node that is to be changed by this request.

Specified by:
changedLocation in class ChangeRequest
Returns:
the location changed by this request
See Also:
ChangeRequest.changedLocation()

changedWorkspace

public String changedWorkspace()
Get the name of the workspace that was changed by this request.

Specified by:
changedWorkspace in class ChangeRequest
Returns:
the name of the workspace changed by this request
See Also:
ChangeRequest.changedWorkspace()

changes

public boolean changes(String workspace,
                       Path path)
Determine if this request changes the branch at the given path.

Specified by:
changes in class ChangeRequest
Parameters:
workspace - the name of the workspace; may not be null
path - the path; may not be null
Returns:
true if this request changes a node under the given path
See Also:
ChangeRequest.changes(java.lang.String, org.jboss.dna.graph.property.Path)


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