org.exoplatform.services.jcr.ext.resource
Interface NodeRepresentation

All Known Implementing Classes:
AbstractXMLViewNodeRepresentation, DocumentViewNodeRepresentation, NtFileNodeRepresentation, NtResourceNodeRepresentation, SystemViewNodeRepresentation

public interface NodeRepresentation

Created by The eXo Platform SAS .

Version:
$Id: NodeRepresentation.java 35186 2009-08-07 14:23:43Z pnedonosko $
Author:
Gennady Azarenkov

Method Summary
 void addProperties(java.util.Collection<org.exoplatform.common.util.HierarchicalProperty> properties)
          adds multivalued property.
 void addProperty(org.exoplatform.common.util.HierarchicalProperty property)
          adds single property.
 java.lang.String getContentEncoding()
           
 long getContentLenght()
           
 java.io.InputStream getInputStream()
           
 long getLastModified()
          Get date of last modified if available.
 java.lang.String getMediaType()
           
 javax.jcr.Node getNode()
           
 java.util.Collection<org.exoplatform.common.util.HierarchicalProperty> getProperties(java.lang.String name)
           
 org.exoplatform.common.util.HierarchicalProperty getProperty(java.lang.String name)
           
 java.util.Collection<java.lang.String> getPropertyNames()
           
 void removeProperty(java.lang.String name)
          removes property.
 

Method Detail

getMediaType

java.lang.String getMediaType()
                              throws javax.jcr.RepositoryException
Returns:
Mimetype for this representation.
Throws:
javax.jcr.RepositoryException

getContentLenght

long getContentLenght()
                      throws javax.jcr.RepositoryException
Returns:
the content length or -1 if content length unknown
Throws:
javax.jcr.RepositoryException

getContentEncoding

java.lang.String getContentEncoding()
Returns:
the content encoding or null if it unknown.

getInputStream

java.io.InputStream getInputStream()
                                   throws java.io.IOException,
                                          javax.jcr.RepositoryException
Returns:
the stream.
Throws:
java.io.IOException
javax.jcr.RepositoryException

getPropertyNames

java.util.Collection<java.lang.String> getPropertyNames()
                                                        throws javax.jcr.RepositoryException
Returns:
the collection of node properties name.
Throws:
javax.jcr.RepositoryException

getProperty

org.exoplatform.common.util.HierarchicalProperty getProperty(java.lang.String name)
                                                             throws javax.jcr.RepositoryException
Parameters:
name - the name of properties.
Returns:
the property with specified name. Note that there can be multiple same name properties, in this case any one will be returned.
Throws:
javax.jcr.RepositoryException

getProperties

java.util.Collection<org.exoplatform.common.util.HierarchicalProperty> getProperties(java.lang.String name)
                                                                                     throws javax.jcr.RepositoryException
Parameters:
name - the name of properties.
Returns:
the properties with specified name.
Throws:
javax.jcr.RepositoryException

addProperty

void addProperty(org.exoplatform.common.util.HierarchicalProperty property)
                 throws javax.jcr.UnsupportedRepositoryOperationException
adds single property.

Parameters:
name - .
property - .
Throws:
javax.jcr.UnsupportedRepositoryOperationException

addProperties

void addProperties(java.util.Collection<org.exoplatform.common.util.HierarchicalProperty> properties)
                   throws javax.jcr.UnsupportedRepositoryOperationException
adds multivalued property.

Parameters:
name - .
properties - .
Throws:
javax.jcr.UnsupportedRepositoryOperationException

removeProperty

void removeProperty(java.lang.String name)
                    throws javax.jcr.UnsupportedRepositoryOperationException
removes property.

Parameters:
name - .
Throws:
javax.jcr.UnsupportedRepositoryOperationException

getLastModified

long getLastModified()
                     throws javax.jcr.RepositoryException
Get date of last modified if available.

Returns:
the date of last modified.
Throws:
javax.jcr.RepositoryException

getNode

javax.jcr.Node getNode()
Returns:
the underlying node.


Copyright © 2010 eXo Platform SAS. All Rights Reserved.