org.exoplatform.services.jcr.webdav.resource
Class GenericResource

java.lang.Object
  extended by org.exoplatform.services.jcr.webdav.resource.GenericResource
All Implemented Interfaces:
Resource, PropertyConstants
Direct Known Subclasses:
CollectionResource, FileResource, VersionHistoryResource, VersionResource

public abstract class GenericResource
extends java.lang.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: GenericResource.java 35184 2009-08-07 14:14:37Z pnedonosko $
Author:
Gennady Azarenkov

Field Summary
protected  java.net.URI identifier
           
protected  WebDavNamespaceContext namespaceContext
           
protected static java.util.Set<javax.xml.namespace.QName> PRESET_PROP
           
protected  int type
           
 
Fields inherited from interface org.exoplatform.services.jcr.webdav.resource.Resource
COLLECTION, FILE, NULL, VERSION, VERSION_HISTORY, VERSIONED_COLLECTION, VERSIONED_FILE
 
Fields inherited from interface org.exoplatform.services.jcr.webdav.util.PropertyConstants
CHILDCOUNT, CREATION_PATTERN, CREATIONDATE, DISPLAYNAME, EXCLUSIVE, GETCONTENTLANGUAGE, GETCONTENTLENGTH, GETCONTENTTYPE, GETLASTMODIFIED, HASCHILDREN, ISCOLLECTION, ISFOLDER, ISROOT, ISVERSIONED, LOCKDISCOVERY, LOCKSCOPE, LOCKTYPE, MODIFICATION_PATTERN, ORDERING_TYPE, OWNER, PARENTNAME, RESOURCETYPE, SUPPORTEDLOCK, SUPPORTEDMETHODSET, WRITE
 
Constructor Summary
GenericResource(int type, java.net.URI identifier, WebDavNamespaceContext namespaceContext)
           
 
Method Summary
 java.net.URI getIdentifier()
           
 WebDavNamespaceContext getNamespaceContext()
           
 java.util.Set<org.exoplatform.common.util.HierarchicalProperty> getProperties(boolean namesOnly)
           
 int getType()
           
static org.exoplatform.common.util.HierarchicalProperty lockDiscovery(java.lang.String token, java.lang.String lockOwner, java.lang.String timeOut)
           
protected  org.exoplatform.common.util.HierarchicalProperty supportedLock()
           
protected  org.exoplatform.common.util.HierarchicalProperty supportedMethodSet()
           
 
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 java.net.URI identifier

type

protected final int type

namespaceContext

protected final WebDavNamespaceContext namespaceContext

PRESET_PROP

protected static final java.util.Set<javax.xml.namespace.QName> PRESET_PROP
Constructor Detail

GenericResource

public GenericResource(int type,
                       java.net.URI identifier,
                       WebDavNamespaceContext namespaceContext)
Method Detail

getIdentifier

public final java.net.URI getIdentifier()
Specified by:
getIdentifier in interface Resource
Returns:
resource identifier

getType

public final int getType()
Specified by:
getType in interface Resource
Returns:
resource type

getProperties

public java.util.Set<org.exoplatform.common.util.HierarchicalProperty> getProperties(boolean namesOnly)
                                                                              throws javax.jcr.RepositoryException
Specified by:
getProperties in interface Resource
Parameters:
namesOnly - - if true "empty" properties will be returned (w/o values inside)
Returns:
all properties belonging to this resource
Throws:
javax.jcr.RepositoryException

getNamespaceContext

public final WebDavNamespaceContext getNamespaceContext()
Specified by:
getNamespaceContext in interface Resource
Returns:
namespace context for this resource

lockDiscovery

public static org.exoplatform.common.util.HierarchicalProperty lockDiscovery(java.lang.String token,
                                                                             java.lang.String lockOwner,
                                                                             java.lang.String timeOut)

supportedLock

protected org.exoplatform.common.util.HierarchicalProperty supportedLock()

supportedMethodSet

protected org.exoplatform.common.util.HierarchicalProperty supportedMethodSet()


Copyright © 2012 eXo Platform SAS. All Rights Reserved.