eXo JCR :: Component :: Extension Service 1.15.1-CP01

org.exoplatform.services.jcr.ext.resource.representation
Class NtResourceNodeRepresentation

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.resource.representation.NtResourceNodeRepresentation
All Implemented Interfaces:
NodeRepresentation

public class NtResourceNodeRepresentation
extends Object
implements NodeRepresentation

Version:
$Id: $
Author:
Andrey Parfonov

Field Summary
protected  javax.jcr.Node node
           
protected  ArrayList<org.exoplatform.common.util.HierarchicalProperty> properties
           
 
Constructor Summary
NtResourceNodeRepresentation(javax.jcr.Node node)
           
 
Method Summary
 void addProperties(Collection<org.exoplatform.common.util.HierarchicalProperty> properties)
          adds multivalued property.
 void addProperty(org.exoplatform.common.util.HierarchicalProperty property)
          adds single property.
 String getContentEncoding()
           
 long getContentLenght()
           
 InputStream getInputStream()
           
 long getLastModified()
          Get date of last modified if available.
 String getMediaType()
           
 javax.jcr.Node getNode()
           
 Collection<org.exoplatform.common.util.HierarchicalProperty> getProperties(String name)
           
 org.exoplatform.common.util.HierarchicalProperty getProperty(String name)
           
 Collection<String> getPropertyNames()
           
 void removeProperty(String name)
          removes property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

protected javax.jcr.Node node

properties

protected ArrayList<org.exoplatform.common.util.HierarchicalProperty> properties
Constructor Detail

NtResourceNodeRepresentation

public NtResourceNodeRepresentation(javax.jcr.Node node)
                             throws javax.jcr.RepositoryException
Parameters:
node -
Throws:
javax.jcr.RepositoryException
Method Detail

getContentEncoding

public String getContentEncoding()
Specified by:
getContentEncoding in interface NodeRepresentation
Returns:
the content encoding or null if it unknown.

getContentLenght

public long getContentLenght()
                      throws javax.jcr.RepositoryException
Specified by:
getContentLenght in interface NodeRepresentation
Returns:
the content length or -1 if content length unknown
Throws:
javax.jcr.RepositoryException

getMediaType

public String getMediaType()
                    throws javax.jcr.RepositoryException
Specified by:
getMediaType in interface NodeRepresentation
Returns:
Mimetype for this representation.
Throws:
javax.jcr.RepositoryException

getLastModified

public long getLastModified()
                     throws javax.jcr.RepositoryException
Description copied from interface: NodeRepresentation
Get date of last modified if available.

Specified by:
getLastModified in interface NodeRepresentation
Returns:
the date of last modified.
Throws:
javax.jcr.RepositoryException

getNode

public javax.jcr.Node getNode()
Specified by:
getNode in interface NodeRepresentation
Returns:
the underlying node.

getProperty

public org.exoplatform.common.util.HierarchicalProperty getProperty(String name)
                                                             throws javax.jcr.RepositoryException
Specified by:
getProperty in interface NodeRepresentation
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

public Collection<org.exoplatform.common.util.HierarchicalProperty> getProperties(String name)
                                                                           throws javax.jcr.RepositoryException
Specified by:
getProperties in interface NodeRepresentation
Parameters:
name - the name of properties.
Returns:
the properties with specified name.
Throws:
javax.jcr.RepositoryException

getPropertyNames

public Collection<String> getPropertyNames()
                                    throws javax.jcr.RepositoryException
Specified by:
getPropertyNames in interface NodeRepresentation
Returns:
the collection of node properties name.
Throws:
javax.jcr.RepositoryException

getInputStream

public InputStream getInputStream()
                           throws IOException,
                                  javax.jcr.RepositoryException
Specified by:
getInputStream in interface NodeRepresentation
Returns:
the stream.
Throws:
IOException
javax.jcr.RepositoryException

addProperties

public void addProperties(Collection<org.exoplatform.common.util.HierarchicalProperty> properties)
                   throws javax.jcr.UnsupportedRepositoryOperationException
Description copied from interface: NodeRepresentation
adds multivalued property.

Specified by:
addProperties in interface NodeRepresentation
Parameters:
properties - .
Throws:
javax.jcr.UnsupportedRepositoryOperationException

addProperty

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

Specified by:
addProperty in interface NodeRepresentation
Parameters:
property - .
Throws:
javax.jcr.UnsupportedRepositoryOperationException

removeProperty

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

Specified by:
removeProperty in interface NodeRepresentation
Parameters:
name - .
Throws:
javax.jcr.UnsupportedRepositoryOperationException

eXo JCR :: Component :: Extension Service 1.15.1-CP01

Copyright © 2013 eXo Platform SAS. All Rights Reserved.