Class AbstractRootSectionsFinder
- java.lang.Object
-
- org.nuxeo.ecm.core.api.UnrestrictedSessionRunner
-
- org.nuxeo.ecm.platform.publisher.impl.finder.AbstractRootSectionsFinder
-
- All Implemented Interfaces:
RootSectionFinder
- Direct Known Subclasses:
DefaultRootSectionsFinder
public abstract class AbstractRootSectionsFinder extends UnrestrictedSessionRunner implements RootSectionFinder
-
-
Field Summary
Fields Modifier and Type Field Description protected DocumentModelList
accessibleSectionRoots
protected DocumentModel
currentDocument
protected static Log
log
static String
SCHEMA_PUBLISHING
protected static Set<String>
sectionRootTypes
static String
SECTIONS_PROPERTY_NAME
protected static Set<String>
sectionTypes
protected List<String>
unrestrictedDefaultSectionRoot
protected List<String>
unrestrictedSectionRootFromWorkspaceConfig
protected CoreSession
userSession
-
Fields inherited from class org.nuxeo.ecm.core.api.UnrestrictedSessionRunner
isUnrestricted, originatingUsername, repositoryName, session, sessionIsAlreadyUnrestricted
-
-
Constructor Summary
Constructors Constructor Description AbstractRootSectionsFinder(CoreSession userSession)
-
Method Summary
-
Methods inherited from class org.nuxeo.ecm.core.api.UnrestrictedSessionRunner
checkUnrestricted, getOriginatingUsername, runUnrestricted, setOriginatingUsername
-
-
-
-
Field Detail
-
SCHEMA_PUBLISHING
public static final String SCHEMA_PUBLISHING
- See Also:
- Constant Field Values
-
SECTIONS_PROPERTY_NAME
public static final String SECTIONS_PROPERTY_NAME
- See Also:
- Constant Field Values
-
userSession
protected CoreSession userSession
-
unrestrictedSectionRootFromWorkspaceConfig
protected List<String> unrestrictedSectionRootFromWorkspaceConfig
-
accessibleSectionRoots
protected DocumentModelList accessibleSectionRoots
-
currentDocument
protected DocumentModel currentDocument
-
log
protected static final Log log
-
-
Constructor Detail
-
AbstractRootSectionsFinder
public AbstractRootSectionsFinder(CoreSession userSession)
-
-
Method Detail
-
computeUserSectionRoots
protected abstract void computeUserSectionRoots(DocumentModel currentDoc)
-
computeUnrestrictedRoots
protected abstract void computeUnrestrictedRoots(CoreSession session)
-
reset
public void reset()
- Specified by:
reset
in interfaceRootSectionFinder
-
getAccessibleSectionRoots
public DocumentModelList getAccessibleSectionRoots(DocumentModel currentDoc)
- Specified by:
getAccessibleSectionRoots
in interfaceRootSectionFinder
-
getSectionRootsForWorkspace
public DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc, boolean addDefaultSectionRoots)
Description copied from interface:RootSectionFinder
Returns the head (root) sections that are bound to a given Workspace.If no specific binding is defined at the workspace level, an empty list is returned.
- Specified by:
getSectionRootsForWorkspace
in interfaceRootSectionFinder
- Parameters:
currentDoc
- the target WorkspaceaddDefaultSectionRoots
- flag to indicate is default roots should be added
-
getSectionRootsForWorkspace
public DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc)
Description copied from interface:RootSectionFinder
Returns the head (root) sections that are bound to a given Workspace.If no specific binding is defined at the workspace level, an empty list is returned.
- Specified by:
getSectionRootsForWorkspace
in interfaceRootSectionFinder
- Parameters:
currentDoc
- the target Workspace
-
getDefaultSectionRoots
public DocumentModelList getDefaultSectionRoots(boolean onlyHeads, boolean addDefaultSectionRoots)
- Specified by:
getDefaultSectionRoots
in interfaceRootSectionFinder
-
getDefaultSectionRoots
public DocumentModelList getDefaultSectionRoots(boolean onlyHeads)
- Specified by:
getDefaultSectionRoots
in interfaceRootSectionFinder
-
getFiltredSectionRoots
protected DocumentModelList getFiltredSectionRoots(List<String> rootPaths, boolean onlyHeads)
-
filterDocuments
protected DocumentModelList filterDocuments(DocumentModelList docs)
-
getDefaultSectionRoots
protected DocumentModelList getDefaultSectionRoots(CoreSession session)
-
getSectionRootsFromWorkspaceConfig
protected DocumentModelList getSectionRootsFromWorkspaceConfig(DocumentModel workspace, CoreSession session)
-
run
public void run()
Description copied from class:UnrestrictedSessionRunner
This method will be called byUnrestrictedSessionRunner.runUnrestricted()
withUnrestrictedSessionRunner.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 classUnrestrictedSessionRunner
-
-