Class NtFileNodeRepresentation
java.lang.Object
org.exoplatform.services.jcr.ext.resource.representation.NtFileNodeRepresentation
- All Implemented Interfaces:
NodeRepresentation
- Version:
- $Id: $
- Author:
- Andrey Parfonov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperties(Collection<org.exoplatform.common.util.HierarchicalProperty> properties) adds multivalued property.voidaddProperty(org.exoplatform.common.util.HierarchicalProperty property) adds single property.longlongGet date of last modified if available.javax.jcr.NodegetNode()Collection<org.exoplatform.common.util.HierarchicalProperty>getProperties(String name) org.exoplatform.common.util.HierarchicalPropertygetProperty(String name) voidremoveProperty(String name) removes property.
-
Constructor Details
-
NtFileNodeRepresentation
public NtFileNodeRepresentation(javax.jcr.Node node, NodeRepresentation content) throws javax.jcr.RepositoryException - Parameters:
node-content-- Throws:
javax.jcr.RepositoryException
-
-
Method Details
-
getContentEncoding
- Specified by:
getContentEncodingin interfaceNodeRepresentation- Returns:
- the content encoding or null if it unknown.
-
getContentLenght
public long getContentLenght() throws javax.jcr.RepositoryException- Specified by:
getContentLenghtin interfaceNodeRepresentation- Returns:
- the content length or -1 if content length unknown
- Throws:
javax.jcr.RepositoryException
-
getMediaType
- Specified by:
getMediaTypein interfaceNodeRepresentation- Returns:
- Mimetype for this representation.
- Throws:
javax.jcr.RepositoryException
-
getLastModified
public long getLastModified() throws javax.jcr.RepositoryExceptionDescription copied from interface:NodeRepresentationGet date of last modified if available.- Specified by:
getLastModifiedin interfaceNodeRepresentation- Returns:
- the date of last modified.
- Throws:
javax.jcr.RepositoryException
-
getNode
public javax.jcr.Node getNode()- Specified by:
getNodein interfaceNodeRepresentation- Returns:
- the underlying node.
-
getProperty
public org.exoplatform.common.util.HierarchicalProperty getProperty(String name) throws javax.jcr.RepositoryException - Specified by:
getPropertyin interfaceNodeRepresentation- 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:
getPropertiesin interfaceNodeRepresentation- Parameters:
name- the name of properties.- Returns:
- the properties with specified name.
- Throws:
javax.jcr.RepositoryException
-
getPropertyNames
- Specified by:
getPropertyNamesin interfaceNodeRepresentation- Returns:
- the collection of node properties name.
- Throws:
javax.jcr.RepositoryException
-
getInputStream
- Specified by:
getInputStreamin interfaceNodeRepresentation- Returns:
- the stream.
- Throws:
IOExceptionjavax.jcr.RepositoryException
-
addProperties
public void addProperties(Collection<org.exoplatform.common.util.HierarchicalProperty> properties) throws javax.jcr.UnsupportedRepositoryOperationException Description copied from interface:NodeRepresentationadds multivalued property.- Specified by:
addPropertiesin interfaceNodeRepresentation- 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:
addPropertyin interfaceNodeRepresentation- Parameters:
property- .- Throws:
javax.jcr.UnsupportedRepositoryOperationException
-
removeProperty
removes property.- Specified by:
removePropertyin interfaceNodeRepresentation- Parameters:
name- .- Throws:
javax.jcr.UnsupportedRepositoryOperationException
-