Class GenericResource
- java.lang.Object
-
- org.exoplatform.services.jcr.webdav.resource.GenericResource
-
- All Implemented Interfaces:
Resource,PropertyConstants
- Direct Known Subclasses:
CollectionResource,FileResource,VersionHistoryResource,VersionResource
public abstract class GenericResource extends Object implements Resource
Created by The eXo Platform SARL .
Abstract WebDav Resource implementation It is recommended to extend this class instead of implement Resource itself- Version:
- $Id: $
- Author:
- Gennady Azarenkov
-
-
Field Summary
Fields Modifier and Type Field Description protected URIidentifierResource identifier.protected WebDavNamespaceContextnamespaceContextNamespace context.protected static Set<QName>PRESET_PROPProperties which are set by JCR.protected inttypeResource type.-
Fields inherited from interface org.exoplatform.services.jcr.webdav.util.PropertyConstants
CHILDCOUNT, CREATION_PATTERN, CREATIONDATE, DAV_ALLPROP, DAV_ALLPROP_INCLUDE, DISPLAYNAME, EXCLUSIVE, GETCONTENTLANGUAGE, GETCONTENTLENGTH, GETCONTENTTYPE, GETLASTMODIFIED, HASCHILDREN, IS_READ_ONLY, ISCOLLECTION, ISFOLDER, ISROOT, ISVERSIONED, JCR_CONTENT, JCR_DATA, LOCKDISCOVERY, LOCKSCOPE, LOCKTYPE, MODIFICATION_PATTERN, ORDERING_TYPE, OWNER, PARENTNAME, RESOURCETYPE, SUPPORTEDLOCK, SUPPORTEDMETHODSET, WRITE
-
Fields inherited from interface org.exoplatform.services.jcr.webdav.resource.Resource
COLLECTION, FILE, NULL, VERSION, VERSION_HISTORY, VERSIONED_COLLECTION, VERSIONED_FILE
-
-
Constructor Summary
Constructors Constructor Description GenericResource(int type, URI identifier, WebDavNamespaceContext namespaceContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdecodeValue(String value)URIgetIdentifier()WebDavNamespaceContextgetNamespaceContext()Set<org.exoplatform.common.util.HierarchicalProperty>getProperties(boolean namesOnly)intgetType()static org.exoplatform.common.util.HierarchicalPropertylockDiscovery(String token, String lockOwner, String timeOut)Returns the information about lock.protected org.exoplatform.common.util.HierarchicalPropertysupportedLock()The information about supported locks.protected org.exoplatform.common.util.HierarchicalPropertysupportedMethodSet()The information about supported methods.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.exoplatform.services.jcr.webdav.resource.Resource
getProperty, isCollection
-
-
-
-
Field Detail
-
identifier
protected final URI identifier
Resource identifier.
-
type
protected final int type
Resource type.
-
namespaceContext
protected final WebDavNamespaceContext namespaceContext
Namespace context.
-
-
Constructor Detail
-
GenericResource
public GenericResource(int type, URI identifier, WebDavNamespaceContext namespaceContext)- Parameters:
type- resource typeidentifier- resource identifiernamespaceContext- namespace context
-
-
Method Detail
-
getIdentifier
public final URI getIdentifier()
- Specified by:
getIdentifierin interfaceResource- Returns:
- resource identifier
-
getType
public final int getType()
-
getProperties
public Set<org.exoplatform.common.util.HierarchicalProperty> getProperties(boolean namesOnly) throws javax.jcr.RepositoryException
- Specified by:
getPropertiesin interfaceResource- Parameters:
namesOnly- - if true "empty" properties will be returned (w/o values inside)- Returns:
- all properties belonging to this resource
- Throws:
javax.jcr.RepositoryException-RepositoryException
-
getNamespaceContext
public final WebDavNamespaceContext getNamespaceContext()
- Specified by:
getNamespaceContextin interfaceResource- Returns:
- namespace context for this resource
-
lockDiscovery
public static org.exoplatform.common.util.HierarchicalProperty lockDiscovery(String token, String lockOwner, String timeOut)
Returns the information about lock.- Parameters:
token- lock tokenlockOwner- lockownertimeOut- lock timeout- Returns:
- lock information
-
supportedLock
protected org.exoplatform.common.util.HierarchicalProperty supportedLock()
The information about supported locks.- Returns:
- information about supported locks
-
supportedMethodSet
protected org.exoplatform.common.util.HierarchicalProperty supportedMethodSet()
The information about supported methods.- Returns:
- information about supported methods
-
-