Class CMSNodeFinder

java.lang.Object
org.exoplatform.services.cms.link.impl.NodeFinderImpl
org.exoplatform.onlyoffice.jcr.CMSNodeFinder
All Implemented Interfaces:
NodeFinder, org.exoplatform.services.cms.link.NodeFinder

public class CMSNodeFinder extends org.exoplatform.services.cms.link.impl.NodeFinderImpl implements NodeFinder
Node finder based on original implementation from ECMS.
Created by The eXo Platform SAS.
Version:
$Id: CMSNodeFinder.java 00000 Feb 26, 2013 pnedonosko $
Author:
Peter Nedonosko
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator
    The hierarchy creator.
    protected final org.exoplatform.services.jcr.ext.app.SessionProviderService
    The session provider service.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CMSNodeFinder(org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.cms.link.LinkManager linkManager, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator)
    Instantiates a new CMS node finder.
  • Method Summary

    Modifier and Type
    Method
    Description
    Align given name to current repository conventions by removing or escaping forbidden characters.
    javax.jcr.Item
    findItem(javax.jcr.Session session, String absPath)
    Find JCR item by given path, if the path points to a symlink this method return a target node of the link.
    Collection<javax.jcr.Node>
    findLinked(javax.jcr.Session session, String uuid)
    Find nodes linked to given node.
    javax.jcr.Node
    getUserNode(String userName)
    Return user home node of given user.

    Methods inherited from class org.exoplatform.services.cms.link.impl.NodeFinderImpl

    getItem, getItem, getItem, getItem, getItem, getItemGiveTargetSys, getItemSys, getItemTarget, getNode, getNode, getSession, itemExists, makePath

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.exoplatform.onlyoffice.jcr.NodeFinder

    getItem
  • Field Details

    • sessionProviderService

      protected final org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService
      The session provider service.
    • hierarchyCreator

      protected final org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator
      The hierarchy creator.
  • Constructor Details

    • CMSNodeFinder

      public CMSNodeFinder(org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.cms.link.LinkManager linkManager, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator)
      Instantiates a new CMS node finder.
      Parameters:
      repositoryService - the repository service
      linkManager - the link manager
      sessionProviderService - the session provider service
      hierarchyCreator - the hierarchy creator
  • Method Details

    • cleanName

      public String cleanName(String name)
      Align given name to current repository conventions by removing or escaping forbidden characters.
      Specified by:
      cleanName in interface NodeFinder
      Parameters:
      name - String
      Returns:
      String cleaned name
    • findItem

      public javax.jcr.Item findItem(javax.jcr.Session session, String absPath) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
      Find JCR item by given path, if the path points to a symlink this method return a target node of the link.
      Specified by:
      findItem in interface NodeFinder
      Parameters:
      session - Session
      absPath - String
      Returns:
      the item
      Throws:
      javax.jcr.PathNotFoundException - if item not found by given path
      javax.jcr.RepositoryException - if repository error eccurs
    • findLinked

      public Collection<javax.jcr.Node> findLinked(javax.jcr.Session session, String uuid) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
      Find nodes linked to given node.
      Specified by:
      findLinked in interface NodeFinder
      Parameters:
      session - the session
      uuid - String
      Returns:
      Collection of nodes
      Throws:
      javax.jcr.PathNotFoundException - the path not found exception
      javax.jcr.RepositoryException - the repository exception
    • getUserNode

      public javax.jcr.Node getUserNode(String userName) throws Exception
      Return user home node of given user.
      Specified by:
      getUserNode in interface NodeFinder
      Parameters:
      userName - String with user name in organization
      Returns:
      Node user home node
      Throws:
      Exception - the exception