org.exoplatform.services.jcr.webdav.resource
Class FileResource
java.lang.Object
org.exoplatform.services.jcr.webdav.resource.GenericResource
org.exoplatform.services.jcr.webdav.resource.FileResource
- All Implemented Interfaces:
- Resource, PropertyConstants
- Direct Known Subclasses:
- VersionedFileResource
public class FileResource
- extends GenericResource
Created by The eXo Platform SARL .
Resource containing JCR's nt:file/jcr:content underneath. Identified by nt:file's URI
jcr:content's jcr:data property contains file's payload
- Version:
- $Id: FileResource.java 35184 2009-08-07 14:14:37Z pnedonosko $
- Author:
- Gennady Azarenkov
|
Field Summary |
protected static java.util.Set<java.lang.String> |
CONTENT_SKIP
|
protected static java.util.Set<java.lang.String> |
FILE_SKIP
|
protected javax.jcr.Node |
node
|
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILE_SKIP
protected static final java.util.Set<java.lang.String> FILE_SKIP
CONTENT_SKIP
protected static final java.util.Set<java.lang.String> CONTENT_SKIP
node
protected final javax.jcr.Node node
FileResource
public FileResource(java.net.URI identifier,
javax.jcr.Node node,
WebDavNamespaceContext namespaceContext)
throws IllegalResourceTypeException,
javax.jcr.RepositoryException
- Throws:
IllegalResourceTypeException
javax.jcr.RepositoryException
FileResource
protected FileResource(int type,
java.net.URI identifier,
javax.jcr.Node node,
WebDavNamespaceContext namespaceContext)
throws IllegalResourceTypeException,
javax.jcr.RepositoryException
- Throws:
IllegalResourceTypeException
javax.jcr.RepositoryException
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
getContentAsText
public java.lang.String getContentAsText()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
getContentAsStream
public java.io.InputStream getContentAsStream()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
isTextContent
public boolean isTextContent()
contentNode
public javax.jcr.Node contentNode()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
Copyright © 2011 eXo Platform SAS. All Rights Reserved.