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$
Author:
Gennady Azarenkov
  • Field Details

    • FILE_SKIP

      protected static final Set<String> FILE_SKIP
      The list of properties which are skipped for nt:file.
    • CONTENT_SKIP

      protected static final Set<String> CONTENT_SKIP
      The list of properties which are skipped for jcr:content.
    • node

      protected final javax.jcr.Node node
      Node.
  • Constructor Details

  • Method Details

    • getProperties

      public 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 - RepositoryException
      javax.jcr.PathNotFoundException
      javax.jcr.AccessDeniedException
    • getProperty

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

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

      public String getContentAsText() throws javax.jcr.RepositoryException
      Returns the content of node as text.
      Returns:
      content as text
      Throws:
      javax.jcr.RepositoryException - RepositoryException
    • getContentAsStream

      public InputStream getContentAsStream() throws javax.jcr.RepositoryException
      Returns the content of node as stream.
      Returns:
      content as stream
      Throws:
      javax.jcr.RepositoryException - RepositoryException
    • isTextContent

      public boolean isTextContent()
      if the content of node is text.
      Returns:
      true if the content of node is text false if not
    • contentNode

      protected javax.jcr.Node contentNode() throws javax.jcr.RepositoryException
      Returns the content node.
      Returns:
      Node, the content node
      Throws:
      javax.jcr.RepositoryException - RepositoryException
    • dataProperty

      protected javax.jcr.Property dataProperty() throws javax.jcr.RepositoryException
      Returns the data property.
      Returns:
      Property, the content data property
      Throws:
      javax.jcr.RepositoryException - RepositoryException