org.apache.wvcm
Class ControllableFolderImpl

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

public class ControllableFolderImpl
extends ControllableResourceImpl
implements ControllableFolder

Implementation of Folder.

Version:
$Revision: 1.1.1.1.2.5 $

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.Folder
Folder.Binding
 
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
ControllableFolderImpl(Location location)
          Constructor
 
Method Summary
 void doBaselineControl()
          Put this Folder under baseline control.
 void doBaselineControl(Baseline baseline)
          Put this Folder under baseline control and initialize it with the contents of the specified baseline.
 void doCreateResource()
          Create a new persistent resource at the location identified by this ControllableResource.
 java.util.List doLocateByHistoryReport(java.util.List versionHistoryList, PropertyNameList wantedPropertyList)
          Return a list of ControllableResource objects that identify the controllable resources that are members of this Workspace and whose versionHistory property identifies a member of the versionHistoryList parameter.
 java.util.Iterator doReadMemberList(PropertyNameList wantedPropertyList, boolean deep)
          Return an iterator of Resource objects that contain properties of the resources that are bound members of this Folder.
 boolean getBaselineControllable()
          Return whether the folder can be put under baseline control.
 java.util.List getBindingList()
          Return a list of Binding objects that identify the bound members of this Folder.
 java.util.List getEclipsedList()
          Return a list of String objects that identify the names of version-controlled resources in this Folder that are eclipsed by non-version-controlled resources.
 java.util.Iterator readMemberList(PropertyNameList wantedPropertyList, boolean deep)
          Return an iterator of Resource objects that contain locally available properties of the resources that are locally known as members of this Folder.
 
Methods inherited from class org.apache.wvcm.ControllableResourceImpl
doAddLabel, doCheckin, doCheckin, doCheckout, doCheckout, doControl, doCreateVersionControlledResource, doMerge, doMergePreviewReport, doReadLabelledVersionProperties, doRefresh, doRemoveLabel, doSetLabel, doUncheckout, doUpdate, getActivityList, getAutoMergeList, getCheckedIn, getCheckedOut, getControlledConfiguration, getDirtyPropertyList, getIsCheckedOut, getIsDirtyContent, getIsStaleContent, getMergeList, getPredecessorList, getServerState, getStalePropertyList, getUnreserved, getVersionControllable, getVersionHistory, getWorkspace, readContent, readProperties, setActivityList, setAutoMergeList, setMergeList, setPredecessorList, setUnreserved
 
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.ControllableResource
doAddLabel, doCheckin, doCheckin, doCheckout, doCheckout, doControl, doCreateVersionControlledResource, doMerge, doMergePreviewReport, doReadLabelledVersionProperties, doRefresh, doRemoveLabel, doSetLabel, doUncheckout, doUpdate, getActivityList, getAutoMergeList, getCheckedIn, getCheckedOut, getControlledConfiguration, getDirtyPropertyList, getIsCheckedOut, getIsDirtyContent, getIsStaleContent, getMergeList, getPredecessorList, getServerState, getStalePropertyList, getUnreserved, getVersionControllable, getVersionHistory, getWorkspace, readContent, readProperties, setActivityList, setAutoMergeList, setMergeList, setPredecessorList, setUnreserved
 
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

ControllableFolderImpl

public ControllableFolderImpl(Location location)
Constructor

Method Detail

doCreateResource

public void doCreateResource()
                      throws WvcmException
Description copied from class: ControllableResourceImpl
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
Overrides:
doCreateResource in class ControllableResourceImpl
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.

getBaselineControllable

public boolean getBaselineControllable()
                                throws WvcmException
Return whether the folder can be put under baseline control.

Specified by:
getBaselineControllable in interface ControllableFolder
Throws:
WvcmException - if this Folder was not created with PropertyName.BASELINE_CONTROLLABLE as a wanted property.
See Also:
doBaselineControl(javax.wvcm.Baseline)

doBaselineControl

public void doBaselineControl(Baseline baseline)
                       throws WvcmException
Put this Folder under baseline control and initialize it with the contents of the specified baseline.

Specified by:
doBaselineControl in interface ControllableFolder
Parameters:
baseline - The baseline used to initialize the folder. Preconditions: (cannot-add-to-existing-history): This Folder MUST NOT identify an existing resource. (one-baseline-controlled-folder-per-history-per-workspace): There MUST NOT be another folder in the workspace of this Folder whose ControlledConfiguration property identifies a version-controlled configuration for the baseline history of that baseline. Postconditions: (create-controlled-configuration): A new folder is created at the location of this Folder, and a new version-controlled configuration is created, whose RootFolder property identifies the new folder. The ControlledConfiguration property of the new folder identifies the new version-controlled configuration. (select-existing-baseline): The CheckedIn property of the new version-controlled configuration MUST have been set to identify the specified baseline. A version-controlled member of the folder will be created for each version in the baseline, where the version-controlled member will have the content of that version, and will have the same name relative to the folder as the corresponding version-controlled resource had when the baseline was created. Any nested folders that are needed to provide the appropriate name for a version-controlled member will be created.
Throws:
WvcmException - Preconditions:
(cannot-add-to-existing-history): This ControllableFolder MUST NOT identify an existing resource.
(one-baseline-controlled-folder-per-history-per-workspace): There MUST NOT be another folder in the workspace of this ControllableFolder whose ControlledConfiguration property identifies a version-controlled configuration for the baseline history of that baseline.

readMemberList

public java.util.Iterator readMemberList(PropertyNameList wantedPropertyList,
                                         boolean deep)
                                  throws WvcmException
Return an iterator of Resource objects that contain locally available properties of the resources that are locally known as members of this Folder. Locally available information is information that is available on the client host without communicating with the server.

Specified by:
readMemberList in interface ControllableFolder
Parameters:
wantedPropertyList - The list of properties to be retrieved.
deep - Whether to retrieve properties for all members of this Folder.
Throws:
WvcmException
See Also:
doReadMemberList(javax.wvcm.PropertyNameList, boolean)

getEclipsedList

public java.util.List getEclipsedList()
                               throws WvcmException
Return a list of String objects that identify the names of version-controlled resources in this Folder that are eclipsed by non-version-controlled resources.

Specified by:
getEclipsedList in interface ControllableFolder
Throws:
WvcmException - if this Folder was not created with PropertyName.ECLIPSED_LIST as a wanted property.

doBaselineControl

public void doBaselineControl()
                       throws WvcmException
Put this Folder under baseline control.

A version-controlled configuration resource is associated with this Folder, which allows versions of the configuration rooted at this Folder to be created by checking out and checking in the version-controlled configuration resource.

A version of a configuration is called a "baseline".

Specified by:
doBaselineControl in interface ControllableFolder
Throws:
WvcmException - Preconditions:
(controlled-configuration-must-not-exist): The ControlledConfiguration property of the folder identified by this ControllableFolder MUST NOT exist.

getBindingList

public java.util.List getBindingList()
                              throws WvcmException
Return a list of Binding objects that identify the bound members of this Folder.

Specified by:
getBindingList in interface Folder
Throws:
WvcmException - if this Folder was not created with PropertyNameList.PropertyName.BINDING_LIST as a wanted property.

doReadMemberList

public java.util.Iterator doReadMemberList(PropertyNameList wantedPropertyList,
                                           boolean deep)
                                    throws WvcmException
Return an iterator of Resource objects that contain properties of the resources that are bound members of this Folder. If deep is true, then all members of the folder (including this Folder) are included.

Specified by:
doReadMemberList in interface Folder
Parameters:
wantedPropertyList - The list of properties to be retrieved.
deep - Whether to retrieve properties for all members of this Folder.
Throws:
WvcmException - Postconditions:
(read-bound-members): The result contains a proxy for each bound member of the folder.
(read-all-members): If deep is true, the result contains a proxy for every member of the folder identified by this Folder.

doLocateByHistoryReport

public java.util.List doLocateByHistoryReport(java.util.List versionHistoryList,
                                              PropertyNameList wantedPropertyList)
                                       throws WvcmException
Return a list of ControllableResource objects that identify the controllable resources that are members of this Workspace and whose versionHistory property identifies a member of the versionHistoryList parameter.

Specified by:
doLocateByHistoryReport in interface ControllableFolder
Parameters:
versionHistoryList - A list of VersionHistory objects that are being located.
wantedPropertyList - The properties to be retrieved for the returned version-controlled resources.
Throws:
WvcmException


Copyright (c) 2003 - Apache Software Foundation