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

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

public class CollectionResource
extends GenericResource

Created by The eXo Platform SARL .
Other than nt:file/jcr:content(nt:resource)

Version:
$Id: CollectionResource.java 38171 2009-10-06 07:39:42Z dkatayev $
Author:
Gennady Azarenkov

Field Summary
protected static java.util.Set<java.lang.String> COLLECTION_SKIP
           
protected  javax.jcr.Node node
           
 
Fields inherited from class org.exoplatform.services.jcr.webdav.resource.GenericResource
identifier, namespaceContext, PRESET_PROP, 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
protected CollectionResource(int type, java.net.URI identifier, javax.jcr.Node node, WebDavNamespaceContext namespaceContext)
           
  CollectionResource(java.net.URI identifier, javax.jcr.Node node, WebDavNamespaceContext namespaceContext)
           
 
Method Summary
protected  java.net.URI childURI(java.lang.String childName)
           
 java.io.InputStream getContentAsStream(java.lang.String rootHref)
           
 java.util.Set<org.exoplatform.common.util.HierarchicalProperty> getProperties(boolean namesOnly)
           
 org.exoplatform.common.util.HierarchicalProperty getProperty(javax.xml.namespace.QName name)
           
 java.util.List<Resource> getResources()
           
 boolean isCollection()
           
 
Methods inherited from class org.exoplatform.services.jcr.webdav.resource.GenericResource
getIdentifier, getNamespaceContext, getType, lockDiscovery, supportedLock, supportedMethodSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLLECTION_SKIP

protected static final java.util.Set<java.lang.String> COLLECTION_SKIP

node

protected final javax.jcr.Node node
Constructor Detail

CollectionResource

public CollectionResource(java.net.URI identifier,
                          javax.jcr.Node node,
                          WebDavNamespaceContext namespaceContext)
                   throws IllegalResourceTypeException,
                          javax.jcr.RepositoryException
Throws:
IllegalResourceTypeException
javax.jcr.RepositoryException

CollectionResource

protected CollectionResource(int type,
                             java.net.URI identifier,
                             javax.jcr.Node node,
                             WebDavNamespaceContext namespaceContext)
                      throws IllegalResourceTypeException,
                             javax.jcr.RepositoryException
Throws:
IllegalResourceTypeException
javax.jcr.RepositoryException
Method Detail

getProperties

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

getProperty

public org.exoplatform.common.util.HierarchicalProperty getProperty(javax.xml.namespace.QName name)
                                                             throws javax.jcr.PathNotFoundException,
                                                                    javax.jcr.AccessDeniedException,
                                                                    javax.jcr.RepositoryException
Returns:
property by its name
Throws:
javax.jcr.PathNotFoundException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException

isCollection

public boolean isCollection()
Returns:
true if this is collection-able resource - i.e. this resource may contain other resources

getResources

public java.util.List<Resource> getResources()
                                      throws javax.jcr.RepositoryException,
                                             IllegalResourceTypeException
Throws:
javax.jcr.RepositoryException
IllegalResourceTypeException

childURI

protected final java.net.URI childURI(java.lang.String childName)

getContentAsStream

public java.io.InputStream getContentAsStream(java.lang.String rootHref)
                                       throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2011 eXo Platform SAS. All Rights Reserved.