Class 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 Detail

      • NodeRepresentationService

        public NodeRepresentationService​(org.exoplatform.container.ExoContainerContext containerContext)
    • 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.
      • start

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

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