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 DocumentModelListaccessibleSectionRootsprotected DocumentModelcurrentDocumentprotected static Loglogstatic StringSCHEMA_PUBLISHINGprotected static Set<String>sectionRootTypesstatic StringSECTIONS_PROPERTY_NAMEprotected static Set<String>sectionTypesprotected List<String>unrestrictedDefaultSectionRootprotected List<String>unrestrictedSectionRootFromWorkspaceConfigprotected CoreSessionuserSession-
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:
resetin interfaceRootSectionFinder
-
getAccessibleSectionRoots
public DocumentModelList getAccessibleSectionRoots(DocumentModel currentDoc)
- Specified by:
getAccessibleSectionRootsin interfaceRootSectionFinder
-
getSectionRootsForWorkspace
public DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc, boolean addDefaultSectionRoots)
Description copied from interface:RootSectionFinderReturns 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:
getSectionRootsForWorkspacein 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:RootSectionFinderReturns 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:
getSectionRootsForWorkspacein interfaceRootSectionFinder- Parameters:
currentDoc- the target Workspace
-
getDefaultSectionRoots
public DocumentModelList getDefaultSectionRoots(boolean onlyHeads, boolean addDefaultSectionRoots)
- Specified by:
getDefaultSectionRootsin interfaceRootSectionFinder
-
getDefaultSectionRoots
public DocumentModelList getDefaultSectionRoots(boolean onlyHeads)
- Specified by:
getDefaultSectionRootsin 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:UnrestrictedSessionRunnerThis method will be called byUnrestrictedSessionRunner.runUnrestricted()withUnrestrictedSessionRunner.sessionavailable as an unrestricted session.It can also be called directly in which case the
UnrestrictedSessionRunner.sessionavailable will be the one passed to#UnrestrictedSessionRunner(CoreSession).- Specified by:
runin classUnrestrictedSessionRunner
-
-