public class FileResource extends GenericResource
| Type | Property and Description |
|---|---|
protected javax.jcr.Property |
data
Returns the data property.
|
| Modifier and Type | Field and Description |
|---|---|
protected static Set<String> |
CONTENT_SKIP
The list of properties which are skipped for jcr:content.
|
protected static Set<String> |
FILE_SKIP
The list of properties which are skipped for nt:file.
|
protected javax.jcr.Node |
node
Node.
|
identifier, namespaceContext, PRESET_PROP, typeCOLLECTION, FILE, NULL, VERSION, VERSION_HISTORY, VERSIONED_COLLECTION, VERSIONED_FILECHILDCOUNT, 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| Modifier | Constructor and Description |
|---|---|
protected |
FileResource(int type,
URI identifier,
javax.jcr.Node node,
WebDavNamespaceContext namespaceContext) |
|
FileResource(URI identifier,
javax.jcr.Node node,
WebDavNamespaceContext namespaceContext) |
| Modifier and Type | Method and Description |
|---|---|
protected javax.jcr.Node |
contentNode()
Returns the content node.
|
protected javax.jcr.Property |
dataProperty()
Returns the data property.
|
InputStream |
getContentAsStream()
Returns the content of node as stream.
|
String |
getContentAsText()
Returns the content of node as text.
|
Set<org.exoplatform.common.util.HierarchicalProperty> |
getProperties(boolean namesOnly) |
org.exoplatform.common.util.HierarchicalProperty |
getProperty(QName name) |
boolean |
isCollection() |
boolean |
isTextContent()
if the content of node is text.
|
getIdentifier, getNamespaceContext, getType, lockDiscovery, supportedLock, supportedMethodSetprotected javax.jcr.Property dataProperty
javax.jcr.RepositoryExceptionprotected static final Set<String> FILE_SKIP
protected static final Set<String> CONTENT_SKIP
protected final javax.jcr.Node node
public FileResource(URI identifier, javax.jcr.Node node, WebDavNamespaceContext namespaceContext) throws IllegalResourceTypeException, javax.jcr.RepositoryException
identifier - resource identifiernode - nodenamespaceContext - namespace contextIllegalResourceTypeException - IllegalResourceTypeExceptionjavax.jcr.RepositoryException - RepositoryExceptionprotected FileResource(int type,
URI identifier,
javax.jcr.Node node,
WebDavNamespaceContext namespaceContext)
throws IllegalResourceTypeException,
javax.jcr.RepositoryException
type - resource typeidentifier - resource identifiernode - nodenamespaceContext - namespace contextIllegalResourceTypeExceptionjavax.jcr.RepositoryExceptionpublic Set<org.exoplatform.common.util.HierarchicalProperty> getProperties(boolean namesOnly) throws javax.jcr.PathNotFoundException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
getProperties in interface ResourcegetProperties in class GenericResourcenamesOnly - - if true "empty" properties will be returned (w/o values
inside)javax.jcr.RepositoryException - RepositoryExceptionjavax.jcr.PathNotFoundExceptionjavax.jcr.AccessDeniedExceptionpublic org.exoplatform.common.util.HierarchicalProperty getProperty(QName name) throws javax.jcr.PathNotFoundException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
name - property namejavax.jcr.PathNotFoundException - PathNotFoundExceptionjavax.jcr.AccessDeniedException - AccessDeniedExceptionjavax.jcr.RepositoryException - RepositoryExceptionpublic boolean isCollection()
public String getContentAsText() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - RepositoryExceptionpublic InputStream getContentAsStream() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - RepositoryExceptionpublic boolean isTextContent()
protected javax.jcr.Node contentNode()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - RepositoryExceptionprotected javax.jcr.Property dataProperty()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionCopyright © 2016 eXo Platform SAS. All Rights Reserved.