Class DeltaVResourceImpl
- java.lang.Object
-
- org.apache.jackrabbit.webdav.simple.DavResourceImpl
-
- org.apache.jackrabbit.webdav.simple.DeltaVResourceImpl
-
- All Implemented Interfaces:
JcrConstants,BindableResource,DavResource,DeltaVResource
- Direct Known Subclasses:
VersionControlledResourceImpl,VersionHistoryResourceImpl,VersionResourceImpl
public class DeltaVResourceImpl extends DavResourceImpl implements DeltaVResource
TheDeltaVResourceImplencapsulates the functionality common to all DeltaV compliant resources.
-
-
Field Summary
Fields Modifier and Type Field Description protected SupportedReportSetPropertysupportedReports-
Fields inherited from class org.apache.jackrabbit.webdav.simple.DavResourceImpl
COMPLIANCE_CLASSES, METHODS, properties, propsInitialized
-
Fields inherited from interface org.apache.jackrabbit.webdav.version.DeltaVResource
METHODS, METHODS_INCL_MKWORKSPACE
-
Fields inherited from interface org.apache.jackrabbit.JcrConstants
JCR_AUTOCREATED, JCR_BASEVERSION, JCR_CHILD, JCR_CHILDNODEDEFINITION, JCR_CONTENT, JCR_CREATED, JCR_DATA, JCR_DEFAULTPRIMARYTYPE, JCR_DEFAULTVALUES, JCR_ENCODING, JCR_FROZENMIXINTYPES, JCR_FROZENNODE, JCR_FROZENPRIMARYTYPE, JCR_FROZENUUID, JCR_HASORDERABLECHILDNODES, JCR_ISCHECKEDOUT, JCR_ISMIXIN, JCR_LANGUAGE, JCR_LASTMODIFIED, JCR_LOCKISDEEP, JCR_LOCKOWNER, JCR_MANDATORY, JCR_MERGEFAILED, JCR_MIMETYPE, JCR_MIXINTYPES, JCR_MULTIPLE, JCR_NAME, JCR_NODETYPENAME, JCR_ONPARENTVERSION, JCR_PATH, JCR_PREDECESSORS, JCR_PRIMARYITEMNAME, JCR_PRIMARYTYPE, JCR_PROPERTYDEFINITION, JCR_PROTECTED, JCR_REQUIREDPRIMARYTYPES, JCR_REQUIREDTYPE, JCR_ROOTVERSION, JCR_SAMENAMESIBLINGS, JCR_SCORE, JCR_STATEMENT, JCR_SUCCESSORS, JCR_SUPERTYPES, JCR_SYSTEM, JCR_UUID, JCR_VALUECONSTRAINTS, JCR_VERSIONABLEUUID, JCR_VERSIONHISTORY, JCR_VERSIONLABELS, JCR_VERSIONSTORAGE, MIX_LOCKABLE, MIX_REFERENCEABLE, MIX_SHAREABLE, MIX_VERSIONABLE, NT_BASE, NT_CHILDNODEDEFINITION, NT_FILE, NT_FOLDER, NT_FROZENNODE, NT_HIERARCHYNODE, NT_LINKEDFILE, NT_NODETYPE, NT_PROPERTYDEFINITION, NT_QUERY, NT_RESOURCE, NT_UNSTRUCTURED, NT_VERSION, NT_VERSIONEDCHILD, NT_VERSIONHISTORY, NT_VERSIONLABELS
-
-
Constructor Summary
Constructors Constructor Description DeltaVResourceImpl(DavResourceLocator locator, DavResourceFactory factory, DavSession session, ResourceConfig config, boolean isCollection)DeltaVResourceImpl(DavResourceLocator locator, DavResourceFactory factory, DavSession session, ResourceConfig config, Item item)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddWorkspace(DavResource workspace)The JCR api does not provide methods to create new workspaces.protected DavResourcecreateResourceFromLocator(DavResourceLocator loc)Create a newDavResourcefrom the given locator.StringgetComplianceClass()Returns a comma separated list of all compliance classes the given resource is fulfilling.protected HrefPropertygetHrefProperty(DavPropertyName name, Node[] values, boolean isProtected, boolean isCollection)Returns aHrefPropertywith the specified property name and values.protected DavResourceLocatorgetLocatorFromNode(Node repositoryNode)Build a newDavResourceLocatorfrom the given repository node.protected DavResourceLocatorgetLocatorFromNodePath(String nodePath)Build aDavResourceLocatorfrom the given nodePath path.OptionsResponsegetOptionResponse(OptionsInfo optionsInfo)Retrieves the information requested in the OPTIONS request body and returns the corresponding values.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 voidinitProperties()Fill the property set for this resource.protected voidinitSupportedReports()Initialize the supported reports field-
Methods inherited from class org.apache.jackrabbit.webdav.simple.DavResourceImpl
addLockManager, addMember, alterProperties, bind, copy, exists, getCollection, getDisplayName, getExportContext, getFactory, getHref, getImportContext, getLocator, getLock, getLocks, getMembers, getModificationTime, getNode, getParentElements, getProperties, getProperty, getPropertyExportContext, getPropertyImportContext, getPropertyNames, getResourcePath, getSession, getSupportedMethods, hasLock, isCollection, isLockable, lock, move, rebind, refreshLock, removeMember, removeProperty, setProperty, spool, unlock
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.webdav.DavResource
addLockManager, addMember, alterProperties, copy, exists, getCollection, getDisplayName, getFactory, getHref, getLocator, getLock, getLocks, getMembers, getModificationTime, getProperties, getProperty, getPropertyNames, getResourcePath, getSession, getSupportedMethods, hasLock, isCollection, isLockable, lock, move, refreshLock, removeMember, removeProperty, setProperty, spool, unlock
-
-
-
-
Field Detail
-
supportedReports
protected SupportedReportSetProperty supportedReports
-
-
Constructor Detail
-
DeltaVResourceImpl
public DeltaVResourceImpl(DavResourceLocator locator, DavResourceFactory factory, DavSession session, ResourceConfig config, Item item) throws DavException
- Throws:
DavException
-
DeltaVResourceImpl
public DeltaVResourceImpl(DavResourceLocator locator, DavResourceFactory factory, DavSession session, ResourceConfig config, boolean isCollection) throws DavException
- Throws:
DavException
-
-
Method Detail
-
getComplianceClass
public String getComplianceClass()
Description copied from interface:DavResourceReturns a comma separated list of all compliance classes the given resource is fulfilling.- Specified by:
getComplianceClassin interfaceDavResource- Overrides:
getComplianceClassin classDavResourceImpl- Returns:
- compliance classes
- See Also:
DavResource.getComplianceClass()
-
getOptionResponse
public 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 interfaceDeltaVResource- Parameters:
optionsInfo-- Returns:
- object to be used in the OPTIONS response body or
null - See Also:
DeltaVResource.getOptionResponse(org.apache.jackrabbit.webdav.version.OptionsInfo)
-
getReport
public Report getReport(ReportInfo reportInfo) throws DavException
Description copied from interface:DeltaVResourceRuns the report specified by the givenReportInfo.- Specified by:
getReportin interfaceDeltaVResource- Parameters:
reportInfo-- Returns:
- the requested report
- Throws:
DavException- See Also:
DeltaVResource.getReport(org.apache.jackrabbit.webdav.version.report.ReportInfo)
-
addWorkspace
public 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 interfaceDeltaVResource- Parameters:
workspace-- Throws:
DavException- Always throws.- See Also:
DeltaVResource.addWorkspace(org.apache.jackrabbit.webdav.DavResource)
-
getReferenceResources
public DavResource[] getReferenceResources(DavPropertyName hrefPropertyName) throws DavException
Return an array ofDavResourceobjects that are referenced by the property with the specified name.- Specified by:
getReferenceResourcesin interfaceDeltaVResource- Parameters:
hrefPropertyName-- Returns:
- array of
DavResources - Throws:
DavException- See Also:
DeltaVResource.getReferenceResources(org.apache.jackrabbit.webdav.property.DavPropertyName)
-
getLocatorFromNodePath
protected DavResourceLocator getLocatorFromNodePath(String nodePath)
Build aDavResourceLocatorfrom the given nodePath path.- Parameters:
nodePath-- Returns:
- a new
DavResourceLocator - See Also:
DavLocatorFactory.createResourceLocator(String, String, String)
-
getLocatorFromNode
protected DavResourceLocator getLocatorFromNode(Node repositoryNode)
Build a newDavResourceLocatorfrom the given repository node.- Parameters:
repositoryNode-- Returns:
- a new locator for the specified node.
- See Also:
getLocatorFromNodePath(String)
-
createResourceFromLocator
protected DavResource createResourceFromLocator(DavResourceLocator loc) throws DavException
Create a newDavResourcefrom the given locator.- Parameters:
loc-- Returns:
- new
DavResource - Throws:
DavException
-
getHrefProperty
protected HrefProperty getHrefProperty(DavPropertyName name, Node[] values, boolean isProtected, boolean isCollection)
Returns aHrefPropertywith the specified property name and values. Each node present in the specified array is referenced in the resulting property.- Parameters:
name-values-isProtected-- Returns:
- HrefProperty
-
initSupportedReports
protected void initSupportedReports()
Initialize the supported reports field
-
initProperties
protected void initProperties()
Fill the property set for this resource.- Overrides:
initPropertiesin classDavResourceImpl
-
-