org.apache.wvcm
Class ResourceImpl

java.lang.Object
  extended by org.apache.wvcm.ResourceImpl
All Implemented Interfaces:
Resource
Direct Known Subclasses:
ActivityImpl, ControllableResourceImpl, FolderImpl, PrincipalImpl, PrivilegeImpl, VersionHistoryImpl, VersionImpl

public class ResourceImpl
extends java.lang.Object
implements Resource

Implementation of Resource.

Version:
$Revision: 1.1.1.1.2.7 $

Nested Class Summary
protected  class ResourceImpl.LoadedProperties
          Loaded properties container.
static class ResourceImpl.XmlPropertyValue
          An XML property value
 
Nested classes/interfaces inherited from interface javax.wvcm.Resource
Resource.GenericResourceImpl
 
Field Summary
protected static org.jdom.Namespace dnsp
           
static java.lang.String MISSING_PROPERTY_VALUE
           
 
Constructor Summary
ResourceImpl(Location location)
          Constructor
 
Method Summary
protected  ResourceAccessor accessor()
          Get the accessor.
 void addLockToken(LockToken lockToken)
          Method addLockToken
 void commit()
          Called after successful doWriteProperties to reset the caches.
 void doBind(Location destination, boolean overwrite)
          Binds the resource identified by this Resource to the location identified by the destination.
 void doCopy(java.lang.String destination, boolean overwrite)
          Create a copy of the resource identified by this Resource at the location identified by the destination.
 void doLock(LockToken.Timeout timeout, boolean deep)
          NOT YET STANDARD Locks this resource.
 void doLock(LockToken.Timeout timeout, boolean deep, boolean exclusive, java.lang.String owner)
          NOT YET STANDARD Locks this resource.
 java.util.List doReadAccessControlList(boolean includeInherited)
          NOT YET STANDARD Return the ACL of this resource.
 Resource doReadContent(PropertyNameList wantedPropertyList, java.io.OutputStream content)
          Return a resource containing the wanted properties.
 Resource doReadProperties(PropertyNameList wantedPropertyList)
          Return a Resource containing the wanted properties.
 void doRebind(Location destination, boolean overwrite)
          Unbinds the resource identified by this Resource from its current location and binds it to the location identified by the destination.
 java.util.List doSearch(PropertyNameList wantedPropertyList, SearchToken searchToken)
          Return a list of Resource objects containing the wanted properties according to the conditions of the specified searct token from the scope defined by this Resource.
 void doUnbind()
          Unbinds the resource identified by the locator of this Resource.
 void doUnlock()
          NOT YET STANDARD Releases the active lock of this resource.
 void doUnlock(LockToken lockToken)
          NOT YET STANDARD Releases the specified lock of this resource.
 void doWriteAccessControlList(java.util.List acl)
          NOT YET STANDARD Modifies the access control list (ACL) of this resource.
 void doWriteContent(java.io.InputStream content, java.lang.String contentIdentifier)
          Persists content changes to a resource.
 void doWriteProperties()
          Persists property changes to this Resource.
 boolean equals(java.lang.Object o)
           
protected  FolderAccessor folderAccessor()
          Get the folder accessor for this resource.
protected  FolderAccessor folderAccessor(Resource r)
          Get a folder accessor for the specified resource.
 java.util.List getActiveLockTokens()
           
 java.lang.Object getAttribute(PropertyNameList.AttributeName name)
          Return an attribute of this Resource.
 IClientMethod getClientHttpMethod()
           
 java.lang.String getComment()
          Return a comment describing this Resource that is suitable for display to a user.
 java.lang.String getContentCharacterSet()
          Return a description of the character set of the resource content (see RFC2278).
 java.lang.String getContentIdentifier()
          Return an implementation-defined String that identifies the persistent state of the resource.
 java.util.Locale getContentLanguage()
          Return a description of the natural language used in the resource content.
 long getContentLength()
          Return the content length as an integer number of bytes.
 java.lang.String getContentType()
          Return a description of the media-type of the resource content.
 java.util.Date getCreationDate()
          Return the date that the resource was originally created.
 Principal getCreationUser()
          NOT YET STANDARD Return the principal that originally created the resource.
 java.lang.String getCreatorDisplayName()
          Return a description of the user that created the resource, in a format that is suitable for display to an end user.
 java.lang.String getDisplayName()
          Return a short description of the resource, in a format that is suitable for display to an end user in a tree display.
 org.apache.commons.httpclient.HttpMethod getHttpMethod()
          NOT YET STANDARD Get the HTTP method used for the last resource operation.
 java.util.Date getLastModified()
          Return the date the content of the resource was last modified.
 java.util.List getLockTokens()
          NOT YET STANDARD Returns the list of lock tokens available at this resource.
 java.util.Date getModificationDate()
          NOT YET STANDARD Return the date that the resource was modified.
 Principal getModificationUser()
          NOT YET STANDARD Return the principal that modified the resource.
 Principal getOwner()
          NOT YET STANDARD Get the owner of this resource
 java.util.List getParentBindingList()
          NOT YET STANDARD !!!
 java.util.List getPrincipalFolderList()
          NOT YET STANDARD Return a list of Folder objects that identify folders that contain principals.
 java.util.List getPrivilegeFolderList()
          NOT YET STANDARD Return a list of Folder objects that identify folders that contain privileges.
 java.lang.Object getProperty(PropertyNameList.PropertyName pname)
          Get the specified property value.
 java.util.Map getPropertyContainer()
          Get the container of loaded properties
 PropertyNameList getPropertyNameList(boolean onlyAttributes)
          Return the list of names of properties available on this Resource.
 java.util.List getProviderList()
          Return a list of String objects that identify the names of providers for this resource, with the preferred providers specified earlier in the list.
 java.lang.String getResourceIdentifier()
          NOT YET STANDARD !!!
 java.util.List getSupportedPrivilegeList()
          NOT YET STANDARD Return a list of AccessControlElement.Privilege objects defined for the resource.
 PropertyNameList getUpdatedPropertyList()
          Return the names of properties that have been updated in the proxy, but the updates have not yet been successfully applied to the resource.
 java.util.List getWorkspaceFolderList()
          Method getWorkspaceFolderList
 int hashCode()
           
 java.util.List listOfRemovedAttributes()
          Get list of removed attributes
 java.util.List listOfSetProperties()
          Get list of created or modified properties
protected  ResourceImpl.LoadedProperties loadedProperties()
          Get the stateContainer
 Location location()
          Return the location of the persistent resource for which this Resource is a proxy.
 void removeAttribute(PropertyNameList.AttributeName name)
          Removes the specified attribute of this Resource.
 void removeLockToken(LockToken lockToken)
           
 void setAttribute(PropertyNameList.AttributeName name, java.lang.Object value)
          Adds or replaces the value of the specified attribute of this Resource.
 void setComment(java.lang.String comment)
          Adds or replaces the comment string of this Resource.
 void setContentCharacterSet(java.lang.String contentCharacterSet)
          Sets the content character set of the resource.
 void setContentLanguage(java.util.Locale contentLanguage)
          Sets the content language of the resource.
 void setContentType(java.lang.String contentType)
          Sets the content type of the resource.
 void setCreatorDisplayName(java.lang.String val)
          Adds or replaces the creator display name string of the resource.
 void setDisplayName(java.lang.String val)
          Adds or replaces the display name string of the resource.
 void setHttpMethod(org.apache.commons.httpclient.HttpMethod method)
          NOT YET STANDARD Set the HTTP method used for the last resource operation.
 void setHttpMethod(IClientMethod method)
           
 void setProperty(PropertyNameList.PropertyName name, java.lang.Object value)
          Adds or replaces the value of the specified property of this Resource.
 void setPropertyContainer(java.util.Map wantedProperties)
          Set the map of wanted properties
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dnsp

protected static org.jdom.Namespace dnsp

MISSING_PROPERTY_VALUE

public static java.lang.String MISSING_PROPERTY_VALUE
Constructor Detail

ResourceImpl

public ResourceImpl(Location location)
Constructor

Method Detail

getContentIdentifier

public java.lang.String getContentIdentifier()
                                      throws WvcmException
Return an implementation-defined String that identifies the persistent state of the resource. The semantics of a ContentIdentifier is similar to that of an HTTP ETag (see RFC-2616).

Specified by:
getContentIdentifier in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.CONTENT_IDENTIFIER as a wanted property.

setContentLanguage

public void setContentLanguage(java.util.Locale contentLanguage)
Sets the content language of the resource.

Specified by:
setContentLanguage in interface Resource
Parameters:
contentLanguage - The content language for the resource.

getAttribute

public java.lang.Object getAttribute(PropertyNameList.AttributeName name)
                              throws WvcmException
Return an attribute of this Resource.

Specified by:
getAttribute in interface Resource
Parameters:
name - The name of the attribute.
Throws:
WvcmException - if this Resource was not created with either PropertyName.ALL_ATTRIBUTES or the specified attribute as a wanted property.

doCopy

public void doCopy(java.lang.String destination,
                   boolean overwrite)
            throws WvcmException
Create a copy of the resource identified by this Resource at the location identified by the destination. The content of the copy is the same as the content of the resource identified by this Resource, but the properties of the copy are the default properties for a new resource.

Specified by:
doCopy in interface Resource
Parameters:
destination - The location of the new resource created by doCopy.
overwrite - If false the existence of a resource at the destination will cause the copy to fail; otherwise, doCopy will replace the destination resource.
Throws:
WvcmException - Preconditions:
(can-overwrite): If there already is a resource at the destination, overwrite MUST be true.
(cannot-copy-folder-version): This proxy MUST NOT identify a folder version.
(cannot-copy-history): If this proxy identifies a version history, the request MUST fail. In order to create another version history whose versions have the same content, the appropriate sequence of doControl, doCheckout, doWriteContent, and doCheckin requests must be made.

getCreationDate

public java.util.Date getCreationDate()
                               throws WvcmException
Return the date that the resource was originally created.

Specified by:
getCreationDate in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.CREATION_DATE as a wanted property

getModificationDate

public java.util.Date getModificationDate()
                                   throws WvcmException
NOT YET STANDARD Return the date that the resource was modified.

Specified by:
getModificationDate in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyNameList.PropertyName.MODIFICATION_DATE as a wanted property

getCreationUser

public Principal getCreationUser()
                          throws WvcmException
NOT YET STANDARD Return the principal that originally created the resource.

Specified by:
getCreationUser in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyNameList.PropertyName.CREATION_USER as a wanted property

getModificationUser

public Principal getModificationUser()
                              throws WvcmException
NOT YET STANDARD Return the principal that modified the resource.

Specified by:
getModificationUser in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyNameList.PropertyName.MODIFICATION_USER as a wanted property

location

public Location location()
Return the location of the persistent resource for which this Resource is a proxy.

The format of the location string is specific to the repository that stores the persistent resource. A URL, a UNC filename, and an NFS filename are examples of possible formats for a location string.

Specified by:
location in interface Resource

getContentLength

public long getContentLength()
                      throws WvcmException
Return the content length as an integer number of bytes.

Specified by:
getContentLength in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.CONTENT_LENGTH as a wanted property

doReadProperties

public Resource doReadProperties(PropertyNameList wantedPropertyList)
                          throws WvcmException
Return a Resource containing the wanted properties. If the property state is being maintained on both the client and the server, the client value is returned. A requested property named XXX can be retrieved from the resource with the getXxx method.

Specified by:
doReadProperties in interface Resource
Throws:
WvcmException

getCreatorDisplayName

public java.lang.String getCreatorDisplayName()
                                       throws WvcmException
Return a description of the user that created the resource, in a format that is suitable for display to an end user.

Specified by:
getCreatorDisplayName in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.CREATOR_DISPLAY_NAME as a wanted property.

getContentType

public java.lang.String getContentType()
                                throws WvcmException
Return a description of the media-type of the resource content. The format is a MIME type string (see RFC1590).

Specified by:
getContentType in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.CONTENT_TYPE as a wanted property.

setAttribute

public void setAttribute(PropertyNameList.AttributeName name,
                         java.lang.Object value)
Adds or replaces the value of the specified attribute of this Resource.

Specified by:
setAttribute in interface Resource
Parameters:
name - The name of the attribute.
value - The new value of the specified attribute.

getUpdatedPropertyList

public PropertyNameList getUpdatedPropertyList()
                                        throws WvcmException
Return the names of properties that have been updated in the proxy, but the updates have not yet been successfully applied to the resource.

Specified by:
getUpdatedPropertyList in interface Resource
Throws:
WvcmException

getComment

public java.lang.String getComment()
                            throws WvcmException
Return a comment describing this Resource that is suitable for display to a user.

Specified by:
getComment in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.COMMENT as a wanted property.

setContentType

public void setContentType(java.lang.String contentType)
Sets the content type of the resource.

Specified by:
setContentType in interface Resource
Parameters:
contentType - The content type for the resource.

removeAttribute

public void removeAttribute(PropertyNameList.AttributeName name)
Removes the specified attribute of this Resource.

Specified by:
removeAttribute in interface Resource
Parameters:
name - The name of the attribute.

setComment

public void setComment(java.lang.String comment)
Adds or replaces the comment string of this Resource.

Specified by:
setComment in interface Resource
Parameters:
comment - The new comment to apply to this Resource.

doWriteProperties

public void doWriteProperties()
                       throws WvcmException
Persists property changes to this Resource.

Specified by:
doWriteProperties in interface Resource
Throws:
WvcmException

setCreatorDisplayName

public void setCreatorDisplayName(java.lang.String val)
Adds or replaces the creator display name string of the resource.

Specified by:
setCreatorDisplayName in interface Resource
Parameters:
val - The new creator display name to apply to the resource.

getDisplayName

public java.lang.String getDisplayName()
                                throws WvcmException
Return a short description of the resource, in a format that is suitable for display to an end user in a tree display.

Specified by:
getDisplayName in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.DISPLAY_NAME as a wanted property.

getContentCharacterSet

public java.lang.String getContentCharacterSet()
                                        throws WvcmException
Return a description of the character set of the resource content (see RFC2278).

Specified by:
getContentCharacterSet in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.CONTENT_CHARACTER_SET as a wanted property.

doReadContent

public Resource doReadContent(PropertyNameList wantedPropertyList,
                              java.io.OutputStream content)
                       throws WvcmException
Return a resource containing the wanted properties. A requested property named XXX can be retrieved from the resource with the getXxx method. The resource content is written to content and content is closed. If state is being maintained on both the client and the server, the client state is retrieved.

Specified by:
doReadContent in interface Resource
Throws:
WvcmException

setDisplayName

public void setDisplayName(java.lang.String val)
Adds or replaces the display name string of the resource.

Specified by:
setDisplayName in interface Resource
Parameters:
val - The new display name to apply to the resource.

getContentLanguage

public java.util.Locale getContentLanguage()
                                    throws WvcmException
Return a description of the natural language used in the resource content. The format of the description is an ISO 3316 language string followed by an optional underscore and ISO 639 country code (see RFC1766).

Specified by:
getContentLanguage in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.COMMENT as a wanted property.

doWriteContent

public void doWriteContent(java.io.InputStream content,
                           java.lang.String contentIdentifier)
                    throws WvcmException
Persists content changes to a resource.

If content for a resource is being maintained persistently on both the client and the server, only the client copy of the content is updated.

If contentIdentifier matches the current state identifier of the persistent resource, the content of the resource is replaced with the bytes read from content, and content is then closed.

If reading from the stream throws a java.io.IOException, then no further data will be read from the stream, and after attempting to close the stream, a WvcmException wrapping the IOException will be thrown, possibly leading to incomplete data being stored on the resource.

Specified by:
doWriteContent in interface Resource
Throws:
WvcmException - if the resource identified by this Resource does not exist.

setContentCharacterSet

public void setContentCharacterSet(java.lang.String contentCharacterSet)
Sets the content character set of the resource.

Specified by:
setContentCharacterSet in interface Resource
Parameters:
contentCharacterSet - The content character set for the resource.

getLastModified

public java.util.Date getLastModified()
                               throws WvcmException
Return the date the content of the resource was last modified.

Specified by:
getLastModified in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.LAST_MODIFIED as a wanted property.

doSearch

public java.util.List doSearch(PropertyNameList wantedPropertyList,
                               SearchToken searchToken)
                        throws WvcmException
Return a list of Resource objects containing the wanted properties according to the conditions of the specified searct token from the scope defined by this Resource. A requested property named XXX can be retrieved from the resource with the getXxx method.

Specified by:
doSearch in interface Resource
Parameters:
wantedPropertyList - the wanted properties
searchToken - a SearchToken
Returns:
the result list
Throws:
WvcmException

getWorkspaceFolderList

public java.util.List getWorkspaceFolderList()
                                      throws WvcmException
Method getWorkspaceFolderList

Specified by:
getWorkspaceFolderList in interface Resource
Returns:
a List
Throws:
WvcmException

getProviderList

public java.util.List getProviderList()
                               throws WvcmException
Return a list of String objects that identify the names of providers for this resource, with the preferred providers specified earlier in the list.

Specified by:
getProviderList in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.PROVIDER_LIST as a wanted property.

getResourceIdentifier

public java.lang.String getResourceIdentifier()
                                       throws WvcmException
NOT YET STANDARD !!! Return the resource identifier. The resource identifier enables clients to determine whether two bindings are to the same resource. The value of this property is a URI, and may use any registered URI scheme that guarantees the uniqueness of the value across all resources for all time.

Specified by:
getResourceIdentifier in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.RESOURCE_ID as a wanted property.

getParentBindingList

public java.util.List getParentBindingList()
                                    throws WvcmException
NOT YET STANDARD !!! Return the list of parents of this resource. The parent-list property enables clients to discover what folders contain a binding to this resource (i.e. what folders have this resource as an internal member). The returned list contains javax.wvcm.Resource#ParentBinding instances.

Specified by:
getParentBindingList in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyName.PARENT_LIST as a wanted property.

accessor

protected ResourceAccessor accessor()
Get the accessor.

Returns:
a ResourceAccessor

folderAccessor

protected FolderAccessor folderAccessor()
Get the folder accessor for this resource.

Returns:
a FolderAccessor

folderAccessor

protected FolderAccessor folderAccessor(Resource r)
Get a folder accessor for the specified resource.

Returns:
a FolderAccessor

loadedProperties

protected ResourceImpl.LoadedProperties loadedProperties()
Get the stateContainer

Returns:
the loaded properties

getProperty

public java.lang.Object getProperty(PropertyNameList.PropertyName pname)
                             throws WvcmException
Get the specified property value.

Specified by:
getProperty in interface Resource
Parameters:
pname - the PropertyName
Returns:
the value
Throws:
WvcmException

setProperty

public void setProperty(PropertyNameList.PropertyName name,
                        java.lang.Object value)
Adds or replaces the value of the specified property of this Resource.

Specified by:
setProperty in interface Resource
Parameters:
name - a PropertyName
value - an Object

getPropertyContainer

public java.util.Map getPropertyContainer()
Get the container of loaded properties

Returns:
the container of loaded properties

setPropertyContainer

public void setPropertyContainer(java.util.Map wantedProperties)
Set the map of wanted properties

Parameters:
wantedProperties - the wanted properties

listOfSetProperties

public java.util.List listOfSetProperties()
Get list of created or modified properties

Returns:
a List

listOfRemovedAttributes

public java.util.List listOfRemovedAttributes()
Get list of removed attributes

Returns:
a List

commit

public void commit()
Called after successful doWriteProperties to reset the caches.


toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

doBind

public void doBind(Location destination,
                   boolean overwrite)
            throws WvcmException
Binds the resource identified by this Resource to the location identified by the destination. The content and properties of a resource are not modified by doBind.

Specified by:
doBind in interface Resource
Parameters:
destination - The location of the new binding to the resource.
overwrite - If false the existence of a resource at the destination will cause doBind to fail; otherwise, doBind will first unbind the existing resource at the destination.
Throws:
WvcmException - Preconditions:
(cannot-modify-destination-checked-in-parent): If this Resource is a controlled resource, the request MUST fail when the folder containing the destination location is a checked-in controlled folder.
(binding-allowed): This Resource supports multiple bindings to it.
(cross-server-binding): If this Resource is on another server from the folder that contains the destination, the destination server MUST support cross-server bindings.
(can-overwrite): If there already is a resource at the destination, overwrite MUST be true.
(cycle-allowed): If this Resource is a folder, and the folder that contains the destination is a member of this Resource, then the server MUST support cycles in the location namespace.
WvcmException - Postconditions:
(preserve-properties): The property values of the resource identified by this Resource MUST NOT have been modified by the doBind request unless this specification states otherwise.
(new-binding): The destination MUST identify the resource identified by this Resource.

getPropertyNameList

public PropertyNameList getPropertyNameList(boolean onlyAttributes)
                                     throws WvcmException
Return the list of names of properties available on this Resource.

Specified by:
getPropertyNameList in interface Resource
Parameters:
onlyAttributes - Only return the names of attributes.
Throws:
WvcmException

doUnbind

public void doUnbind()
              throws WvcmException
Unbinds the resource identified by the locator of this Resource. The deletion of a resource only guarantees that the resource is no longer accessible at the specified location; it does not affect its accessibility at other locations. If a folder is unbound, no resource is accessible at any location that has the location of the unbound folder as its prefix.

Specified by:
doUnbind in interface Resource
Throws:
WvcmException - Preconditions:
(cannot-modify-checked-in-parent): If this Resource identifies a controlled resource, the doUnbind MUST fail when the folder containing the controlled resource is a checked-in controlled folder.
(no-version-unbind): A server MAY fail an attempt to apply doUnbind to a version.
WvcmException - Postconditions:
(resource-unbound): There is no resource at the location identified by this Resource.
(unbind-activity-reference): If an activity is unbound, any reference to that activity in an ActivityList, SubactivityList, or CurrentActivityList MUST be removed.
(update-predecessor-list): If a version was unbound, the server MUST have replaced any reference to that version in a PredecessorList by a copy of the PredecessorList of the unbound version.
(version-history-has-root): If the request unbound the root version of a version history, the request MUST have updated the RootVersion of the version history to refer to another version that is an ancestor of all other remaining versions in that version history. A result of this postcondition is that every version history will have at least one version, and the only way to delete all versions is to unbind the version history resource.
(delete-version-reference): If a version is unbound, any reference to that version in a MergeList or AutoMergeList property MUST be removed.
(delete-version-set): If the request unbound a version history, the request MUST have unbound all versions in the VersionList of that version history, and MUST have satisfied the postconditions for version deletion.

doRebind

public void doRebind(Location destination,
                     boolean overwrite)
              throws WvcmException
Unbinds the resource identified by this Resource from its current location and binds it to the location identified by the destination. The content and properties of a resource are not modified by doRebind, except for the properties that are location dependent.

Specified by:
doRebind in interface Resource
Parameters:
destination - The new location of the resource.
overwrite - If false the existence of a resource at the destination will cause doRebind to fail; otherwise, doRebind will replace the destination resource.
Throws:
WvcmException - Preconditions:
(can-overwrite): If there already is a resource at the destination, overwrite MUST be true.
(cannot-modify-checked-in-parent): If this ControllableResource is a controlled resource, the request MUST fail when the folder containing this ControllableResource is a checked-in controlled folder.
(cannot-modify-destination-checked-in-parent): If this ControllableResource is a controlled resource, the request MUST fail when the folder containing the destination location is a checked-in controlled folder.
(cannot-rename-history): This proxy MUST NOT identify a version history.
(cannot-rename-version): If this proxy identifies a version, the request MUST fail.
WvcmException - Postconditions:
(preserve-properties): The property values of the resource identified by this Resource MUST NOT have been modified by the doRebind request unless this specification states otherwise.
(workspace-member-moved): If this Resource did not identify a workspace, the Workspace property MUST have been updated to have the same value as the Workspace of its parent folder at the destination location.
(workspace-moved): If this proxy identified a workspace, any reference to that workspace in a Workspace property MUST have been updated to refer to the new location of that workspace.
(update-checked-out-reference): If a checked-out resource is moved, any reference to that resource in a ActivityCheckoutList property MUST be updated to refer to the new location of that resource.
(update-workspace-reference): If this proxy identifies a workspace, any reference to that workspace in a CurrentWorkspaceList property MUST be updated to refer to the new location of that workspace.
(update-activity-reference): If this proxy identifies an activity, any reference to that activity in a ActivityList, SubactivityList, or CurrentActivityList MUST be updated to refer to the new location of that activity.

getSupportedPrivilegeList

public java.util.List getSupportedPrivilegeList()
                                         throws WvcmException
NOT YET STANDARD Return a list of AccessControlElement.Privilege objects defined for the resource.

Specified by:
getSupportedPrivilegeList in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyNameList.PropertyName.SUPPORTED_PRIVILEGE_LIST as a wanted property.

getOwner

public Principal getOwner()
                   throws WvcmException
NOT YET STANDARD Get the owner of this resource

Specified by:
getOwner in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyNameList.PropertyName.OWNER as a wanted property.

getPrivilegeFolderList

public java.util.List getPrivilegeFolderList()
                                      throws WvcmException
NOT YET STANDARD Return a list of Folder objects that identify folders that contain privileges.

Specified by:
getPrivilegeFolderList in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyNameList.PropertyName.PRIVILEGE_FOLDER_LIST as a wanted property.

getPrincipalFolderList

public java.util.List getPrincipalFolderList()
                                      throws WvcmException
NOT YET STANDARD Return a list of Folder objects that identify folders that contain principals.

Specified by:
getPrincipalFolderList in interface Resource
Throws:
WvcmException - if this Resource was not created with PropertyNameList.PropertyName.PRINCIPAL_FOLDER_LIST as a wanted property.

doWriteAccessControlList

public void doWriteAccessControlList(java.util.List acl)
                              throws WvcmException
NOT YET STANDARD Modifies the access control list (ACL) of this resource. Specifically, this method only permits modification to ACEs that are not inherited, and are not protected.

Specified by:
doWriteAccessControlList in interface Resource
Parameters:
acl - a list of AccessControlElement instances
Throws:
WvcmException

doReadAccessControlList

public java.util.List doReadAccessControlList(boolean includeInherited)
                                       throws WvcmException
NOT YET STANDARD Return the ACL of this resource. The ACL specifies the list of access control elements (ACEs), which define what principals are to get what privileges for this resource. Each ACE specifies the set of privileges to be either granted or denied to a single principal. If the ACL is empty, no principal is granted any privilege.

Specified by:
doReadAccessControlList in interface Resource
Parameters:
includeInherited - if false, only ACEs defined for the resource are returned; otherwise, the ACL includes all inherited ACEs
Returns:
a list of ACEs
Throws:
WvcmException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

addLockToken

public void addLockToken(LockToken lockToken)
Method addLockToken

Parameters:
lockToken - a LockToken

removeLockToken

public void removeLockToken(LockToken lockToken)

getLockTokens

public java.util.List getLockTokens()
                             throws WvcmException
NOT YET STANDARD Returns the list of lock tokens available at this resource.

Specified by:
getLockTokens in interface Resource
Returns:
a List
Throws:
WvcmException

getActiveLockTokens

public java.util.List getActiveLockTokens()
                                   throws WvcmException
Throws:
WvcmException

doLock

public void doLock(LockToken.Timeout timeout,
                   boolean deep)
            throws WvcmException
NOT YET STANDARD Locks this resource.

Specified by:
doLock in interface Resource
Parameters:
timeout - a Timeout
deep - a boolean
Throws:
WvcmException

doLock

public void doLock(LockToken.Timeout timeout,
                   boolean deep,
                   boolean exclusive,
                   java.lang.String owner)
            throws WvcmException
NOT YET STANDARD Locks this resource.

Specified by:
doLock in interface Resource
Parameters:
timeout - a Timeout
deep - a boolean
exclusive - a boolean
owner - a String
Throws:
WvcmException

doUnlock

public void doUnlock()
              throws WvcmException
NOT YET STANDARD Releases the active lock of this resource.

Specified by:
doUnlock in interface Resource
Throws:
WvcmException

doUnlock

public void doUnlock(LockToken lockToken)
              throws WvcmException
NOT YET STANDARD Releases the specified lock of this resource.

Specified by:
doUnlock in interface Resource
Parameters:
lockToken - a LockToken
Throws:
WvcmException

getHttpMethod

public org.apache.commons.httpclient.HttpMethod getHttpMethod()
NOT YET STANDARD Get the HTTP method used for the last resource operation.

Returns:
HTTP method (maybe null)

setHttpMethod

public void setHttpMethod(org.apache.commons.httpclient.HttpMethod method)
NOT YET STANDARD Set the HTTP method used for the last resource operation.

Parameters:
method - HTTP method (maybe null)

setHttpMethod

public void setHttpMethod(IClientMethod method)

getClientHttpMethod

public IClientMethod getClientHttpMethod()


Copyright (c) 2003 - Apache Software Foundation