Class VersionControlledResourceImpl
- java.lang.Object
-
- org.apache.jackrabbit.webdav.simple.DavResourceImpl
-
- org.apache.jackrabbit.webdav.simple.DeltaVResourceImpl
-
- org.apache.jackrabbit.webdav.simple.VersionControlledResourceImpl
-
- All Implemented Interfaces:
JcrConstants,BindableResource,DavResource,DeltaVResource,VersionableResource,VersionControlledResource
public class VersionControlledResourceImpl extends DeltaVResourceImpl implements VersionControlledResource
VersionControlledResourceImplrepresents a JCR node item and covers all functionality related to versioning ofNodes.- See Also:
Node
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.webdav.simple.DeltaVResourceImpl
supportedReports
-
Fields inherited from class org.apache.jackrabbit.webdav.simple.DavResourceImpl
COMPLIANCE_CLASSES, METHODS, properties, propsInitialized
-
Fields inherited from interface org.apache.jackrabbit.webdav.version.DeltaVResource
METHODS, METHODS_INCL_MKWORKSPACE
-
Fields inherited from interface org.apache.jackrabbit.JcrConstants
JCR_AUTOCREATED, JCR_BASEVERSION, JCR_CHILD, JCR_CHILDNODEDEFINITION, JCR_CONTENT, JCR_CREATED, JCR_DATA, JCR_DEFAULTPRIMARYTYPE, JCR_DEFAULTVALUES, JCR_ENCODING, JCR_FROZENMIXINTYPES, JCR_FROZENNODE, JCR_FROZENPRIMARYTYPE, JCR_FROZENUUID, JCR_HASORDERABLECHILDNODES, JCR_ISCHECKEDOUT, JCR_ISMIXIN, JCR_LANGUAGE, JCR_LASTMODIFIED, JCR_LOCKISDEEP, JCR_LOCKOWNER, JCR_MANDATORY, JCR_MERGEFAILED, JCR_MIMETYPE, JCR_MIXINTYPES, JCR_MULTIPLE, JCR_NAME, JCR_NODETYPENAME, JCR_ONPARENTVERSION, JCR_PATH, JCR_PREDECESSORS, JCR_PRIMARYITEMNAME, JCR_PRIMARYTYPE, JCR_PROPERTYDEFINITION, JCR_PROTECTED, JCR_REQUIREDPRIMARYTYPES, JCR_REQUIREDTYPE, JCR_ROOTVERSION, JCR_SAMENAMESIBLINGS, JCR_SCORE, JCR_STATEMENT, JCR_SUCCESSORS, JCR_SUPERTYPES, JCR_SYSTEM, JCR_UUID, JCR_VALUECONSTRAINTS, JCR_VERSIONABLEUUID, JCR_VERSIONHISTORY, JCR_VERSIONLABELS, JCR_VERSIONSTORAGE, MIX_LOCKABLE, MIX_REFERENCEABLE, MIX_SHAREABLE, MIX_VERSIONABLE, NT_BASE, NT_CHILDNODEDEFINITION, NT_FILE, NT_FOLDER, NT_FROZENNODE, NT_HIERARCHYNODE, NT_LINKEDFILE, NT_NODETYPE, NT_PROPERTYDEFINITION, NT_QUERY, NT_RESOURCE, NT_UNSTRUCTURED, NT_VERSION, NT_VERSIONEDCHILD, NT_VERSIONHISTORY, NT_VERSIONLABELS
-
Fields inherited from interface org.apache.jackrabbit.webdav.version.VersionableResource
METHODS
-
Fields inherited from interface org.apache.jackrabbit.webdav.version.VersionControlledResource
ACTIVITY_SET, AUTO_MERGE_SET, AUTO_VERSION, BASELINE_CONTROLLED_COLLECTION, CHECKED_IN, CHECKED_OUT, CHECKIN_FORK, CHECKOUT_FORK, ECLIPSED_SET, MERGE_SET, methods_checkedIn, methods_checkedOut, PREDECESSOR_SET, SUBBASELINE_SET, UNRESERVED, VERSION_HISTORY
-
-
Constructor Summary
Constructors Constructor Description VersionControlledResourceImpl(DavResourceLocator locator, DavResourceFactory factory, DavSession session, ResourceConfig config, boolean isCollection)Create a newDavResource.VersionControlledResourceImpl(DavResourceLocator locator, DavResourceFactory factory, DavSession session, ResourceConfig config, Item item)Create a newDavResource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddVersionControl()Adds version control to this resource.Stringcheckin()CallsNode.checkin()on the underlying repository node.voidcheckout()CallsNode.checkout()on the underlying repository node.StringgetSupportedMethods()Return a comma separated string listing the supported method names.VersionHistoryResourcegetVersionHistory()Returns theVersionHistoryassociated with the repository node.protected voidinitProperties()Fill the property set for this resource.protected voidinitSupportedReports()Define the set of reports supported by this resource.voidlabel(LabelInfo labelInfo)Modify the labels present with the versions of this resource.MultiStatusmerge(MergeInfo mergeInfo)MERGE feature is not (yet) supported.voiduncheckout()UNCHECKOUT cannot be implemented on top of JSR 170 repository.MultiStatusupdate(UpdateInfo updateInfo)UPDATE feature is not (yet) supported.-
Methods inherited from class org.apache.jackrabbit.webdav.simple.DeltaVResourceImpl
addWorkspace, createResourceFromLocator, getComplianceClass, getHrefProperty, getLocatorFromNode, getLocatorFromNodePath, getOptionResponse, getReferenceResources, getReport
-
Methods inherited from class org.apache.jackrabbit.webdav.simple.DavResourceImpl
addLockManager, addMember, alterProperties, bind, copy, exists, getCollection, getDisplayName, getExportContext, getFactory, getHref, getImportContext, getLocator, getLock, getLocks, getMembers, getModificationTime, getNode, getParentElements, getProperties, getProperty, getPropertyExportContext, getPropertyImportContext, getPropertyNames, getResourcePath, getSession, hasLock, isCollection, isLockable, lock, move, rebind, refreshLock, removeMember, removeProperty, setProperty, spool, unlock
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.webdav.DavResource
addLockManager, addMember, alterProperties, copy, exists, getCollection, getComplianceClass, getDisplayName, getFactory, getHref, getLocator, getLock, getLocks, getMembers, getModificationTime, getProperties, getProperty, getPropertyNames, getResourcePath, getSession, hasLock, isCollection, isLockable, lock, move, refreshLock, removeMember, removeProperty, setProperty, spool, unlock
-
Methods inherited from interface org.apache.jackrabbit.webdav.version.DeltaVResource
addWorkspace, getOptionResponse, getReferenceResources, getReport
-
-
-
-
Constructor Detail
-
VersionControlledResourceImpl
public VersionControlledResourceImpl(DavResourceLocator locator, DavResourceFactory factory, DavSession session, ResourceConfig config, Item item) throws DavException
Create a newDavResource.- Parameters:
locator-factory-session-config-item-- Throws:
DavException
-
VersionControlledResourceImpl
public VersionControlledResourceImpl(DavResourceLocator locator, DavResourceFactory factory, DavSession session, ResourceConfig config, boolean isCollection) throws DavException
Create a newDavResource.- Parameters:
locator-factory-session-config-isCollection-- Throws:
DavException
-
-
Method Detail
-
getSupportedMethods
public String getSupportedMethods()
Return a comma separated string listing the supported method names.- Specified by:
getSupportedMethodsin interfaceDavResource- Overrides:
getSupportedMethodsin classDavResourceImpl- Returns:
- the supported method names.
- See Also:
DavResource.getSupportedMethods()
-
addVersionControl
public void addVersionControl() throws DavExceptionAdds version control to this resource. If the resource is already under version control, this method has no effect. If this resource is a Collection resource this method fails withHttpServletResponse.SC_METHOD_NOT_ALLOWED.- Specified by:
addVersionControlin interfaceVersionableResource- Throws:
DavException- if this resource does not exist yet, is a collection or if an error occurs while making the underlying node versionable.- See Also:
VersionableResource.addVersionControl()
-
checkin
public String checkin() throws DavException
CallsNode.checkin()on the underlying repository node.- Specified by:
checkinin interfaceVersionControlledResource- Returns:
- String representing the location of the version created by the checkin.
- Throws:
DavException- See Also:
VersionControlledResource.checkin()
-
checkout
public void checkout() throws DavExceptionCallsNode.checkout()on the underlying repository node.- Specified by:
checkoutin interfaceVersionControlledResource- Throws:
DavException- See Also:
VersionControlledResource.checkout()
-
uncheckout
public void uncheckout() throws DavExceptionUNCHECKOUT cannot be implemented on top of JSR 170 repository. Therefore this methods always throws aDavExceptionwith error codeHttpServletResponse.SC_NOT_IMPLEMENTED.- Specified by:
uncheckoutin interfaceVersionControlledResource- Throws:
DavException- See Also:
VersionControlledResource.uncheckout()
-
update
public MultiStatus update(UpdateInfo updateInfo) throws DavException
UPDATE feature is not (yet) supported. This method allows fails withHttpServletResponse.SC_NOT_IMPLEMENTED.- Specified by:
updatein interfaceVersionControlledResource- Parameters:
updateInfo-- Returns:
- Throws:
DavException- See Also:
VersionControlledResource.update(UpdateInfo)
-
merge
public MultiStatus merge(MergeInfo mergeInfo) throws DavException
MERGE feature is not (yet) supported. This method allows fails withHttpServletResponse.SC_NOT_IMPLEMENTED.- Specified by:
mergein interfaceVersionControlledResource- Parameters:
mergeInfo-- Returns:
- Throws:
DavException- See Also:
VersionControlledResource.merge(MergeInfo)
-
label
public void label(LabelInfo labelInfo) throws DavException
Modify the labels present with the versions of this resource.- Specified by:
labelin interfaceVersionControlledResource- Parameters:
labelInfo-- Throws:
DavException- See Also:
VersionControlledResource.label(LabelInfo),VersionHistory.addVersionLabel(String, String, boolean),VersionHistory.removeVersionLabel(String)
-
getVersionHistory
public VersionHistoryResource getVersionHistory() throws DavException
Returns theVersionHistoryassociated with the repository node. If the node is not versionable an exception is thrown.- Specified by:
getVersionHistoryin interfaceVersionControlledResource- Returns:
- the
VersionHistoryResourceassociated with this resource. - Throws:
DavException- See Also:
VersionControlledResource.getVersionHistory(),Node.getVersionHistory()
-
initSupportedReports
protected void initSupportedReports()
Define the set of reports supported by this resource.- Overrides:
initSupportedReportsin classDeltaVResourceImpl- See Also:
SupportedReportSetProperty,DeltaVResourceImpl.initSupportedReports()
-
initProperties
protected void initProperties()
Fill the property set for this resource.- Overrides:
initPropertiesin classDeltaVResourceImpl- See Also:
DavResourceImpl.initProperties()
-
-