Class VersionControlledResourceImpl

  • All Implemented Interfaces:
    org.apache.jackrabbit.JcrConstants, org.apache.jackrabbit.webdav.bind.BindableResource, 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
    VersionControlledResourceImpl represents a JCR node item and covers all functionality related to versioning of Nodes.
    See Also:
    Node
    • Constructor Detail

      • VersionControlledResourceImpl

        public VersionControlledResourceImpl​(org.apache.jackrabbit.webdav.DavResourceLocator locator,
                                             org.apache.jackrabbit.webdav.DavResourceFactory factory,
                                             org.apache.jackrabbit.webdav.DavSession session,
                                             ResourceConfig config,
                                             Item item)
                                      throws org.apache.jackrabbit.webdav.DavException
        Create a new DavResource.
        Parameters:
        locator -
        factory -
        session -
        config -
        item -
        Throws:
        org.apache.jackrabbit.webdav.DavException
      • VersionControlledResourceImpl

        public VersionControlledResourceImpl​(org.apache.jackrabbit.webdav.DavResourceLocator locator,
                                             org.apache.jackrabbit.webdav.DavResourceFactory factory,
                                             org.apache.jackrabbit.webdav.DavSession session,
                                             ResourceConfig config,
                                             boolean isCollection)
                                      throws org.apache.jackrabbit.webdav.DavException
        Create a new DavResource.
        Parameters:
        locator -
        factory -
        session -
        config -
        isCollection -
        Throws:
        org.apache.jackrabbit.webdav.DavException
    • Method Detail

      • 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
        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
        See Also:
        VersionControlledResource.checkout()
      • uncheckout

        public void uncheckout()
                        throws org.apache.jackrabbit.webdav.DavException
        UNCHECKOUT cannot be implemented on top of JSR 170 repository. Therefore this methods always throws a DavException with error code HttpServletResponse.SC_NOT_IMPLEMENTED.
        Specified by:
        uncheckout in interface org.apache.jackrabbit.webdav.version.VersionControlledResource
        Throws:
        org.apache.jackrabbit.webdav.DavException
        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 -
        Returns:
        Throws:
        org.apache.jackrabbit.webdav.DavException
        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 -
        Returns:
        Throws:
        org.apache.jackrabbit.webdav.DavException
        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 -
        Throws:
        org.apache.jackrabbit.webdav.DavException
        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
        See Also:
        VersionControlledResource.getVersionHistory(), Node.getVersionHistory()