org.apache.wvcm
Class ControllableResourceImpl

java.lang.Object
  extended by org.apache.wvcm.ResourceImpl
      extended by org.apache.wvcm.ControllableResourceImpl
All Implemented Interfaces:
ControllableResource, Resource
Direct Known Subclasses:
ConfigurationImpl, ControllableFolderImpl

public class ControllableResourceImpl
extends ResourceImpl
implements ControllableResource

Implementation of ControllableResource.

Version:
$Revision: 1.1.1.1.2.4 $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wvcm.ResourceImpl
ResourceImpl.LoadedProperties, ResourceImpl.XmlPropertyValue
 
Nested classes/interfaces inherited from interface javax.wvcm.ControllableResource
ControllableResource.Conflict, ControllableResource.Ignore, ControllableResource.MergePreviewReport, ControllableResource.Update
 
Nested classes/interfaces inherited from interface javax.wvcm.Resource
Resource.GenericResourceImpl
 
Field Summary
 
Fields inherited from class org.apache.wvcm.ResourceImpl
dnsp, MISSING_PROPERTY_VALUE
 
Constructor Summary
ControllableResourceImpl(Location location)
          Constructor
 
Method Summary
 void doAddLabel(java.lang.String label)
          Apply ControllableResource.doAddLabel(java.lang.String) to the CheckedIn version of this ControllableResource.
 void doCheckin()
          Apply doCheckin(false, true)
 void doCheckin(boolean keepCheckedOut, boolean forkOK)
          Changes the state of the resource identified by this ControllableResource to be checked-in, and synchronizes the persistent state of the resource to be that of the persistent state on the client.
 void doCheckout()
          Apply doCheckout(true, null, false, false)
 void doCheckout(boolean forkOK, java.util.List activityList, boolean newActivity, boolean unreserved)
          Checkout this ControllableResource so that its content can be modified.
 void doControl()
          Require that the resource be checked out to be modified and checked in to commit the modifications.
 void doCreateResource()
          Create a new persistent resource at the location identified by this ControllableResource.
 void doCreateVersionControlledResource(Version v)
          Create a new controlled resource at the location identified by the proxy.
 ControllableResource doMerge(Version source, boolean noAutoMerge, boolean noCheckout, boolean forkOK, boolean unreserved, java.util.List activityList, boolean newActivity, PropertyNameList wantedPropertyList)
          Merge the version specified in source into the resource identified by this ControllableResource (the "target").
 ControllableResource.MergePreviewReport doMergePreviewReport(Version source)
          Return a MergePreviewReport indicating how the resource identified by this ControllableResource would be modified by a doMerge.
 Version doReadLabelledVersionProperties(java.lang.String label, PropertyNameList wantedPropertyList)
          Apply ControllableResource.doReadLabelledVersionProperties(java.lang.String, javax.wvcm.PropertyNameList) to the version history of this ControllableResource.
 java.util.Iterator doRefresh(PropertyNameList wantedPropertyList, boolean ignoreDirty)
          If both the client and the server are maintaining the persistent state of the resource identified by this ControllableResource, synchronizes the state on the client to be that of the server.
 void doRemoveLabel(java.lang.String label)
          Apply ControllableResource.doRemoveLabel(java.lang.String) to the CheckedIn version of this ControllableResource.
 void doSetLabel(java.lang.String label)
          Apply ControllableResource.doSetLabel(java.lang.String) to the CheckedIn version of this ControllableResource.
 void doUncheckout()
          Cancels the checkout of a version-controlled resource, and restores its content to the state of its CheckedOut version.
 java.util.Iterator doUpdate(Version v, PropertyNameList wantedPropertyList)
          Update the state of this checked-in version-controlled ControllableResource to be the same as the specified version from the version history of this ControllableResource.
 java.util.List getActivityList()
          If this ControllableResource is checked-out, return a list of Activity objects that identify the activities that will become the activityList of the version created when this ControllableResource is checked in; otherwise, return null/
 java.util.List getAutoMergeList()
          If this ControllableResource is checked-out, return a list of Version objects that identify the versions whose content has been merged by the server into the content of this ControllableResource; otherwise, return null.
 Version getCheckedIn()
          If this ControllableResource is checked-in, return whether the version whose content is identical to that of this ControllableResource; otherwise, return null.
 Version getCheckedOut()
          If this ControllableResource is checked-out, return the value of getCheckedIn when the checkout was performed; otherwise, return null.
 Configuration getControlledConfiguration()
          Return the version-controlled configuration of the baseline-controlled folder of which this ControllableResource is a member.
 PropertyNameList getDirtyPropertyList()
          Return the list of property values whose persistent state is being maintained on both the client and server, and whose client-side state has changed since the client and server state was last synchronized.
 boolean getIsCheckedOut()
          Return whether the resource identified by this ControllableResource is checked-out.
 boolean getIsDirtyContent()
          Return whether both the client and server are maintaining persistent state for the content of this ControllableResource, and whether the client content has changed since the client and server content was last synchronized.
 boolean getIsStaleContent()
          Return whether both the client and server are maintaining persistent state for the content of this ControllableResource, and whether the server content has changed since the client and server content was last synchronized.
 java.util.List getMergeList()
          If this ControllableResource is checked-out, return a list of Version objects that identify the versions whose content must be merged by the client into the content of this ControllableResource; otherwise, return null.
 java.util.List getPredecessorList()
          If this ControllableResource is checked-out, return a list of Version objects that identify the versions that will become the predecessors of the version created when this ControllableResource is checked in; otherwise, return null.
 ControllableResource getServerState()
          Return the ControllableResource that identifies the resource on the server that maintains the state for the client resource identified by this ControllableResource.
 PropertyNameList getStalePropertyList()
          Return the list of property values whose persistent state is being maintained on both the client and server, and whose server-side state has changed since the client and server state was last synchronized.
 boolean getUnreserved()
          Return whether this ControllableResource is checked-out, and whether another checkout of the same version can be made in the same activity as the one in the ActivitySet of this ControllableResource.
 boolean getVersionControllable()
          Return whether version history will be tracked when the resource is controlled.
 VersionHistory getVersionHistory()
          Return the version history of the CheckedIn or CheckedOut version.
 Workspace getWorkspace()
          Return the workspace of which this ControllableResource is a member.
 Resource readContent(PropertyNameList wantedPropertyList, java.io.OutputStream content)
          If the resource content is available on the client host, the resource content is written to content and content is closed.
 Resource readProperties(PropertyNameList wantedPropertyList)
          Return a Resource containing the wanted properties that are available on the client host without communicating with the server.
 void setActivityList(java.util.List activityList)
          Set the ActivityList property of this ControllableResource.
 void setAutoMergeList(java.util.List versionList)
          Set the AutoMergeList of this ControllableResource.
 void setMergeList(java.util.List versionList)
          Set the MergeList of this ControllableResource.
 void setPredecessorList(java.util.List versionList)
          Specify the versions that will be the predecessors of the version created when this ControllableResource is checked in.
 void setUnreserved(boolean val)
          Set the value of the Unreserved property of this ControllableResource.
 
Methods inherited from class org.apache.wvcm.ResourceImpl
accessor, addLockToken, commit, doBind, doCopy, doLock, doLock, doReadAccessControlList, doReadContent, doReadProperties, doRebind, doSearch, doUnbind, doUnlock, doUnlock, doWriteAccessControlList, doWriteContent, doWriteProperties, equals, folderAccessor, folderAccessor, getActiveLockTokens, getAttribute, getClientHttpMethod, getComment, getContentCharacterSet, getContentIdentifier, getContentLanguage, getContentLength, getContentType, getCreationDate, getCreationUser, getCreatorDisplayName, getDisplayName, getHttpMethod, getLastModified, getLockTokens, getModificationDate, getModificationUser, getOwner, getParentBindingList, getPrincipalFolderList, getPrivilegeFolderList, getProperty, getPropertyContainer, getPropertyNameList, getProviderList, getResourceIdentifier, getSupportedPrivilegeList, getUpdatedPropertyList, getWorkspaceFolderList, hashCode, listOfRemovedAttributes, listOfSetProperties, loadedProperties, location, removeAttribute, removeLockToken, setAttribute, setComment, setContentCharacterSet, setContentLanguage, setContentType, setCreatorDisplayName, setDisplayName, setHttpMethod, setHttpMethod, setProperty, setPropertyContainer, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.wvcm.Resource
doBind, doCopy, doLock, doLock, doReadAccessControlList, doReadContent, doReadProperties, doRebind, doSearch, doUnbind, doUnlock, doUnlock, doWriteAccessControlList, doWriteContent, doWriteProperties, getAttribute, getComment, getContentCharacterSet, getContentIdentifier, getContentLanguage, getContentLength, getContentType, getCreationDate, getCreationUser, getCreatorDisplayName, getDisplayName, getLastModified, getLockTokens, getModificationDate, getModificationUser, getOwner, getParentBindingList, getPrincipalFolderList, getPrivilegeFolderList, getProperty, getPropertyNameList, getProviderList, getResourceIdentifier, getSupportedPrivilegeList, getUpdatedPropertyList, getWorkspaceFolderList, location, removeAttribute, setAttribute, setComment, setContentCharacterSet, setContentLanguage, setContentType, setCreatorDisplayName, setDisplayName, setProperty
 

Constructor Detail

ControllableResourceImpl

public ControllableResourceImpl(Location location)
Constructor

Method Detail

getControlledConfiguration

public Configuration getControlledConfiguration()
                                         throws WvcmException
Return the version-controlled configuration of the baseline-controlled folder of which this ControllableResource is a member.

Specified by:
getControlledConfiguration in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.VERSION_CONTROLLED_CONFIGURATION as a wanted property.

setActivityList

public void setActivityList(java.util.List activityList)
Set the ActivityList property of this ControllableResource.

Specified by:
setActivityList in interface ControllableResource
Parameters:
activityList - A list of Activity objects that identify the new value for the ActivityList property.

doCreateResource

public void doCreateResource()
                      throws WvcmException
Create a new persistent resource at the location identified by this ControllableResource. The request will fail if a resource already exists at that location.

Specified by:
doCreateResource in interface ControllableResource
Throws:
WvcmException - Preconditions:
(resource-must-be-null): A resource MUST NOT exist at the location of this Resource.
(location-ok): The location of this Resource MUST identify a valid location to create this Resource. For a workspace, a client can determine locations where workspaces can be created from the WorkspaceFolderList property.
(workspace-server-location-specified): If the object being created is a workspace, and the persistent state of the workspace is stored on both the client and the server, the WorkspaceServerLocation property MUST identify the location of the server state for this Workspace.

doMerge

public ControllableResource doMerge(Version source,
                                    boolean noAutoMerge,
                                    boolean noCheckout,
                                    boolean forkOK,
                                    boolean unreserved,
                                    java.util.List activityList,
                                    boolean newActivity,
                                    PropertyNameList wantedPropertyList)
                             throws WvcmException
Merge the version specified in source into the resource identified by this ControllableResource (the "target"). If the target is checked-in, and the source version is a descendant of the target version, the target is updated to the source version. If the target is checked-in, and the source version is an ancestor of the target version, the target is left unmodified. If the target is checked-out, or if the target version is on a different line of descent than the source version, the target is checked out (if it is not already checked-out), and the source version is either added to the MergeList or the AutoMergeList of the target. If a source version is added to the AutoMergeList, the server must have updated the content of the target to contain the results of merging the content of the source version with the content of the target at the time of the merge.

Specified by:
doMerge in interface ControllableResource
Parameters:
source - The version to be merged.
noAutoMerge - The server is not allowed to auto-merge.
noCheckout - The server is not allowed to checkout files for merging.
forkOK - Passed into any checkout requests.
unreserved - Passed into any checkout requests.
activityList - Passed into any checkout requests.
newActivity - Passed into any checkout requests.
wantedPropertyList - The properties available in the returned proxy.
Returns:
A ControllableResource that contains the requested properties of the resource modified by the merge.
Throws:
WvcmException - Preconditions:
(checkout-not-allowed): If noCheckout is specified in the request, it MUST be possible to perform the merge without checking out the merge target. All preconditions of the doCheckout operation apply to any checkout performed by the request.
(must-not-update-baseline-folder): Same semantics as doUpdate.

getCheckedIn

public Version getCheckedIn()
                     throws WvcmException
If this ControllableResource is checked-in, return whether the version whose content is identical to that of this ControllableResource; otherwise, return null.

Specified by:
getCheckedIn in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.CHECKED_IN as a wanted property.

readProperties

public Resource readProperties(PropertyNameList wantedPropertyList)
                        throws WvcmException
Return a Resource containing the wanted properties that are available on the client host without communicating with the server.

Specified by:
readProperties in interface ControllableResource
Parameters:
wantedPropertyList - The properties available in the returned proxy.
Throws:
WvcmException
See Also:
doReadProperties

getCheckedOut

public Version getCheckedOut()
                      throws WvcmException
If this ControllableResource is checked-out, return the value of getCheckedIn when the checkout was performed; otherwise, return null.

Specified by:
getCheckedOut in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.CHECKED_OUT as a wanted property.

readContent

public Resource readContent(PropertyNameList wantedPropertyList,
                            java.io.OutputStream content)
                     throws WvcmException
If the resource content is available on the client host, the resource content is written to content and content is closed.

Specified by:
readContent in interface ControllableResource
Returns:
A Resource containing the wanted properties that are available on the client host without communicating with the server.
Throws:
WvcmException
See Also:
doReadContent

doAddLabel

public void doAddLabel(java.lang.String label)
                throws WvcmException
Apply ControllableResource.doAddLabel(java.lang.String) to the CheckedIn version of this ControllableResource.

Specified by:
doAddLabel in interface ControllableResource
Throws:
WvcmException

getPredecessorList

public java.util.List getPredecessorList()
                                  throws WvcmException
If this ControllableResource is checked-out, return a list of Version objects that identify the versions that will become the predecessors of the version created when this ControllableResource is checked in; otherwise, return null.

Specified by:
getPredecessorList in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.PREDECESSOR_LIST as a wanted property.

setPredecessorList

public void setPredecessorList(java.util.List versionList)
Specify the versions that will be the predecessors of the version created when this ControllableResource is checked in.

Specified by:
setPredecessorList in interface ControllableResource
Parameters:
versionList - A list of Version objects that will be the predecessors of the version created when this ControllableResource is checked in.

doControl

public void doControl()
               throws WvcmException
Require that the resource be checked out to be modified and checked in to commit the modifications. If the server tracks versions, each checkin creates a new version in the version history of the resource.

Specified by:
doControl in interface ControllableResource
Throws:
WvcmException - Preconditions:
(cannot-modify-checked-in-parent): If the parent of this ControllableResource is a checked-in controlled folder and this ControllableResource is not already under control, the request MUST fail.

doRemoveLabel

public void doRemoveLabel(java.lang.String label)
                   throws WvcmException
Apply ControllableResource.doRemoveLabel(java.lang.String) to the CheckedIn version of this ControllableResource.

Specified by:
doRemoveLabel in interface ControllableResource
Throws:
WvcmException

doCheckout

public void doCheckout(boolean forkOK,
                       java.util.List activityList,
                       boolean newActivity,
                       boolean unreserved)
                throws WvcmException
Checkout this ControllableResource so that its content can be modified.

Specified by:
doCheckout in interface ControllableResource
Parameters:
forkOK - Indicates whether to do the checkout even if the version already has a successor or a checkout.
activityList - A list of Activity objects that identify the activities to which the work on the checked-out resource will contribute.
newActivity - Indicates whether to create a new activity for the checkout.
unreserved - Indicates whether to do the checkout even if there already is a checkout from the currently selected version in one of the activities specified in the activityList.
Throws:
WvcmException - Preconditions:
(must-be-checked-in): The IsCheckedOut property of this ControllableResource MUST be false.
(must-not-be-stale): If the content is being maintained on both the client and server, the state on the server MUST NOT have changed since it was last synchronized with the state on the client.
(checkout-of-version-with-descendant-is-forbidden): If the CheckoutFork property of the version being checked out is FORBIDDEN, the request MUST fail if a version identifies that version in its PredecessorList.
(checkout-of-version-with-descendant-is-discouraged): If the CheckoutFork property of the version being checked out is DISCOURAGED, the request MUST fail if a version identifies that version in its PredecessorList unless forkOk is specified in the request.
(checkout-of-checked-out-version-is-forbidden): If the CheckoutFork property of the version being checked out is FORBIDDEN, the request MUST fail if a checked-out resource identifies that version in its CheckedOut property.
(checkout-of-checked-out-version-is-discouraged): If the CheckoutFork property of the version being checked out is DISCOURAGED, the request MUST fail if a checked-out resource identifies that version in its CheckedOut property unless forkOk is specified in the request.
(must-not-update-baseline-folder): If this ControllableResource identifies a member of the BaselineFolder of a baseline, the request MUST fail.
(one-checkout-per-activity-per-history): If there is a request activity set, unless Unreserved is specified, another checkout from a version of that version history MUST NOT select an activity in that activity set.
(linear-activity): If there is a request activity set, unless Unreserved is specified, the selected version MUST be a descendant of all other versions of that version history that select that activity.

doCheckin

public void doCheckin(boolean keepCheckedOut,
                      boolean forkOK)
               throws WvcmException
Changes the state of the resource identified by this ControllableResource to be checked-in, and synchronizes the persistent state of the resource to be that of the persistent state on the client. If version history is being tracked for the resource, the current content of the resource is captured in a new version resource at a server-defined location.

Specified by:
doCheckin in interface ControllableResource
Parameters:
keepCheckedOut - indicates whether to checkout the resource again immediately after checking it in. If keepCheckedOut is true, the ActivityList and Unreserved properties should not be changed by the checkout.
forkOK - indicates whether to fork even if forking is discouraged.
Throws:
WvcmException - Preconditions:
(must-be-checked-out): This ControllableResource MUST identify a resource whose IsCheckedOut property is true.
(must-not-be-stale): If the content is being maintained on both the client and server, the state on the server MUST NOT have changed since it was last synchronized with the state on the client.
(version-history-is-tree) The versions identified by the PredecessorList of the checked-out resource MUST be descendants of the root version of the version history for the CheckedOut version.
(checkin-fork-forbidden): A doCheckin request MUST fail if it would cause a version whose CheckinFork is FORBIDDEN to appear in the PredecessorList of more than one version.
(checkin-fork-discouraged): A doCheckin request MUST fail if it would cause a version whose CheckinFork is DISCOURAGED to appear in the PredecessorList of more than one version, unless forkOk is specified in the request.
(merge-must-be-complete): The MergeList and AutoMergeList of the checked-out resource MUST be empty or not exist.
(linear-activity): Any version which is in the version history of the checked-out resource and whose ActivityList identifies an activity from the ActivityList of the checked-out resource MUST be an ancestor of the checked-out resource.
(no-checked-out-baseline-controlled-folder-members): If this ControllableResource identifies a version-controlled configuration, all version-controlled members of the RootFolder of the version-controlled configuration MUST be checked-in.
(one-version-per-history-per-baseline): If this ControllableResource identifies a version-controlled configuration, the set of versions selected by that version-controlled configuration MUST contain at most one version from any version history, where a version is selected by a version-controlled configuration if the version is identified by the CheckedIn property of any member of the baseline-controlled folder of that version-controlled configuration, or is identified by the CheckedIn property of any member of the BaselineFolder of any sub-baseline of that version-controlled configuration.

doCheckin

public void doCheckin()
               throws WvcmException
Apply doCheckin(false, true)

Specified by:
doCheckin in interface ControllableResource
Throws:
WvcmException

getActivityList

public java.util.List getActivityList()
                               throws WvcmException
If this ControllableResource is checked-out, return a list of Activity objects that identify the activities that will become the activityList of the version created when this ControllableResource is checked in; otherwise, return null/

Specified by:
getActivityList in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.ACTIVITY_LIST as a wanted property.

doMergePreviewReport

public ControllableResource.MergePreviewReport doMergePreviewReport(Version source)
                                                             throws WvcmException
Return a MergePreviewReport indicating how the resource identified by this ControllableResource would be modified by a doMerge.

Specified by:
doMergePreviewReport in interface ControllableResource
Parameters:
source - The version to be merged.
Throws:
WvcmException

doUncheckout

public void doUncheckout()
                  throws WvcmException
Cancels the checkout of a version-controlled resource, and restores its content to the state of its CheckedOut version.

Specified by:
doUncheckout in interface ControllableResource
Throws:
WvcmException - Preconditions:
(must-be-checked-out-version-controlled-resource): This ControllableResource MUST identify a version-controlled resource with a CheckedOut property.

getIsCheckedOut

public boolean getIsCheckedOut()
                        throws WvcmException
Return whether the resource identified by this ControllableResource is checked-out.

Specified by:
getIsCheckedOut in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.IS_CHECKED_OUT as a wanted property.

setMergeList

public void setMergeList(java.util.List versionList)
Set the MergeList of this ControllableResource. In particular, a client is responsible for deleting versions from the MergeList after the user has verified that the current content represents a correct merge of that version.

Specified by:
setMergeList in interface ControllableResource
Parameters:
versionList - A list of Version objects that will be the value of the MergeList property.

doUpdate

public java.util.Iterator doUpdate(Version v,
                                   PropertyNameList wantedPropertyList)
                            throws WvcmException
Update the state of this checked-in version-controlled ControllableResource to be the same as the specified version from the version history of this ControllableResource.

Specified by:
doUpdate in interface ControllableResource
Parameters:
v - The version specifying the new state of the resource identified by this ControllableResource.
wantedPropertyList - The list of properties that will be available on each ControllableResource in the result.
Returns:
An iterator of ControllableResource objects that have been modified as a result of the doUpdate request. Each version-controlled resource contains a value for each of the properties specified in the WantedPropertyList.
Throws:
WvcmException - Preconditions:
(version-in-version-history): The Version argument must identify a version from the version history of this ControllableResource.
(must-not-update-baseline-folder): If this ControllableResource identifies a member of the BaselineFolder of a baseline, the request MUST fail.
(baseline-controlled-members-must-be-checked-in): If this ControllableResource identifies a version-controlled configuration, then all version-controlled members of the RootFolder of that version-controlled configuration MUST be checked-in.

getUnreserved

public boolean getUnreserved()
                      throws WvcmException
Return whether this ControllableResource is checked-out, and whether another checkout of the same version can be made in the same activity as the one in the ActivitySet of this ControllableResource.

Specified by:
getUnreserved in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.UNRESERVED as a wanted property.

doRefresh

public java.util.Iterator doRefresh(PropertyNameList wantedPropertyList,
                                    boolean ignoreDirty)
                             throws WvcmException
If both the client and the server are maintaining the persistent state of the resource identified by this ControllableResource, synchronizes the state on the client to be that of the server. If this ControllableResource is a Folder, every resource in the configuration rooted at that folder is refreshed.

Specified by:
doRefresh in interface ControllableResource
Parameters:
wantedPropertyList - The properties available in the returned proxies.
ignoreDirty - If true, the content should be downloaded even if it has been changed on the client since the last download from the server (thereby overwriting those changes). If false, the content should be downloaded only if it is unchanged since the last download.
Returns:
An iterator of ControllableResource objects that are dirty or stale
Throws:
WvcmException - Preconditions:
(must-not-be-dirty): If IgnoreDirty is false, then the state on the client MUST NOT have changed since it was last synchronized with the state on the server.

getServerState

public ControllableResource getServerState()
                                    throws WvcmException
Return the ControllableResource that identifies the resource on the server that maintains the state for the client resource identified by this ControllableResource. If this Controllable resource only has state on the server or only has state on the client, null is returned.

Specified by:
getServerState in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.SERVER_STATE as a wanted property.
See Also:
Workspace.setServerState(javax.wvcm.Workspace)

setUnreserved

public void setUnreserved(boolean val)
Set the value of the Unreserved property of this ControllableResource.

Specified by:
setUnreserved in interface ControllableResource
Parameters:
val - The new value for the Unreserved property of this ControllableResource.

getAutoMergeList

public java.util.List getAutoMergeList()
                                throws WvcmException
If this ControllableResource is checked-out, return a list of Version objects that identify the versions whose content has been merged by the server into the content of this ControllableResource; otherwise, return null.

Specified by:
getAutoMergeList in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.AUTO_MERGE_LIST as a wanted property.

getIsStaleContent

public boolean getIsStaleContent()
                          throws WvcmException
Return whether both the client and server are maintaining persistent state for the content of this ControllableResource, and whether the server content has changed since the client and server content was last synchronized.

Specified by:
getIsStaleContent in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.IS_STALE_CONTENT as a wanted property.

getMergeList

public java.util.List getMergeList()
                            throws WvcmException
If this ControllableResource is checked-out, return a list of Version objects that identify the versions whose content must be merged by the client into the content of this ControllableResource; otherwise, return null.

Specified by:
getMergeList in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.MERGE_LIST as a wanted property.

getIsDirtyContent

public boolean getIsDirtyContent()
                          throws WvcmException
Return whether both the client and server are maintaining persistent state for the content of this ControllableResource, and whether the client content has changed since the client and server content was last synchronized.

Specified by:
getIsDirtyContent in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.IS_DIRTY_CONTENT as a wanted property.

doSetLabel

public void doSetLabel(java.lang.String label)
                throws WvcmException
Apply ControllableResource.doSetLabel(java.lang.String) to the CheckedIn version of this ControllableResource.

Specified by:
doSetLabel in interface ControllableResource
Throws:
WvcmException

doReadLabelledVersionProperties

public Version doReadLabelledVersionProperties(java.lang.String label,
                                               PropertyNameList wantedPropertyList)
                                        throws WvcmException
Apply ControllableResource.doReadLabelledVersionProperties(java.lang.String, javax.wvcm.PropertyNameList) to the version history of this ControllableResource.

Specified by:
doReadLabelledVersionProperties in interface ControllableResource
Throws:
WvcmException

getStalePropertyList

public PropertyNameList getStalePropertyList()
                                      throws WvcmException
Return the list of property values whose persistent state is being maintained on both the client and server, and whose server-side state has changed since the client and server state was last synchronized.

Specified by:
getStalePropertyList in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.STALE_PROPERTY_LIST as a wanted property.

doCheckout

public void doCheckout()
                throws WvcmException
Apply doCheckout(true, null, false, false)

Specified by:
doCheckout in interface ControllableResource
Throws:
WvcmException

setAutoMergeList

public void setAutoMergeList(java.util.List versionList)
Set the AutoMergeList of this ControllableResource. A client is responsible for deleting entries from the AutoMergeList after the user has verified that the automatic merge was performed correctly by the server.

Specified by:
setAutoMergeList in interface ControllableResource
Parameters:
versionList - A list of Version objects that identify the new value for the AutoMergeList property.

getDirtyPropertyList

public PropertyNameList getDirtyPropertyList()
                                      throws WvcmException
Return the list of property values whose persistent state is being maintained on both the client and server, and whose client-side state has changed since the client and server state was last synchronized.

Specified by:
getDirtyPropertyList in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.DIRTY_PROPERTY_LIST as a wanted property.

getVersionControllable

public boolean getVersionControllable()
                               throws WvcmException
Return whether version history will be tracked when the resource is controlled.

Specified by:
getVersionControllable in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.VERSION_CONTROLLABLE as a wanted property.
See Also:
doControl

doCreateVersionControlledResource

public void doCreateVersionControlledResource(Version v)
                                       throws WvcmException
Create a new controlled resource at the location identified by the proxy. The resource is associated with an existing version history, and is initialized with a specified version from that version history. The request will fail if a resource already exists at that location.

Specified by:
doCreateVersionControlledResource in interface ControllableResource
Parameters:
v - The version used to initialize the controlled resource.
Throws:
WvcmException - Preconditions:
(cannot-modify-checked-in-parent): If the parent of this ControllableResource is a checked-in version-controlled folder, the request MUST fail.
(cannot-add-to-existing-history): This ControllableResource MUST NOT identify an existing resource.
(one-version-controlled-resource-per-history-per-workspace): There MUST NOT already be a version-controlled member in the workspace of this ControllableResource whose CheckedIn or CheckedOut property identifies any version from the version history of the version specified in the request.

getVersionHistory

public VersionHistory getVersionHistory()
                                 throws WvcmException
Return the version history of the CheckedIn or CheckedOut version.

Specified by:
getVersionHistory in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.VERSION_HISTORY as a wanted property.

getWorkspace

public Workspace getWorkspace()
                       throws WvcmException
Return the workspace of which this ControllableResource is a member. By definition, the workspace property of a workspace identifies itself, and the workspace property of any other type of resource must identify the same workspace as its parent.

Specified by:
getWorkspace in interface ControllableResource
Throws:
WvcmException - if this ControllableResource was not created with PropertyName.WORKSPACE as a wanted property.


Copyright (c) 2003 - Apache Software Foundation