Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.publisher.helper
Class RootSectionsFinder

java.lang.Object
  extended by org.nuxeo.ecm.core.api.UnrestrictedSessionRunner
      extended by org.nuxeo.ecm.platform.publisher.helper.RootSectionsFinder

public class RootSectionsFinder
extends UnrestrictedSessionRunner

Helper class to manage:

Author:
tiry

Field Summary
 
Fields inherited from class org.nuxeo.ecm.core.api.UnrestrictedSessionRunner
isUnrestricted
 
Constructor Summary
RootSectionsFinder(CoreSession userSession, Set<String> sectionRootTypes, Set<String> sectionTypes)
           
 
Method Summary
 DocumentModelList getAccessibleSectionRoots(DocumentModel currentDoc)
           
 DocumentModelList getDefaultSectionRoots(boolean onlyHeads)
           
 DocumentModelList getDefaultSectionRoots(boolean onlyHeads, boolean addDefaultSectionRoots)
           
 DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc)
           
 DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc, boolean addDefaultSectionRoots)
           
 void reset()
           
 void run()
          This method will be called by UnrestrictedSessionRunner.runUnrestricted() with UnrestrictedSessionRunner.session available as an unrestricted session.
 
Methods inherited from class org.nuxeo.ecm.core.api.UnrestrictedSessionRunner
getOriginatingUsername, runUnrestricted, setOriginatingUsername
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RootSectionsFinder

public RootSectionsFinder(CoreSession userSession,
                          Set<String> sectionRootTypes,
                          Set<String> sectionTypes)
Method Detail

reset

public void reset()

getAccessibleSectionRoots

public DocumentModelList getAccessibleSectionRoots(DocumentModel currentDoc)
                                            throws ClientException
Throws:
ClientException

getSectionRootsForWorkspace

public DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc,
                                                     boolean addDefaultSectionRoots)
                                              throws ClientException
Throws:
ClientException

getSectionRootsForWorkspace

public DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc)
                                              throws ClientException
Throws:
ClientException

getDefaultSectionRoots

public DocumentModelList getDefaultSectionRoots(boolean onlyHeads,
                                                boolean addDefaultSectionRoots)
                                         throws ClientException
Throws:
ClientException

getDefaultSectionRoots

public DocumentModelList getDefaultSectionRoots(boolean onlyHeads)
                                         throws ClientException
Throws:
ClientException

run

public void run()
         throws ClientException
Description copied from class: UnrestrictedSessionRunner
This method will be called by UnrestrictedSessionRunner.runUnrestricted() with UnrestrictedSessionRunner.session available as an unrestricted session.

It can also be called directly in which case the UnrestrictedSessionRunner.session available will be the one passed to #UnrestrictedSessionRunner(CoreSession).

Specified by:
run in class UnrestrictedSessionRunner
Throws:
ClientException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.