org.apache.wvcm
Class WorkspaceImpl

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

public class WorkspaceImpl
extends ControllableFolderImpl
implements Workspace

Implementation of Workspace.

Version:
$Revision: 1.1.1.1.2.3 $

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
WorkspaceImpl(Location location)
          Constructor
 
Method Summary
 void doCreateResource()
          Create a new persistent resource at the location identified by this ControllableResource.
 java.util.Iterator doMerge(java.util.List sourceList, boolean checkinActivity, boolean noAutoMerge, boolean noCheckout, boolean forkOK, boolean unreserved, java.util.List activityList, boolean newActivity, PropertyNameList wantedPropertyList)
          Merge the versions specified in the sourceList into this ControllableResource.
 java.util.Iterator doMergePreviewReport(java.util.List sourceList)
          Return an iterator of MergePreviewReport objects, indicating what resources would be modified by a doMerge.
 java.util.List getActivityFolderList()
          Return a list of Folder objects that identify folders that can contain activities for this Workspace.
 java.util.List getBaselineControlledFolderList()
          Return a list of Folder objects that identify the folders that are the roots of the baseline-controlled configurations in that workspace.
 java.util.List getCurrentActivityList()
          Return a list of Activity objects that identify the activities that will initialize the ActivityList property of a version-controlled member of this Workspace when that member is checked out and no explicit ActivityList is specified in the checkout request.
 java.util.List getVersionHistoryFolderList()
          Return a list of Folder objects that identify folders that can contain version histories for this Workspace.
 java.util.List getWorkspaceCheckoutList()
          Return a list of ControllableResource objects that identify the members of this Workspace that are checked-out version-controlled resources.
 void setCurrentActivityList(java.util.List activityList)
          Set the CurrentActivityList property.
 void setServerState(Workspace workspace)
          When this Workspace is located on the client, this routine is used to specify the Workspace on the server that maintains the server state for this Workspace This property must be set before creating a workspace that is located on the client.
 
Methods inherited from class org.apache.wvcm.ControllableFolderImpl
doBaselineControl, doBaselineControl, doLocateByHistoryReport, doReadMemberList, getBaselineControllable, getBindingList, getEclipsedList, readMemberList
 
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.Workspace
doLocateByHistoryReport
 
Methods inherited from interface javax.wvcm.ControllableFolder
doBaselineControl, doBaselineControl, getBaselineControllable, getEclipsedList, readMemberList
 
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.Folder
doReadMemberList, getBindingList
 
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

WorkspaceImpl

public WorkspaceImpl(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 ControllableFolderImpl
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.

setServerState

public void setServerState(Workspace workspace)
When this Workspace is located on the client, this routine is used to specify the Workspace on the server that maintains the server state for this Workspace This property must be set before creating a workspace that is located on the client.

Specified by:
setServerState in interface Workspace
Parameters:
workspace - The Workspace located on the server that maintains the server state for this Workspace.
See Also:
ControllableResource.getServerState()

getWorkspaceCheckoutList

public java.util.List getWorkspaceCheckoutList()
                                        throws WvcmException
Return a list of ControllableResource objects that identify the members of this Workspace that are checked-out version-controlled resources.

Specified by:
getWorkspaceCheckoutList in interface Workspace
Throws:
WvcmException - if this Workspace was not created with PropertyName.WORKSPACE_CHECKOUT_LIST as a wanted property.

getActivityFolderList

public java.util.List getActivityFolderList()
                                     throws WvcmException
Return a list of Folder objects that identify folders that can contain activities for this Workspace. This list is empty if this Workspace does not provide activity support.

Specified by:
getActivityFolderList in interface Workspace
Throws:
WvcmException - if this Workspace was not created with PropertyName.ACTIVITY_FOLDER_LIST as a wanted property.

doMerge

public java.util.Iterator doMerge(java.util.List sourceList,
                                  boolean checkinActivity,
                                  boolean noAutoMerge,
                                  boolean noCheckout,
                                  boolean forkOK,
                                  boolean unreserved,
                                  java.util.List activityList,
                                  boolean newActivity,
                                  PropertyNameList wantedPropertyList)
                           throws WvcmException
Merge the versions specified in the sourceList into this ControllableResource. The "target" of a particular source version is the version-controlled member of the workspace identified by this Workspace that is associated with the version history for that version.

Specified by:
doMerge in interface Workspace
Parameters:
sourceList - A list of Resource objects that identifies the versions to be merged. If a member of sourceList is an activity, each version in the ActivityVersionList is a source version. If a member of sourceList is a version-controlled resource, the checked-in version of the member is a source version. If a member of sourceList is a folder, all members of the configuration rooted at that folder are considered members of the sourceList.
checkinActivity - If a member of the sourceList is an activity, apply doCheckin to that activity before performing the merge.
noAutoMerge - See ControllableResource#doMerge.
noCheckout - See ControllableResource#doMerge.
forkOK - See ControllableResource#doMerge.
unreserved - See ControllableResource#doMerge.
activityList - See ControllableResource#doMerge.
newActivity - See ControllableResource#doMerge.
wantedPropertyList - See ControllableResource#doMerge.
Returns:
An iterator of ControllableResource objects that identifies the resources modified by the merge.
Throws:
WvcmException - Preconditions:
(cannot-merge-checked-out-resource): The sourceList argument member MUST NOT identify a checked-out resource. If the sourceList argument member identifies a folder, the folder MUST NOT have a member that is a checked-out resource.

getVersionHistoryFolderList

public java.util.List getVersionHistoryFolderList()
                                           throws WvcmException
Return a list of Folder objects that identify folders that can contain version histories for this Workspace. This list is empty if this Workspace does not provide versioning support.

Specified by:
getVersionHistoryFolderList in interface Workspace
Throws:
WvcmException - if this Workspace was not created with PropertyName.VERSION_HISTORY_FOLDER_LIST as a wanted property.

getBaselineControlledFolderList

public java.util.List getBaselineControlledFolderList()
                                               throws WvcmException
Return a list of Folder objects that identify the folders that are the roots of the baseline-controlled configurations in that workspace.

Specified by:
getBaselineControlledFolderList in interface Workspace
Throws:
WvcmException - if this Workspace was not created with PropertyName.BASELINE_CONTROLLED_FOLDER_LIST as a wanted property.

getCurrentActivityList

public java.util.List getCurrentActivityList()
                                      throws WvcmException
Return a list of Activity objects that identify the activities that will initialize the ActivityList property of a version-controlled member of this Workspace when that member is checked out and no explicit ActivityList is specified in the checkout request.

Specified by:
getCurrentActivityList in interface Workspace
Throws:
WvcmException - if this Workspace was not created with PropertyName.CURRENT_ACTIVITY_LIST as a wanted property.

setCurrentActivityList

public void setCurrentActivityList(java.util.List activityList)
Set the CurrentActivityList property.

Specified by:
setCurrentActivityList in interface Workspace
Parameters:
activityList - The list of Activity objects that identify the new CurrentActivityList for this Workspace.

doMergePreviewReport

public java.util.Iterator doMergePreviewReport(java.util.List sourceList)
                                        throws WvcmException
Return an iterator of MergePreviewReport objects, indicating what resources would be modified by a doMerge.

Specified by:
doMergePreviewReport in interface Workspace
Parameters:
sourceList - A list of Resource objects that identify the versions to be merged.
Throws:
WvcmException


Copyright (c) 2003 - Apache Software Foundation