org.apache.wvcm
Class VersionHistoryImpl

java.lang.Object
  extended by org.apache.wvcm.ResourceImpl
      extended by org.apache.wvcm.VersionHistoryImpl
All Implemented Interfaces:
Folder, Resource, VersionHistory

public class VersionHistoryImpl
extends ResourceImpl
implements VersionHistory

Implementation of VersionHistory.

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.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
VersionHistoryImpl(Location location)
          Constructor
 
Method Summary
 Version doLatestActivityVersionReport(Activity activity, PropertyNameList wantedPropertyList)
          Return latest version in this VersionHistory that is a product of the specified activity.
 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.
 java.util.List getBindingList()
          Return a list of Binding objects that identify the bound members of this Folder.
 Version getRootVersion()
          Return the root version of this VersionHistory.
 Folder getVersionByLabelFolder()
          Return the Folder that contains a bound member for each label that selects a version of this VersionHistory, where the label is the binding name of the member, and the labelled version is the bound resource.
 
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

VersionHistoryImpl

public VersionHistoryImpl(Location location)
Constructor

Method Detail

getRootVersion

public Version getRootVersion()
                       throws WvcmException
Return the root version of this VersionHistory. The root version has no predecessors, and each other versions in this VersionHistory is a descendant of the root version.

Specified by:
getRootVersion in interface VersionHistory
Throws:
WvcmException - if this VersionHistory was not created with PropertyName.ROOT_VERSION as a wanted property.

doLatestActivityVersionReport

public Version doLatestActivityVersionReport(Activity activity,
                                             PropertyNameList wantedPropertyList)
                                      throws WvcmException
Return latest version in this VersionHistory that is a product of the specified activity.

Specified by:
doLatestActivityVersionReport in interface VersionHistory
Parameters:
activity - The activity whose latest product is to be returned.
wantedPropertyList - The properties available in the returned proxies.
Throws:
WvcmException

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.

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.

getVersionByLabelFolder

public Folder getVersionByLabelFolder()
                               throws WvcmException
Return the Folder that contains a bound member for each label that selects a version of this VersionHistory, where the label is the binding name of the member, and the labelled version is the bound resource.

Specified by:
getVersionByLabelFolder in interface VersionHistory
Throws:
WvcmException - if this VersionHistory was not created with PropertyNameList.PropertyName.VERSION_BY_LABEL_FOLDER as a wanted property.


Copyright (c) 2003 - Apache Software Foundation