Class CmsDavResource

java.lang.Object
org.opencms.webdav.CmsDavResource
All Implemented Interfaces:
org.apache.jackrabbit.webdav.DavResource

public class CmsDavResource extends Object implements org.apache.jackrabbit.webdav.DavResource
Represents a resource in the WebDav repository (may not actually correspond to an actual OpenCms resource, since DavResource are also created for the target locations for move/copy operations, before any of the moving / copying happens.
  • Field Summary

    Fields inherited from interface org.apache.jackrabbit.webdav.DavResource

    METHODS
  • Constructor Summary

    Constructors
    Constructor
    Description
    CmsDavResource(org.apache.jackrabbit.webdav.DavResourceLocator loc, CmsDavResourceFactory factory, CmsDavSession session, org.apache.jackrabbit.webdav.lock.LockManager lockManager)
    Creates a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addLockManager(org.apache.jackrabbit.webdav.lock.LockManager lockmgr)
     
    void
    addMember(org.apache.jackrabbit.webdav.DavResource dres, org.apache.jackrabbit.webdav.io.InputContext inputContext)
     
    org.apache.jackrabbit.webdav.MultiStatusResponse
    alterProperties(List<? extends org.apache.jackrabbit.webdav.property.PropEntry> changeList)
     
    void
    copy(org.apache.jackrabbit.webdav.DavResource dres, boolean shallow)
     
    void
    Deletes the resource.
    boolean
     
    org.apache.jackrabbit.webdav.DavResource
     
     
     
    org.apache.jackrabbit.webdav.DavResourceFactory
     
     
    org.apache.jackrabbit.webdav.DavResourceLocator
     
    org.apache.jackrabbit.webdav.lock.ActiveLock
    getLock(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope)
     
    org.apache.jackrabbit.webdav.lock.ActiveLock[]
     
    org.apache.jackrabbit.webdav.DavResourceIterator
     
    long
     
    org.apache.jackrabbit.webdav.property.DavPropertySet
     
    org.apache.jackrabbit.webdav.property.DavProperty<?>
    getProperty(org.apache.jackrabbit.webdav.property.DavPropertyName name)
     
    org.apache.jackrabbit.webdav.property.DavPropertyName[]
     
     
    org.apache.jackrabbit.webdav.DavSession
     
     
    boolean
    hasLock(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope)
     
    boolean
     
    boolean
    isLockable(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope)
     
    org.apache.jackrabbit.webdav.lock.ActiveLock
    lock(org.apache.jackrabbit.webdav.lock.LockInfo reqLockInfo)
     
    void
    move(org.apache.jackrabbit.webdav.DavResource destination)
     
    org.apache.jackrabbit.webdav.lock.ActiveLock
    refreshLock(org.apache.jackrabbit.webdav.lock.LockInfo reqLockInfo, String lockToken)
     
    void
    removeMember(org.apache.jackrabbit.webdav.DavResource member)
     
    void
    removeProperty(org.apache.jackrabbit.webdav.property.DavPropertyName propertyName)
     
    void
    setProperty(org.apache.jackrabbit.webdav.property.DavProperty<?> property)
     
    void
    spool(org.apache.jackrabbit.webdav.io.OutputContext outputContext)
     
    void
    unlock(String lockToken)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CmsDavResource

      public CmsDavResource(org.apache.jackrabbit.webdav.DavResourceLocator loc, CmsDavResourceFactory factory, CmsDavSession session, org.apache.jackrabbit.webdav.lock.LockManager lockManager)
      Creates a new instance.
      Parameters:
      loc - the locator for this resource
      factory - the factory that produced this resource
      session - the Webdav session
      lockManager - the lock manager
  • Method Details

    • addLockManager

      public void addLockManager(org.apache.jackrabbit.webdav.lock.LockManager lockmgr)
      Specified by:
      addLockManager in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.addLockManager(org.apache.jackrabbit.webdav.lock.LockManager)
    • addMember

      public void addMember(org.apache.jackrabbit.webdav.DavResource dres, org.apache.jackrabbit.webdav.io.InputContext inputContext) throws org.apache.jackrabbit.webdav.DavException
      Specified by:
      addMember in interface org.apache.jackrabbit.webdav.DavResource
      Throws:
      org.apache.jackrabbit.webdav.DavException
      See Also:
      • DavResource.addMember(org.apache.jackrabbit.webdav.DavResource, org.apache.jackrabbit.webdav.io.InputContext)
    • alterProperties

      public org.apache.jackrabbit.webdav.MultiStatusResponse alterProperties(List<? extends org.apache.jackrabbit.webdav.property.PropEntry> changeList) throws org.apache.jackrabbit.webdav.DavException
      Specified by:
      alterProperties in interface org.apache.jackrabbit.webdav.DavResource
      Throws:
      org.apache.jackrabbit.webdav.DavException
      See Also:
      • DavResource.alterProperties(java.util.List)
    • copy

      public void copy(org.apache.jackrabbit.webdav.DavResource dres, boolean shallow) throws org.apache.jackrabbit.webdav.DavException
      Specified by:
      copy in interface org.apache.jackrabbit.webdav.DavResource
      Throws:
      org.apache.jackrabbit.webdav.DavException
      See Also:
      • DavResource.copy(org.apache.jackrabbit.webdav.DavResource, boolean)
    • delete

      public void delete() throws org.apache.jackrabbit.webdav.DavException
      Deletes the resource.
      Throws:
      org.apache.jackrabbit.webdav.DavException - if an error occurs
    • exists

      public boolean exists()
      Specified by:
      exists in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.exists()
    • getCollection

      public org.apache.jackrabbit.webdav.DavResource getCollection()
      Specified by:
      getCollection in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getCollection()
    • getComplianceClass

      Specified by:
      getComplianceClass in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getComplianceClass()
    • getDisplayName

      Specified by:
      getDisplayName in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getDisplayName()
    • getFactory

      public org.apache.jackrabbit.webdav.DavResourceFactory getFactory()
      Specified by:
      getFactory in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getFactory()
    • getHref

      public String getHref()
      Specified by:
      getHref in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getHref()
    • getLocator

      public org.apache.jackrabbit.webdav.DavResourceLocator getLocator()
      Specified by:
      getLocator in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getLocator()
    • getLock

      public org.apache.jackrabbit.webdav.lock.ActiveLock getLock(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope)
      Specified by:
      getLock in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getLock(org.apache.jackrabbit.webdav.lock.Type, org.apache.jackrabbit.webdav.lock.Scope)
    • getLocks

      public org.apache.jackrabbit.webdav.lock.ActiveLock[] getLocks()
      Specified by:
      getLocks in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getLocks()
    • getMembers

      public org.apache.jackrabbit.webdav.DavResourceIterator getMembers()
      Specified by:
      getMembers in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getMembers()
    • getModificationTime

      public long getModificationTime()
      Specified by:
      getModificationTime in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getModificationTime()
    • getProperties

      public org.apache.jackrabbit.webdav.property.DavPropertySet getProperties()
      Specified by:
      getProperties in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getProperties()
    • getProperty

      public org.apache.jackrabbit.webdav.property.DavProperty<?> getProperty(org.apache.jackrabbit.webdav.property.DavPropertyName name)
      Specified by:
      getProperty in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getProperty(org.apache.jackrabbit.webdav.property.DavPropertyName)
    • getPropertyNames

      public org.apache.jackrabbit.webdav.property.DavPropertyName[] getPropertyNames()
      Specified by:
      getPropertyNames in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getPropertyNames()
    • getResourcePath

      Specified by:
      getResourcePath in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getResourcePath()
    • getSession

      public org.apache.jackrabbit.webdav.DavSession getSession()
      Specified by:
      getSession in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getSession()
    • getSupportedMethods

      Specified by:
      getSupportedMethods in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.getSupportedMethods()
    • hasLock

      public boolean hasLock(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope)
      Specified by:
      hasLock in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.hasLock(org.apache.jackrabbit.webdav.lock.Type, org.apache.jackrabbit.webdav.lock.Scope)
    • isCollection

      public boolean isCollection()
      Specified by:
      isCollection in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.isCollection()
    • isLockable

      public boolean isLockable(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope)
      Specified by:
      isLockable in interface org.apache.jackrabbit.webdav.DavResource
      See Also:
      • DavResource.isLockable(org.apache.jackrabbit.webdav.lock.Type, org.apache.jackrabbit.webdav.lock.Scope)
    • lock

      public org.apache.jackrabbit.webdav.lock.ActiveLock lock(org.apache.jackrabbit.webdav.lock.LockInfo reqLockInfo) throws org.apache.jackrabbit.webdav.DavException
      Specified by:
      lock in interface org.apache.jackrabbit.webdav.DavResource
      Throws:
      org.apache.jackrabbit.webdav.DavException
      See Also:
      • DavResource.lock(org.apache.jackrabbit.webdav.lock.LockInfo)
    • move

      public void move(org.apache.jackrabbit.webdav.DavResource destination) throws org.apache.jackrabbit.webdav.DavException
      Specified by:
      move in interface org.apache.jackrabbit.webdav.DavResource
      Throws:
      org.apache.jackrabbit.webdav.DavException
      See Also:
      • DavResource.move(org.apache.jackrabbit.webdav.DavResource)
    • refreshLock

      public org.apache.jackrabbit.webdav.lock.ActiveLock refreshLock(org.apache.jackrabbit.webdav.lock.LockInfo reqLockInfo, String lockToken) throws org.apache.jackrabbit.webdav.DavException
      Specified by:
      refreshLock in interface org.apache.jackrabbit.webdav.DavResource
      Throws:
      org.apache.jackrabbit.webdav.DavException
      See Also:
      • DavResource.refreshLock(org.apache.jackrabbit.webdav.lock.LockInfo, java.lang.String)
    • removeMember

      public void removeMember(org.apache.jackrabbit.webdav.DavResource member) throws org.apache.jackrabbit.webdav.DavException
      Specified by:
      removeMember in interface org.apache.jackrabbit.webdav.DavResource
      Throws:
      org.apache.jackrabbit.webdav.DavException
      See Also:
      • DavResource.removeMember(org.apache.jackrabbit.webdav.DavResource)
    • removeProperty

      public void removeProperty(org.apache.jackrabbit.webdav.property.DavPropertyName propertyName) throws org.apache.jackrabbit.webdav.DavException
      Specified by:
      removeProperty in interface org.apache.jackrabbit.webdav.DavResource
      Throws:
      org.apache.jackrabbit.webdav.DavException
      See Also:
      • DavResource.removeProperty(org.apache.jackrabbit.webdav.property.DavPropertyName)
    • setProperty

      public void setProperty(org.apache.jackrabbit.webdav.property.DavProperty<?> property) throws org.apache.jackrabbit.webdav.DavException
      Specified by:
      setProperty in interface org.apache.jackrabbit.webdav.DavResource
      Throws:
      org.apache.jackrabbit.webdav.DavException
      See Also:
      • DavResource.setProperty(org.apache.jackrabbit.webdav.property.DavProperty)
    • spool

      public void spool(org.apache.jackrabbit.webdav.io.OutputContext outputContext) throws IOException
      Specified by:
      spool in interface org.apache.jackrabbit.webdav.DavResource
      Throws:
      IOException
      See Also:
      • DavResource.spool(org.apache.jackrabbit.webdav.io.OutputContext)
    • unlock

      public void unlock(String lockToken) throws org.apache.jackrabbit.webdav.DavException
      Specified by:
      unlock in interface org.apache.jackrabbit.webdav.DavResource
      Throws:
      org.apache.jackrabbit.webdav.DavException
      See Also:
      • DavResource.unlock(java.lang.String)