Class VersionControlledResourceImpl

All Implemented Interfaces:
Serializable, org.apache.jackrabbit.webdav.DavResource, org.apache.jackrabbit.webdav.version.DeltaVResource, org.apache.jackrabbit.webdav.version.VersionableResource, org.apache.jackrabbit.webdav.version.VersionControlledResource

public class VersionControlledResourceImpl extends DeltaVResourceImpl implements org.apache.jackrabbit.webdav.version.VersionControlledResource, Serializable
See Also:
  • Constructor Details

    • VersionControlledResourceImpl

      public VersionControlledResourceImpl(org.apache.jackrabbit.webdav.DavResourceLocator locator, DavResourceFactory factory, WebdavSession session, ResourceConfig config, Resource resource) throws org.apache.jackrabbit.webdav.DavException
      Throws:
      org.apache.jackrabbit.webdav.DavException
    • VersionControlledResourceImpl

      public VersionControlledResourceImpl(org.apache.jackrabbit.webdav.DavResourceLocator locator, DavResourceFactory factory, WebdavSession session, ResourceConfig config) throws org.apache.jackrabbit.webdav.DavException
      Create a new DavResource.
      Parameters:
      locator - resource locator
      factory - factory
      session - the DAV session
      config - configurations
      Throws:
      org.apache.jackrabbit.webdav.DavException - error in the DAV communication
    • VersionControlledResourceImpl

      public VersionControlledResourceImpl(org.apache.jackrabbit.webdav.DavResourceLocator locator, DavResourceFactory factory, WebdavSession session, ResourceConfig config, boolean isCollection) throws org.apache.jackrabbit.webdav.DavException
      Create a new DavResource.
      Parameters:
      locator - resource locator
      factory - factory
      session - the DAV session
      config - configurations
      isCollection - is this a folder?
      Throws:
      org.apache.jackrabbit.webdav.DavException - error in the DAV communication
  • Method Details

    • getSupportedMethods

      public String getSupportedMethods()
      Return a comma separated string listing the supported method names
      Specified by:
      getSupportedMethods in interface org.apache.jackrabbit.webdav.DavResource
      Overrides:
      getSupportedMethods in class DavResourceImpl
      Returns:
      the supported method names
      See Also:
      • DavResource.getSupportedMethods()
    • addVersionControl

      public void addVersionControl() throws org.apache.jackrabbit.webdav.DavException
      Adds 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 with HttpServletResponse.SC_METHOD_NOT_ALLOWED.
      Specified by:
      addVersionControl in interface org.apache.jackrabbit.webdav.version.VersionableResource
      Throws:
      org.apache.jackrabbit.webdav.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 org.apache.jackrabbit.webdav.DavException
      Calls Node.checkin() on the underlying repository node.
      Specified by:
      checkin in interface org.apache.jackrabbit.webdav.version.VersionControlledResource
      Throws:
      org.apache.jackrabbit.webdav.DavException - error in the DAV communication
      See Also:
      • VersionControlledResource.checkin()
    • checkout

      public void checkout() throws org.apache.jackrabbit.webdav.DavException
      Calls Node.checkout() on the underlying repository node
      Specified by:
      checkout in interface org.apache.jackrabbit.webdav.version.VersionControlledResource
      Throws:
      org.apache.jackrabbit.webdav.DavException - error in the DAV communication
      See Also:
      • VersionControlledResource.checkout()
    • uncheckout

      public void uncheckout() throws org.apache.jackrabbit.webdav.DavException
      Specified by:
      uncheckout in interface org.apache.jackrabbit.webdav.version.VersionControlledResource
      Throws:
      org.apache.jackrabbit.webdav.DavException - error in the DAV communication
      See Also:
      • VersionControlledResource.uncheckout()
    • update

      public org.apache.jackrabbit.webdav.MultiStatus update(org.apache.jackrabbit.webdav.version.UpdateInfo updateInfo) throws org.apache.jackrabbit.webdav.DavException
      UPDATE feature is not (yet) supported. This method allows fails with HttpServletResponse.SC_NOT_IMPLEMENTED.
      Specified by:
      update in interface org.apache.jackrabbit.webdav.version.VersionControlledResource
      Parameters:
      updateInfo - update datails
      Returns:
      the status
      Throws:
      org.apache.jackrabbit.webdav.DavException - error in the DAV communication
      See Also:
      • VersionControlledResource.update(UpdateInfo)
    • merge

      public org.apache.jackrabbit.webdav.MultiStatus merge(org.apache.jackrabbit.webdav.version.MergeInfo mergeInfo) throws org.apache.jackrabbit.webdav.DavException
      MERGE feature is not (yet) supported. This method allows fails with HttpServletResponse.SC_NOT_IMPLEMENTED.
      Specified by:
      merge in interface org.apache.jackrabbit.webdav.version.VersionControlledResource
      Parameters:
      mergeInfo - details bout the merge
      Returns:
      the status
      Throws:
      org.apache.jackrabbit.webdav.DavException - error in the DAV communication
      See Also:
      • VersionControlledResource.merge(MergeInfo)
    • label

      public void label(org.apache.jackrabbit.webdav.version.LabelInfo labelInfo) throws org.apache.jackrabbit.webdav.DavException
      Modify the labels present with the versions of this resource.
      Specified by:
      label in interface org.apache.jackrabbit.webdav.version.VersionControlledResource
      Parameters:
      labelInfo - details of the label
      Throws:
      org.apache.jackrabbit.webdav.DavException - error in the DAV communication
      See Also:
      • VersionControlledResource.label(LabelInfo)
      • VersionHistory.addVersionLabel(String, String, boolean)
      • VersionHistory.removeVersionLabel(String)
    • getVersionHistory

      public org.apache.jackrabbit.webdav.version.VersionHistoryResource getVersionHistory() throws org.apache.jackrabbit.webdav.DavException
      Returns the VersionHistory associated with the repository node. If the node is not versionable an exception is thrown.
      Specified by:
      getVersionHistory in interface org.apache.jackrabbit.webdav.version.VersionControlledResource
      Returns:
      the VersionHistoryResource associated with this resource.
      Throws:
      org.apache.jackrabbit.webdav.DavException - Some error
      See Also:
      • VersionControlledResource.getVersionHistory()
      • Node.getVersionHistory()