Class NodeRepresentationService
- java.lang.Object
-
- org.exoplatform.services.jcr.ext.resource.NodeRepresentationService
-
- All Implemented Interfaces:
org.picocontainer.Startable
public class NodeRepresentationService extends Object implements org.picocontainer.Startable
Created by The eXo Platform SAS .- Since:
- 1.9
- Version:
- $Id: $
- Author:
- Gennady Azarenkov
-
-
Constructor Summary
Constructors Constructor Description NodeRepresentationService(org.exoplatform.container.ExoContainerContext containerContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNodeRepresentationFactory(String nodeType, NodeRepresentationFactory representationFactory)Add new NodeRepresentationFactory for node type.Collection<String>getKeys()NodeRepresentationgetNodeRepresentation(javax.jcr.Node node, String mediaTypeHint)Get NodeRepresentation for given node.Collection<String>getNodeTypes()voidstart()voidstop()
-
-
-
Method Detail
-
addNodeRepresentationFactory
public void addNodeRepresentationFactory(String nodeType, NodeRepresentationFactory representationFactory)
Add new NodeRepresentationFactory for node type.- Parameters:
nodeType- the node type.representationFactory- the NodeRepresentationFactory.
-
getNodeRepresentation
public NodeRepresentation getNodeRepresentation(javax.jcr.Node node, String mediaTypeHint) throws javax.jcr.RepositoryException
Get NodeRepresentation for given node. String mediaTypeHint can be used as external information for representation. By default node will be represented as doc-view.- Parameters:
node- the jcr node.mediaTypeHint- the mimetype hint or null if not known.- Returns:
- the NodeRepresentation.
- Throws:
javax.jcr.RepositoryException
-
getNodeTypes
public Collection<String> getNodeTypes()
- Returns:
- served node types.
-
getKeys
public Collection<String> getKeys()
- Returns:
- served keys.
-
start
public void start()
- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()
- Specified by:
stopin interfaceorg.picocontainer.Startable
-
-