Class VersionHistoryResource
- java.lang.Object
-
- org.exoplatform.services.jcr.webdav.resource.GenericResource
-
- org.exoplatform.services.jcr.webdav.resource.VersionHistoryResource
-
- All Implemented Interfaces:
Resource,PropertyConstants
public class VersionHistoryResource extends GenericResource
Created by The eXo Platform SARL .- Version:
- $Id: $
- Author:
- Gennady Azarenkov
-
-
Field Summary
Fields Modifier and Type Field Description protected VersionedResourceversionedResourceVersioned resource.protected javax.jcr.version.VersionHistoryversionHistoryHistory of versions.-
Fields inherited from class org.exoplatform.services.jcr.webdav.resource.GenericResource
identifier, namespaceContext, PRESET_PROP, type
-
Fields inherited from interface org.exoplatform.services.jcr.webdav.util.PropertyConstants
CHILDCOUNT, CREATION_PATTERN, CREATIONDATE, DAV_ALLPROP, DAV_ALLPROP_INCLUDE, DISPLAYNAME, EXCLUSIVE, GETCONTENTLANGUAGE, GETCONTENTLENGTH, GETCONTENTTYPE, GETLASTMODIFIED, HASCHILDREN, IS_READ_ONLY, ISCOLLECTION, ISFOLDER, ISROOT, ISVERSIONED, JCR_CONTENT, JCR_DATA, LOCKDISCOVERY, LOCKSCOPE, LOCKTYPE, MODIFICATION_PATTERN, ORDERING_TYPE, OWNER, PARENTNAME, RESOURCETYPE, SUPPORTEDLOCK, SUPPORTEDMETHODSET, WRITE
-
Fields inherited from interface org.exoplatform.services.jcr.webdav.resource.Resource
COLLECTION, FILE, NULL, VERSION, VERSION_HISTORY, VERSIONED_COLLECTION, VERSIONED_FILE
-
-
Constructor Summary
Constructors Constructor Description VersionHistoryResource(URI identifier, javax.jcr.version.VersionHistory versionHistory, VersionedResource versionedResource, WebDavNamespaceContext namespaceContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.exoplatform.common.util.HierarchicalPropertygetProperty(QName name)VersionResourcegetVersion(String name)Returns the version of resouce by name.Set<VersionResource>getVersions()Returns all versions of a resource.booleanisCollection()protected URIversionURI(String versionName)Returns URI of the resource version.-
Methods inherited from class org.exoplatform.services.jcr.webdav.resource.GenericResource
decodeValue, getIdentifier, getNamespaceContext, getProperties, getType, lockDiscovery, supportedLock, supportedMethodSet
-
-
-
-
Field Detail
-
versionHistory
protected final javax.jcr.version.VersionHistory versionHistory
History of versions.
-
versionedResource
protected final VersionedResource versionedResource
Versioned resource.
-
-
Constructor Detail
-
VersionHistoryResource
public VersionHistoryResource(URI identifier, javax.jcr.version.VersionHistory versionHistory, VersionedResource versionedResource, WebDavNamespaceContext namespaceContext) throws IllegalResourceTypeException, javax.jcr.RepositoryException
- Parameters:
identifier- resource identifierversionHistory- history of versionsversionedResource- resourcenamespaceContext- namespace context- Throws:
IllegalResourceTypeException-IllegalResourceTypeExceptionjavax.jcr.RepositoryException
-
-
Method Detail
-
getProperty
public org.exoplatform.common.util.HierarchicalProperty getProperty(QName name) throws javax.jcr.PathNotFoundException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
- Parameters:
name- property name- Returns:
- property by its name
- Throws:
javax.jcr.PathNotFoundException-PathNotFoundExceptionjavax.jcr.AccessDeniedException-AccessDeniedExceptionjavax.jcr.RepositoryException-RepositoryException
-
isCollection
public final boolean isCollection()
- Returns:
- true if this is collection-able resource - i.e. this resource may contain other resources
-
getVersions
public Set<VersionResource> getVersions() throws javax.jcr.RepositoryException, IllegalResourceTypeException
Returns all versions of a resource.- Returns:
- all versions of a resource
- Throws:
javax.jcr.RepositoryException-RepositoryExceptionIllegalResourceTypeException-IllegalResourceTypeException
-
getVersion
public VersionResource getVersion(String name) throws javax.jcr.RepositoryException, IllegalResourceTypeException
Returns the version of resouce by name.- Parameters:
name- version name- Returns:
- version of a resource
- Throws:
javax.jcr.RepositoryException-RepositoryExceptionIllegalResourceTypeException-IllegalResourceTypeException
-
-