Package com.logicaldoc.webdav.resource
Class DavResourceImpl
java.lang.Object
com.logicaldoc.webdav.resource.DavResourceImpl
- All Implemented Interfaces:
- Serializable,- org.apache.jackrabbit.webdav.DavResource
- Direct Known Subclasses:
- DeltaVResourceImpl,- RangeResourceImpl
public class DavResourceImpl
extends Object
implements org.apache.jackrabbit.webdav.DavResource, Serializable
For more informations, please visit
 
DavResourceImpl- Author:
- Sebastian Wenzky
- See Also:
- 
Field SummaryFields inherited from interface org.apache.jackrabbit.webdav.DavResourceMETHODS
- 
Constructor SummaryConstructorsConstructorDescriptionDavResourceImpl(org.apache.jackrabbit.webdav.DavResourceLocator locator, DavResourceFactory factory, WebdavSession session, ResourceConfiguration config) Create a newDavResource.DavResourceImpl(org.apache.jackrabbit.webdav.DavResourceLocator locator, DavResourceFactory factory, WebdavSession session, ResourceConfiguration config, boolean isCollection) Create a newDavResourceDavResourceImpl(org.apache.jackrabbit.webdav.DavResourceLocator locator, DavResourceFactory factory, WebdavSession session, ResourceConfiguration config, Resource resource) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddLockManager(org.apache.jackrabbit.webdav.lock.LockManager lockMgr) voidaddMember(org.apache.jackrabbit.webdav.DavResource member, org.apache.jackrabbit.webdav.io.InputContext inputContext) Adds a new member to this resource.org.apache.jackrabbit.webdav.MultiStatusResponsealterProperties(List<? extends org.apache.jackrabbit.webdav.property.PropEntry> changeList) org.apache.jackrabbit.webdav.MultiStatusResponsealterProperties(org.apache.jackrabbit.webdav.property.DavPropertySet setProperties, org.apache.jackrabbit.webdav.property.DavPropertyNameSet removePropertyNames) voidcopy(org.apache.jackrabbit.webdav.DavResource destination, boolean shallow) booleanexists()org.apache.jackrabbit.webdav.DavResourceReturns the the last segment of the resource path.getExportContext(org.apache.jackrabbit.webdav.io.OutputContext outputCtx) org.apache.jackrabbit.webdav.DavResourceFactorygetHref()org.apache.jackrabbit.webdav.DavResourceLocatororg.apache.jackrabbit.webdav.lock.ActiveLockgetLock(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope) org.apache.jackrabbit.webdav.lock.ActiveLock[]getLocks()org.apache.jackrabbit.webdav.DavResourceIteratorlongorg.apache.jackrabbit.webdav.property.DavPropertySetorg.apache.jackrabbit.webdav.property.DavProperty<?> getProperty(org.apache.jackrabbit.webdav.property.DavPropertyName name) org.apache.jackrabbit.webdav.property.DavPropertyName[]org.apache.jackrabbit.webdav.DavSessionbooleanhasLock(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope) booleanbooleanisLockable(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope) Checks if a resource can be lockedorg.apache.jackrabbit.webdav.lock.ActiveLocklock(org.apache.jackrabbit.webdav.lock.LockInfo lockInfo) voidmove(org.apache.jackrabbit.webdav.DavResource destination) org.apache.jackrabbit.webdav.lock.ActiveLockrefreshLock(org.apache.jackrabbit.webdav.lock.LockInfo lockInfo, String lockToken) voidremoveMember(org.apache.jackrabbit.webdav.DavResource member) voidremoveProperty(org.apache.jackrabbit.webdav.property.DavPropertyName arg0) voidsetProperty(org.apache.jackrabbit.webdav.property.DavProperty<?> arg0) voidspool(org.apache.jackrabbit.webdav.io.OutputContext outputContext) If this resource exists and the specified context is notnullthis implementation build a newExportContextbased on the specified context and forwards the export to itsIOManager.void
- 
Constructor Details- 
DavResourceImplpublic DavResourceImpl(org.apache.jackrabbit.webdav.DavResourceLocator locator, DavResourceFactory factory, WebdavSession session, ResourceConfiguration config, Resource resource) 
- 
DavResourceImplpublic DavResourceImpl(org.apache.jackrabbit.webdav.DavResourceLocator locator, DavResourceFactory factory, WebdavSession session, ResourceConfiguration config) throws org.apache.jackrabbit.webdav.DavException Create a newDavResource.- Parameters:
- locator- resource locator
- factory- resource factory
- session- current session
- config- configuration
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
- 
DavResourceImplpublic DavResourceImpl(org.apache.jackrabbit.webdav.DavResourceLocator locator, DavResourceFactory factory, WebdavSession session, ResourceConfiguration config, boolean isCollection) throws org.apache.jackrabbit.webdav.DavException Create a newDavResource- Parameters:
- locator- resource locator
- factory- resource factory
- session- current session
- config- configuration
- isCollection- is the resource folder?
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
 
- 
- 
Method Details- 
getComplianceClass- Specified by:
- getComplianceClassin interface- org.apache.jackrabbit.webdav.DavResource
- Returns:
- DavResource#COMPLIANCE_CLASS
- See Also:
 
- 
getSupportedMethods- Specified by:
- getSupportedMethodsin interface- org.apache.jackrabbit.webdav.DavResource
- Returns:
- DavResource#METHODS
- See Also:
 
- 
existspublic boolean exists()- Specified by:
- existsin interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
isCollectionpublic boolean isCollection()- Specified by:
- isCollectionin interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
getLocatorpublic org.apache.jackrabbit.webdav.DavResourceLocator getLocator()- Specified by:
- getLocatorin interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
getResourcePath- Specified by:
- getResourcePathin interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
getHref- Specified by:
- getHrefin interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
getDisplayNameReturns the the last segment of the resource path.Note that this must not correspond to the name of the underlying repository item for two reasons: - SameNameSiblings have an index appended to their item name.
- the resource path may differ from the item path.
 - Specified by:
- getDisplayNamein interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
getModificationTimepublic long getModificationTime()- Specified by:
- getModificationTimein interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
spoolIf this resource exists and the specified context is notnullthis implementation build a newExportContextbased on the specified context and forwards the export to itsIOManager. If theIOManager.exportContent(ExportContext, DavResource)fails, anIOExceptionis thrown.- Specified by:
- spoolin interface- org.apache.jackrabbit.webdav.DavResource
- Throws:
- IOException- if the export fails
- See Also:
 
- 
getPropertypublic org.apache.jackrabbit.webdav.property.DavProperty<?> getProperty(org.apache.jackrabbit.webdav.property.DavPropertyName name) - Specified by:
- getPropertyin interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
getPropertiespublic org.apache.jackrabbit.webdav.property.DavPropertySet getProperties()- Specified by:
- getPropertiesin interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
getPropertyNamespublic org.apache.jackrabbit.webdav.property.DavPropertyName[] getPropertyNames()- Specified by:
- getPropertyNamesin interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
alterPropertiespublic org.apache.jackrabbit.webdav.MultiStatusResponse alterProperties(org.apache.jackrabbit.webdav.property.DavPropertySet setProperties, org.apache.jackrabbit.webdav.property.DavPropertyNameSet removePropertyNames) throws org.apache.jackrabbit.webdav.DavException - Parameters:
- setProperties- DAV properties
- removePropertyNames- DAV properties names
- Returns:
- the status
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
- See Also:
 
- 
alterPropertiespublic org.apache.jackrabbit.webdav.MultiStatusResponse alterProperties(List<? extends org.apache.jackrabbit.webdav.property.PropEntry> changeList) throws org.apache.jackrabbit.webdav.DavException - Specified by:
- alterPropertiesin interface- org.apache.jackrabbit.webdav.DavResource
- Throws:
- org.apache.jackrabbit.webdav.DavException
 
- 
getCollectionpublic org.apache.jackrabbit.webdav.DavResource getCollection()- Specified by:
- getCollectionin interface- org.apache.jackrabbit.webdav.DavResource
- Returns:
- the resource
- See Also:
 
- 
getMemberspublic org.apache.jackrabbit.webdav.DavResourceIterator getMembers()- Specified by:
- getMembersin interface- org.apache.jackrabbit.webdav.DavResource
- Returns:
- an iterator
- See Also:
 
- 
addMemberpublic void addMember(org.apache.jackrabbit.webdav.DavResource member, org.apache.jackrabbit.webdav.io.InputContext inputContext) throws org.apache.jackrabbit.webdav.DavException Adds a new member to this resource.- Specified by:
- addMemberin interface- org.apache.jackrabbit.webdav.DavResource
- Throws:
- org.apache.jackrabbit.webdav.DavException
- See Also:
 
- 
removeMemberpublic void removeMember(org.apache.jackrabbit.webdav.DavResource member) throws org.apache.jackrabbit.webdav.DavException - Specified by:
- removeMemberin interface- org.apache.jackrabbit.webdav.DavResource
- Throws:
- org.apache.jackrabbit.webdav.DavException
 
- 
movepublic void move(org.apache.jackrabbit.webdav.DavResource destination) throws org.apache.jackrabbit.webdav.DavException - Specified by:
- movein interface- org.apache.jackrabbit.webdav.DavResource
- Throws:
- org.apache.jackrabbit.webdav.DavException
 
- 
copypublic void copy(org.apache.jackrabbit.webdav.DavResource destination, boolean shallow) throws org.apache.jackrabbit.webdav.DavException - Specified by:
- copyin interface- org.apache.jackrabbit.webdav.DavResource
- Throws:
- org.apache.jackrabbit.webdav.DavException
 
- 
isLockablepublic boolean isLockable(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope) Checks if a resource can be locked- Specified by:
- isLockablein interface- org.apache.jackrabbit.webdav.DavResource
- Parameters:
- type- the type
- scope- the scope
- Returns:
- true if type is Type.WRITEand scope isScope.EXCLUSIVE
- See Also:
 
- 
hasLockpublic boolean hasLock(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope) - Specified by:
- hasLockin interface- org.apache.jackrabbit.webdav.DavResource
- Returns:
- if there is a lock
- See Also:
 
- 
getLockpublic org.apache.jackrabbit.webdav.lock.ActiveLock getLock(org.apache.jackrabbit.webdav.lock.Type type, org.apache.jackrabbit.webdav.lock.Scope scope) - Specified by:
- getLockin interface- org.apache.jackrabbit.webdav.DavResource
- Returns:
- the active lock
- See Also:
 
- 
getLockspublic org.apache.jackrabbit.webdav.lock.ActiveLock[] getLocks()- Specified by:
- getLocksin interface- org.apache.jackrabbit.webdav.DavResource
- Returns:
- the active locks
- See Also:
 
- 
lockpublic org.apache.jackrabbit.webdav.lock.ActiveLock lock(org.apache.jackrabbit.webdav.lock.LockInfo lockInfo) throws org.apache.jackrabbit.webdav.DavException - Specified by:
- lockin interface- org.apache.jackrabbit.webdav.DavResource
- Returns:
- the active lock
- Throws:
- org.apache.jackrabbit.webdav.DavException
- See Also:
 
- 
refreshLockpublic org.apache.jackrabbit.webdav.lock.ActiveLock refreshLock(org.apache.jackrabbit.webdav.lock.LockInfo lockInfo, String lockToken) throws org.apache.jackrabbit.webdav.DavException - Specified by:
- refreshLockin interface- org.apache.jackrabbit.webdav.DavResource
- Throws:
- org.apache.jackrabbit.webdav.DavException
- See Also:
 
- 
unlock- Specified by:
- unlockin interface- org.apache.jackrabbit.webdav.DavResource
- Throws:
- org.apache.jackrabbit.webdav.DavException
- See Also:
 
- 
addLockManagerpublic void addLockManager(org.apache.jackrabbit.webdav.lock.LockManager lockMgr) - Specified by:
- addLockManagerin interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
getFactorypublic org.apache.jackrabbit.webdav.DavResourceFactory getFactory()- Specified by:
- getFactoryin interface- org.apache.jackrabbit.webdav.DavResource
- See Also:
 
- 
getSessionpublic org.apache.jackrabbit.webdav.DavSession getSession()- Specified by:
- getSessionin interface- org.apache.jackrabbit.webdav.DavResource
- Returns:
- the session
- See Also:
 
- 
getExportContextpublic ExportContext getExportContext(org.apache.jackrabbit.webdav.io.OutputContext outputCtx) throws IOException - Parameters:
- outputCtx- output context
- Returns:
- the export context
- Throws:
- IOException- a generic exception
- See Also:
 
- 
removePropertypublic void removeProperty(org.apache.jackrabbit.webdav.property.DavPropertyName arg0) throws org.apache.jackrabbit.webdav.DavException - Specified by:
- removePropertyin interface- org.apache.jackrabbit.webdav.DavResource
- Throws:
- org.apache.jackrabbit.webdav.DavException
 
- 
setPropertypublic void setProperty(org.apache.jackrabbit.webdav.property.DavProperty<?> arg0) throws org.apache.jackrabbit.webdav.DavException - Specified by:
- setPropertyin interface- org.apache.jackrabbit.webdav.DavResource
- Throws:
- org.apache.jackrabbit.webdav.DavException
 
 
-