org.exoplatform.services.jcr.ext.resource
Class NodeRepresentationService

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.resource.NodeRepresentationService
All Implemented Interfaces:
org.picocontainer.Startable

public class NodeRepresentationService
extends java.lang.Object
implements org.picocontainer.Startable

Created by The eXo Platform SAS .

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

Constructor Summary
NodeRepresentationService(org.exoplatform.container.ExoContainerContext containerContext)
           
 
Method Summary
 void addNodeRepresentationFactory(java.lang.String nodeType, NodeRepresentationFactory representationFactory)
          Add new NodeRepresentationFactory for node type.
 java.util.Collection<java.lang.String> getKeys()
           
 NodeRepresentation getNodeRepresentation(javax.jcr.Node node, java.lang.String mediaTypeHint)
          Get NodeRepresentation for given node.
 java.util.Collection<java.lang.String> getNodeTypes()
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeRepresentationService

public NodeRepresentationService(org.exoplatform.container.ExoContainerContext containerContext)
Method Detail

addNodeRepresentationFactory

public void addNodeRepresentationFactory(java.lang.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,
                                                java.lang.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 java.util.Collection<java.lang.String> getNodeTypes()
Returns:
served node types.

getKeys

public java.util.Collection<java.lang.String> getKeys()
Returns:
served keys.

start

public void start()
Specified by:
start in interface org.picocontainer.Startable

stop

public void stop()
Specified by:
stop in interface org.picocontainer.Startable


Copyright © 2012 eXo Platform SAS. All Rights Reserved.