Package org.apache.jackrabbit.webdav.jcr
Class WorkspaceResourceImpl
- java.lang.Object
- 
- org.apache.jackrabbit.webdav.jcr.WorkspaceResourceImpl
 
- 
- All Implemented Interfaces:
- DavResource,- SearchResource,- TransactionResource,- DeltaVResource,- VersionableResource,- VersionControlledResource,- WorkspaceResource
 
 public class WorkspaceResourceImpl extends Object implements WorkspaceResource, VersionControlledResource WorkspaceResourceImpl...
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleaninitedPropsprotected DavPropertyNameSetnamesprotected DavPropertySetpropertiesprotected SupportedLocksupportedLockprotected SupportedReportSetPropertysupportedReports- 
Fields inherited from interface org.apache.jackrabbit.webdav.DavResourceMETHODS
 - 
Fields inherited from interface org.apache.jackrabbit.webdav.version.DeltaVResourceMETHODS, METHODS_INCL_MKWORKSPACE
 - 
Fields inherited from interface org.apache.jackrabbit.webdav.search.SearchResourceMETHODS
 - 
Fields inherited from interface org.apache.jackrabbit.webdav.transaction.TransactionResourceMETHODS
 - 
Fields inherited from interface org.apache.jackrabbit.webdav.version.VersionableResourceMETHODS
 - 
Fields inherited from interface org.apache.jackrabbit.webdav.version.VersionControlledResourceACTIVITY_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
 - 
Fields inherited from interface org.apache.jackrabbit.webdav.version.WorkspaceResourceBASELINE_CONTROLLED_COLLECTION_SET, CURRENT_ACTIVITY_SET, CUURENT_ACTIVITY_SET, WORKSPACE_CHECKOUT_SET
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLockManager(LockManager lockMgr)Add an externalLockManagerto this resource.voidaddMember(DavResource resource, InputContext inputContext)Throws 403 exception (Forbidden)voidaddVersionControl()Converts this versionable resource into a version-controlled resource.voidaddWorkspace(DavResource workspace)The JCR api does not provide methods to create new workspaces.MultiStatusResponsealterProperties(List<? extends PropEntry> changeList)Handles an attempt to setItemResourceConstants.JCR_NAMESPACESand forwards any other set or remove requests to the super class.Stringcheckin()Perform a checkin on the version controlled resource.voidcheckout()Perform a checkout on the version controlled resource.voidcopy(DavResource destination, boolean shallow)ThrowsHttpServletResponse.SC_METHOD_NOT_ALLOWEDprotected DavResourcecreateResourceFromLocator(DavResourceLocator loc)Create a newDavResourcefrom the given locator.booleanexists()Returns true if this webdav resource represents an existing repository item.DavResourcegetCollection()Retrieve the collection that has all workspace collections as internal members.StringgetComplianceClass()Returns a string listing the compliance classes for this resource as it is required for the DAV response header.protected StringgetCreationDate()Returns the creation date which is used for theDavPropertyName.CREATIONDATEproperty.protected StringgetCreatorDisplayName()Returns the display name of the creator which is used for the protectedDeltaVConstants.CREATOR_DISPLAYNAMEproperty.StringgetDisplayName()Returns the name of the workspace.DavResourceFactorygetFactory()Return theDavResourceFactorythat created this resource.StringgetHref()Returns the absolute href of this resource as returned in the multistatus response body.DavResourceLocatorgetLocator()Returns thelocatorobject for this webdav resource, which encapsulates the information for building the complete 'href'.protected DavResourceLocatorgetLocatorFromItem(Item repositoryItem)Build a newDavResourceLocatorfrom the given repository item.protected DavResourceLocatorgetLocatorFromItemPath(String itemPath)Build aDavResourceLocatorfrom the given itemPath path.ActiveLockgetLock(Type type, Scope scope)Return the lock present on this webdav resource ornullif the resource is either not locked or not lockable at all.ActiveLock[]getLocks()Returns an array of all locks applied to the given resource.DavResourceIteratorgetMembers()Returns the resource representing the JCR root node.longgetModificationTime()Always returns 'now'OptionsResponsegetOptionResponse(OptionsInfo optionsInfo)Retrieves the information requested in the OPTIONS request body and returns the corresponding values.DavPropertySetgetProperties()Returns all webdav properties present on this resource that will be return upon aDavConstants.PROPFIND_ALL_PROPrequest.DavProperty<?>getProperty(DavPropertyName name)Return the webdav property with the specified name.DavPropertyName[]getPropertyNames()Returns an array of allproperty namesavailable on this resource.QueryGrammerSetgetQueryGrammerSet()Returns the protected DAV:supported-method-set property which is defined mandatory by RTF 3253.DavResource[]getReferenceResources(DavPropertyName hrefPropertyName)Return an array ofDavResourceobjects that are referenced by the property with the specified name.ReportgetReport(ReportInfo reportInfo)Runs the report specified by the givenReportInfo.protected SessiongetRepositorySession()Shortcut forgetSession().getRepositorySession()StringgetResourcePath()Returns the path of the underlying repository item or the item to be created (PUT/MKCOL).DavSessiongetSession()Retrieve theDavSessionassociated with this resource.StringgetSupportedMethods()Returns a comma separated list of all METHODS supported by the given resource.StringgetTransactionId()The TransactionId ornullaccording to the value of the corresponding requestheaderfield.VersionHistoryResourcegetVersionHistory()Returns theVersionHistoryResource, that is referenced in the 'version-history' property.protected StringgetWorkspaceHref()Retrieve the href of the workspace the current session belongs to.booleanhasLock(Type type, Scope scope)Returns true if this resource has a lock applied with the given type and scope.voidinit(TxLockManager txMgr, String transactionId)Initializes theTransactionResource.protected voidinitLockSupport()Define the set of locks supported by this resource.protected voidinitProperties()Fill the set of default propertiesprotected voidinitPropertyNames()Property names common to all resources.protected voidinitSupportedReports()Define the set of reports supported by this resource.booleanisCollection()Returns true if this webdav resource has the resourcetype 'collection'.booleanisLockable(Type type, Scope scope)Returns true, if theSupportedLockproperty contains an entry with the given type and scope.voidlabel(LabelInfo labelInfo)Modify the labels of the version referenced by the DAV:checked-in property of this checked-in version-controlled resource.ActiveLocklock(LockInfo reqLockInfo)Lock this webdav resource with the information retrieve from the request and return the resulting lockdiscovery object.MultiStatusmerge(MergeInfo mergeInfo)Perform a merge on this resource using the specifiedMergeInfo.voidmove(DavResource destination)ThrowsHttpServletResponse.SC_METHOD_NOT_ALLOWEDprotected StringnormalizeResourceHref(String href)Normalize the resourcehref.ActiveLockrefreshLock(LockInfo info, String lockToken)Only transaction lock may be available on this resource.voidremoveMember(DavResource member)Throws 403 exception (Forbidden)voidremoveProperty(DavPropertyName propertyName)ThrowsHttpServletResponse.SC_METHOD_NOT_ALLOWEDMultiStatussearch(SearchInfo sInfo)Runs a search with the language and query defined in theSearchInfoobject specified and returns aMultiStatusobject listing the results.voidsetProperty(DavProperty<?> property)Allows to alter the registered namespaces (ItemResourceConstants.JCR_NAMESPACES) or register node typesItemResourceConstants.JCR_NODETYPES_CNDwhere the passed value is a cnd string containing the definition and forwards any other property to the super class.voidspool(OutputContext outputContext)Spools the resource properties and ev.voiduncheckout()Perform an uncheckout on the version controlled resource.voidunlock(String lockToken)ThrowsHttpServletResponse.SC_METHOD_NOT_ALLOWEDsince only transaction locks may be present on this resource, that need to be released by callingTransactionResource.unlock(String, org.apache.jackrabbit.webdav.transaction.TransactionInfo).voidunlock(String lockToken, TransactionInfo tInfo)Overloads theunlockmethod of theDavResourceinterface.MultiStatusupdate(UpdateInfo updateInfo)While RFC 3253 does not define any version-related operations for the workspace resource, this implementation usesVersionControlledResource.update(UpdateInfo)to mapWorkspace.restore(javax.jcr.version.Version[], boolean)to a WebDAV call.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.jackrabbit.webdav.DavResourceaddLockManager, copy, getComplianceClass, getFactory, getHref, getLocator, getLock, getLocks, getProperties, getPropertyNames, getResourcePath, getSession, hasLock, isLockable, lock, move, refreshLock, removeProperty, unlock
 - 
Methods inherited from interface org.apache.jackrabbit.webdav.version.DeltaVResourceaddWorkspace, getOptionResponse, getReferenceResources, getReport
 
- 
 
- 
- 
- 
Field Detail- 
initedPropsprotected boolean initedProps 
 - 
propertiesprotected DavPropertySet properties 
 - 
namesprotected DavPropertyNameSet names 
 - 
supportedLockprotected SupportedLock supportedLock 
 - 
supportedReportsprotected SupportedReportSetProperty supportedReports 
 
- 
 - 
Method Detail- 
getPropertypublic DavProperty<?> getProperty(DavPropertyName name) Description copied from interface:DavResourceReturn the webdav property with the specified name.- Specified by:
- getPropertyin interface- DavResource
- Parameters:
- name- name of the webdav property
- Returns:
- the DavPropertywith the given name ornullif the property does not exist.
- See Also:
- DavResource.getProperty(org.apache.jackrabbit.webdav.property.DavPropertyName)
 
 - 
getSupportedMethodspublic String getSupportedMethods() Description copied from interface:DavResourceReturns a comma separated list of all METHODS supported by the given resource.- Specified by:
- getSupportedMethodsin interface- DavResource
- Returns:
- METHODS supported by this resource.
 
 - 
existspublic boolean exists() Description copied from interface:DavResourceReturns true if this webdav resource represents an existing repository item.- Specified by:
- existsin interface- DavResource
- Returns:
- true if the workspace name (see getDisplayName()is present in the list of available workspace names such as exposed by the editing JCR session.
 
 - 
isCollectionpublic boolean isCollection() Description copied from interface:DavResourceReturns true if this webdav resource has the resourcetype 'collection'.- Specified by:
- isCollectionin interface- DavResource
- Returns:
- true
 
 - 
getDisplayNamepublic String getDisplayName() Returns the name of the workspace.- Specified by:
- getDisplayNamein interface- DavResource
- Returns:
- The workspace name
- See Also:
- DavResource.getDisplayName(),- Workspace.getName()
 
 - 
getModificationTimepublic long getModificationTime() Always returns 'now'- Specified by:
- getModificationTimein interface- DavResource
- Returns:
 
 - 
spoolpublic void spool(OutputContext outputContext) throws IOException Description copied from interface:DavResourceSpools the resource properties and ev. content to the specified context (e.g. to respond to a 'GET' or 'HEAD' request). The context could e.g. wrap the servlet response.- Specified by:
- spoolin interface- DavResource
- Parameters:
- outputContext-
- Throws:
- IOException
 
 - 
getCollectionpublic DavResource getCollection() Retrieve the collection that has all workspace collections as internal members.- Specified by:
- getCollectionin interface- DavResource
- Returns:
- resource this resource is an internal member of. In case this resource
 is the root nullis returned.
- See Also:
- DavResource.getCollection()
 
 - 
addMemberpublic void addMember(DavResource resource, InputContext inputContext) throws DavException Throws 403 exception (Forbidden)- Specified by:
- addMemberin interface- DavResource
- Parameters:
- resource-
- inputContext-
- Throws:
- DavException
 
 - 
getMemberspublic DavResourceIterator getMembers() Returns the resource representing the JCR root node.- Specified by:
- getMembersin interface- DavResource
- Returns:
 
 - 
removeMemberpublic void removeMember(DavResource member) throws DavException Throws 403 exception (Forbidden)- Specified by:
- removeMemberin interface- DavResource
- Parameters:
- member-
- Throws:
- DavException
 
 - 
setPropertypublic void setProperty(DavProperty<?> property) throws DavException Allows to alter the registered namespaces (ItemResourceConstants.JCR_NAMESPACES) or register node typesItemResourceConstants.JCR_NODETYPES_CNDwhere the passed value is a cnd string containing the definition and forwards any other property to the super class.Note that again no property status is set. Any failure while setting a property results in an exception (violating RFC 2518). - Specified by:
- setPropertyin interface- DavResource
- Parameters:
- property-
- Throws:
- DavException
- See Also:
- DavResource.setProperty(org.apache.jackrabbit.webdav.property.DavProperty)
 
 - 
alterPropertiespublic MultiStatusResponse alterProperties(List<? extends PropEntry> changeList) throws DavException Handles an attempt to setItemResourceConstants.JCR_NAMESPACESand forwards any other set or remove requests to the super class.- Specified by:
- alterPropertiesin interface- DavResource
- Parameters:
- changeList- list containing- DavPropertyNameobjects (for properties to be removed) and- DavPropertyobjects (for properties to be added/set).
- Returns:
- multistatus response listing the status resulting from setting and/or removing the specified properties, in order to allow a detailed multistatus response.
- Throws:
- DavException- if an error occurred. This may be the case if the general state of the resource prevents any properties to be set or removed (e.g. due to a lock).
- See Also:
- setProperty(DavProperty),- DefaultItemCollection.alterProperties(List)
 
 - 
addVersionControlpublic void addVersionControl() throws DavExceptionDescription copied from interface:VersionableResourceConverts this versionable resource into a version-controlled resource. If this resource is already version-controlled this resource is not affected. If however, this resource is not versionable anDavException(error code:HttpServletResponse.SC_METHOD_NOT_ALLOWEDis thrown. The same applies, if this resource is versionable but its current state does not allow to made it a version-controlled one or if any other error occurs.- Specified by:
- addVersionControlin interface- VersionableResource
- Throws:
- DavException- (403) since workspace is not versionable. implementing- VersionControlledResourceonly for 'update'.
 
 - 
checkinpublic String checkin() throws DavException Description copied from interface:VersionControlledResourcePerform a checkin on the version controlled resource.- Specified by:
- checkinin interface- VersionControlledResource
- Returns:
- String representing the location of the version created by the checkin.
- Throws:
- DavException- (403) since workspace is not versionable. implementing- VersionControlledResourceonly for 'update'.
 
 - 
checkoutpublic void checkout() throws DavExceptionDescription copied from interface:VersionControlledResourcePerform a checkout on the version controlled resource.- Specified by:
- checkoutin interface- VersionControlledResource
- Throws:
- DavException- (403) since workspace is not versionable. implementing- VersionControlledResourceonly for 'update'.
 
 - 
uncheckoutpublic void uncheckout() throws DavExceptionDescription copied from interface:VersionControlledResourcePerform an uncheckout on the version controlled resource.- Specified by:
- uncheckoutin interface- VersionControlledResource
- Throws:
- DavException- (403) since workspace is not versionable. implementing- VersionControlledResourceonly for 'update'.
 
 - 
updatepublic MultiStatus update(UpdateInfo updateInfo) throws DavException While RFC 3253 does not define any version-related operations for the workspace resource, this implementation usesVersionControlledResource.update(UpdateInfo)to mapWorkspace.restore(javax.jcr.version.Version[], boolean)to a WebDAV call.Limitation: note that the MultiStatusreturned by this method will not list any nodes that have been removed due to an Uuid conflict.- Specified by:
- updatein interface- VersionControlledResource
- Parameters:
- updateInfo-
- Returns:
- Throws:
- DavException
- See Also:
- VersionControlledResource.update(org.apache.jackrabbit.webdav.version.UpdateInfo)
 
 - 
mergepublic MultiStatus merge(MergeInfo mergeInfo) throws DavException Description copied from interface:VersionControlledResourcePerform a merge on this resource using the specifiedMergeInfo.- Specified by:
- mergein interface- VersionControlledResource
- Returns:
- MultiStatuscontaining the list of resources that have been modified.
- Throws:
- DavException- (403) since workspace is not versionable. implementing- VersionControlledResourceonly for 'update'.
 
 - 
labelpublic void label(LabelInfo labelInfo) throws DavException Description copied from interface:VersionControlledResourceModify the labels of the version referenced by the DAV:checked-in property of this checked-in version-controlled resource. If the resource is not checked-in the request must fail.- Specified by:
- labelin interface- VersionControlledResource
- Throws:
- DavException- (403) since workspace is not versionable. implementing- VersionControlledResourceonly for 'update'.
- See Also:
- LabelInfo,- for the pre- and postcondition of a successful LABEL request.
 
 - 
getVersionHistorypublic VersionHistoryResource getVersionHistory() throws DavException Description copied from interface:VersionControlledResourceReturns theVersionHistoryResource, that is referenced in the 'version-history' property.- Specified by:
- getVersionHistoryin interface- VersionControlledResource
- Returns:
- Throws:
- DavException- (403) since workspace is not versionable. implementing- VersionControlledResourceonly for 'update'.
 
 - 
initLockSupportprotected void initLockSupport() Define the set of locks supported by this resource.- See Also:
- SupportedLock
 
 - 
initSupportedReportsprotected void initSupportedReports() Define the set of reports supported by this resource.- See Also:
- SupportedReportSetProperty,- AbstractResource.initSupportedReports()
 
 - 
getWorkspaceHrefprotected String getWorkspaceHref() Retrieve the href of the workspace the current session belongs to.- Returns:
- href of the workspace
 
 - 
initPropertyNamesprotected void initPropertyNames() Property names common to all resources.
 - 
initPropertiesprotected void initProperties() Fill the set of default properties
 - 
getComplianceClasspublic String getComplianceClass() Returns a string listing the compliance classes for this resource as it is required for the DAV response header. This includes DAV 1, 2 which is supported by all derived classes as well as a subset of the classes defined by DeltaV: version-control, version-history, checkout-in-place, label, merge, update and workspace.
 Those compliance classes are added as required by RFC3253 since all all resources in the jcr-server support at least the reporting and some basic versioning functionality.- Specified by:
- getComplianceClassin interface- DavResource
- Returns:
- string listing the compliance classes.
- See Also:
- DavResource.getComplianceClass()
 
 - 
getLocatorpublic DavResourceLocator getLocator() Description copied from interface:DavResourceReturns thelocatorobject for this webdav resource, which encapsulates the information for building the complete 'href'.- Specified by:
- getLocatorin interface- DavResource
- Returns:
- the locator for this resource.
- See Also:
- DavResource.getLocator()
 
 - 
getResourcePathpublic String getResourcePath() Returns the path of the underlying repository item or the item to be created (PUT/MKCOL). If the resource exists but does not represent a repository itemnullis returned.- Specified by:
- getResourcePathin interface- DavResource
- Returns:
- path of the underlying repository item.
- See Also:
- DavResource.getResourcePath(),- DavResourceLocator.getResourcePath()
 
 - 
getHrefpublic String getHref() Description copied from interface:DavResourceReturns the absolute href of this resource as returned in the multistatus response body.- Specified by:
- getHrefin interface- DavResource
- Returns:
- href
- See Also:
- DavResource.getHref(),- DavResourceLocator.getHref(boolean)
 
 - 
getPropertyNamespublic DavPropertyName[] getPropertyNames() Description copied from interface:DavResourceReturns an array of allproperty namesavailable on this resource.- Specified by:
- getPropertyNamesin interface- DavResource
- Returns:
- an array of property names.
- See Also:
- DavResource.getPropertyNames()
 
 - 
getPropertiespublic DavPropertySet getProperties() Description copied from interface:DavResourceReturns all webdav properties present on this resource that will be return upon aDavConstants.PROPFIND_ALL_PROPrequest. The implementation may in addition expose other (protected or calculated) properties which should be marked accordingly (see alsoDavProperty.isInvisibleInAllprop().- Specified by:
- getPropertiesin interface- DavResource
- Returns:
- a DavPropertySetcontaining at least all properties of this resource that are exposed in 'allprop' PROPFIND request.
- See Also:
- DavResource.getProperties()
 
 - 
removePropertypublic void removeProperty(DavPropertyName propertyName) throws DavException ThrowsHttpServletResponse.SC_METHOD_NOT_ALLOWED- Specified by:
- removePropertyin interface- DavResource
- Parameters:
- propertyName-
- Throws:
- DavException- Always throws- HttpServletResponse.SC_METHOD_NOT_ALLOWED
- See Also:
- DavResource.removeProperty(org.apache.jackrabbit.webdav.property.DavPropertyName)
 
 - 
movepublic void move(DavResource destination) throws DavException ThrowsHttpServletResponse.SC_METHOD_NOT_ALLOWED- Specified by:
- movein interface- DavResource
- Parameters:
- destination-
- Throws:
- DavException- Always throws- HttpServletResponse.SC_METHOD_NOT_ALLOWED
- See Also:
- DavResource.move(org.apache.jackrabbit.webdav.DavResource)
 
 - 
copypublic void copy(DavResource destination, boolean shallow) throws DavException ThrowsHttpServletResponse.SC_METHOD_NOT_ALLOWED- Specified by:
- copyin interface- DavResource
- Parameters:
- destination-
- shallow-
- Throws:
- DavException- Always throws- HttpServletResponse.SC_METHOD_NOT_ALLOWED
- See Also:
- DavResource.copy(org.apache.jackrabbit.webdav.DavResource, boolean)
 
 - 
isLockablepublic boolean isLockable(Type type, Scope scope) Returns true, if theSupportedLockproperty contains an entry with the given type and scope. By default resources allow fortransactionlock only.- Specified by:
- isLockablein interface- DavResource
- Parameters:
- type-
- scope-
- Returns:
- true if this resource may be locked by the given type and scope.
- See Also:
- DavResource.isLockable(org.apache.jackrabbit.webdav.lock.Type, org.apache.jackrabbit.webdav.lock.Scope)
 
 - 
hasLockpublic boolean hasLock(Type type, Scope scope) Returns true if this resource has a lock applied with the given type and scope.- Specified by:
- hasLockin interface- DavResource
- Parameters:
- type-
- scope-
- Returns:
- true if this resource has a lock applied with the given type and scope.
- See Also:
- DavResource.hasLock(Type, Scope)
 
 - 
getLockpublic ActiveLock getLock(Type type, Scope scope) Description copied from interface:DavResourceReturn the lock present on this webdav resource ornullif the resource is either not locked or not lockable at all. Note, that a resource may have a lock that is inherited by a deep lock enforced on one of its 'parent' resources.- Specified by:
- getLockin interface- DavResource
- Returns:
- lock information of this resource or nullif this resource has no lock applying it. If an error occurs while retrieving the lock informationnullis returned as well.
- See Also:
- DavResource.getLock(Type, Scope)
 
 - 
getLockspublic ActiveLock[] getLocks() Description copied from interface:DavResourceReturns an array of all locks applied to the given resource.- Specified by:
- getLocksin interface- DavResource
- Returns:
- array of locks. The array is empty if there are no locks applied to this resource.
- See Also:
- todo improve....
 
 - 
lockpublic ActiveLock lock(LockInfo reqLockInfo) throws DavException Description copied from interface:DavResourceLock this webdav resource with the information retrieve from the request and return the resulting lockdiscovery object.- Specified by:
- lockin interface- DavResource
- Parameters:
- reqLockInfo- lock info as retrieved from the request.
- Returns:
- lockdiscovery object to be returned in the response. If the lock
 could not be obtained a DavExceptionis thrown.
- Throws:
- DavException- if the lock could not be obtained.
- See Also:
- DavResource.lock(org.apache.jackrabbit.webdav.lock.LockInfo)
 
 - 
refreshLockpublic ActiveLock refreshLock(LockInfo info, String lockToken) throws DavException Only transaction lock may be available on this resource.- Specified by:
- refreshLockin interface- DavResource
- Parameters:
- info-
- lockToken-
- Returns:
- lockdiscovery object to be returned in the response body. If the lock
 could not be refreshed a DavExceptionis thrown.
- Throws:
- DavException
- See Also:
- DavResource.refreshLock(org.apache.jackrabbit.webdav.lock.LockInfo, String)
 
 - 
unlockpublic void unlock(String lockToken) throws DavException ThrowsHttpServletResponse.SC_METHOD_NOT_ALLOWEDsince only transaction locks may be present on this resource, that need to be released by callingTransactionResource.unlock(String, org.apache.jackrabbit.webdav.transaction.TransactionInfo).- Specified by:
- unlockin interface- DavResource
- Parameters:
- lockToken-
- Throws:
- DavException- Always throws- HttpServletResponse.SC_METHOD_NOT_ALLOWED
 
 - 
addLockManagerpublic void addLockManager(LockManager lockMgr) Description copied from interface:DavResourceAdd an externalLockManagerto this resource. This method may throwUnsupportedOperationExceptionif the resource does handle locking itself.- Specified by:
- addLockManagerin interface- DavResource
- See Also:
- DavResource.addLockManager(org.apache.jackrabbit.webdav.lock.LockManager)
 
 - 
getFactorypublic DavResourceFactory getFactory() Description copied from interface:DavResourceReturn theDavResourceFactorythat created this resource.- Specified by:
- getFactoryin interface- DavResource
- Returns:
- the factory that created this resource.
- See Also:
- DavResource.getFactory()
 
 - 
getSessionpublic DavSession getSession() Description copied from interface:DavResourceRetrieve theDavSessionassociated with this resource.- Specified by:
- getSessionin interface- DavResource
- Returns:
- session object associated with this resource.
- See Also:
- DavResource.getSession(),- DavResource.getSession()
 
 - 
initpublic void init(TxLockManager txMgr, String transactionId) Description copied from interface:TransactionResourceInitializes theTransactionResource.- Specified by:
- initin interface- TransactionResource
- See Also:
- TransactionResource.init(TxLockManager, String)
 
 - 
unlockpublic void unlock(String lockToken, TransactionInfo tInfo) throws DavException Description copied from interface:TransactionResourceOverloads theunlockmethod of theDavResourceinterface.- Specified by:
- unlockin interface- TransactionResource
- Parameters:
- lockToken- lock token as present in the request header.
- tInfo- transaction info object as present in the UNLOCK request body.
- Throws:
- DavException- if an error occurs
- See Also:
- TransactionResource.unlock(String, org.apache.jackrabbit.webdav.transaction.TransactionInfo)
 
 - 
getTransactionIdpublic String getTransactionId() Description copied from interface:TransactionResourceThe TransactionId ornullaccording to the value of the corresponding requestheaderfield.- Specified by:
- getTransactionIdin interface- TransactionResource
- Returns:
- TransactionId header or null
- See Also:
- TransactionResource.getTransactionId()
 
 - 
getOptionResponsepublic OptionsResponse getOptionResponse(OptionsInfo optionsInfo) Description copied from interface:DeltaVResourceRetrieves the information requested in the OPTIONS request body and returns the corresponding values.- Specified by:
- getOptionResponsein interface- DeltaVResource
- Parameters:
- optionsInfo-
- Returns:
- object to be used in the OPTIONS response body or null
- See Also:
- DeltaVResource.getOptionResponse(org.apache.jackrabbit.webdav.version.OptionsInfo)
 
 - 
getReportpublic Report getReport(ReportInfo reportInfo) throws DavException Description copied from interface:DeltaVResourceRuns the report specified by the givenReportInfo.- Specified by:
- getReportin interface- DeltaVResource
- Parameters:
- reportInfo-
- Returns:
- the requested report
- Throws:
- DavException
- See Also:
- DeltaVResource.getReport(org.apache.jackrabbit.webdav.version.report.ReportInfo)
 
 - 
addWorkspacepublic void addWorkspace(DavResource workspace) throws DavException The JCR api does not provide methods to create new workspaces. CallingaddWorkspaceon this resource will always fail.- Specified by:
- addWorkspacein interface- DeltaVResource
- Parameters:
- workspace-
- Throws:
- DavException- Always throws.
- See Also:
- DeltaVResource.addWorkspace(org.apache.jackrabbit.webdav.DavResource)
 
 - 
getReferenceResourcespublic DavResource[] getReferenceResources(DavPropertyName hrefPropertyName) throws DavException Return an array ofDavResourceobjects that are referenced by the property with the specified name.- Specified by:
- getReferenceResourcesin interface- DeltaVResource
- Parameters:
- hrefPropertyName-
- Returns:
- array of DavResources
- Throws:
- DavException
- See Also:
- DeltaVResource.getReferenceResources(org.apache.jackrabbit.webdav.property.DavPropertyName)
 
 - 
getQueryGrammerSetpublic QueryGrammerSet getQueryGrammerSet() Description copied from interface:SearchResourceReturns the protected DAV:supported-method-set property which is defined mandatory by RTF 3253. This method call is a shortcut forDavResource.getProperty(SearchConstants.QUERY_GRAMMER_SET).- Specified by:
- getQueryGrammerSetin interface- SearchResource
- Returns:
- See Also:
- SearchResource.getQueryGrammerSet()
 
 - 
searchpublic MultiStatus search(SearchInfo sInfo) throws DavException Description copied from interface:SearchResourceRuns a search with the language and query defined in theSearchInfoobject specified and returns aMultiStatusobject listing the results.- Specified by:
- searchin interface- SearchResource
- Parameters:
- sInfo-
- Returns:
- Throws:
- DavException
- See Also:
- SearchResource.search(org.apache.jackrabbit.webdav.search.SearchInfo)
 
 - 
createResourceFromLocatorprotected DavResource createResourceFromLocator(DavResourceLocator loc) throws DavException Create a newDavResourcefrom the given locator.- Parameters:
- loc-
- Returns:
- new DavResource
- Throws:
- DavException
 
 - 
getLocatorFromItemPathprotected DavResourceLocator getLocatorFromItemPath(String itemPath) Build aDavResourceLocatorfrom the given itemPath path.- Parameters:
- itemPath-
- Returns:
- a new DavResourceLocator
- See Also:
- DavLocatorFactory.createResourceLocator(String, String, String)
 
 - 
getLocatorFromItemprotected DavResourceLocator getLocatorFromItem(Item repositoryItem) Build a newDavResourceLocatorfrom the given repository item.- Parameters:
- repositoryItem-
- Returns:
- a new locator for the specified item.
- See Also:
- getLocatorFromItemPath(String)
 
 - 
getRepositorySessionprotected Session getRepositorySession() Shortcut forgetSession().getRepositorySession()- Returns:
- repository session present in the AbstractResource.session.
 
 - 
getCreatorDisplayNameprotected String getCreatorDisplayName() Returns the display name of the creator which is used for the protectedDeltaVConstants.CREATOR_DISPLAYNAMEproperty.- Returns:
- always null; subclasses may provide a regular value.
 
 - 
getCreationDateprotected String getCreationDate() Returns the creation date which is used for theDavPropertyName.CREATIONDATEproperty.- Returns:
- a dummy date; subclasses may provide a reasonable value.
 
 
- 
 
-