public abstract class AbstractRootSectionsFinder extends UnrestrictedSessionRunner implements RootSectionFinder
| Modifier and Type | Field and Description | 
|---|---|
protected DocumentModelList | 
accessibleSectionRoots  | 
protected DocumentModel | 
currentDocument  | 
protected static org.apache.commons.logging.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  | 
isUnrestricted, originatingUsername, repositoryName, session, sessionIsAlreadyUnrestricted| Constructor and Description | 
|---|
AbstractRootSectionsFinder(CoreSession userSession)  | 
checkUnrestricted, getOriginatingUsername, runUnrestricted, setOriginatingUsernamepublic static final String SCHEMA_PUBLISHING
public static final String SECTIONS_PROPERTY_NAME
protected static Set<String> sectionRootTypes
protected static Set<String> sectionTypes
protected CoreSession userSession
protected List<String> unrestrictedSectionRootFromWorkspaceConfig
protected List<String> unrestrictedDefaultSectionRoot
protected DocumentModelList accessibleSectionRoots
protected DocumentModel currentDocument
protected static final org.apache.commons.logging.Log log
public AbstractRootSectionsFinder(CoreSession userSession)
protected abstract void computeUserSectionRoots(DocumentModel currentDoc)
protected abstract String buildQuery(String path)
protected abstract void computeUnrestrictedRoots(CoreSession session)
public void reset()
reset in interface RootSectionFinderpublic DocumentModelList getAccessibleSectionRoots(DocumentModel currentDoc)
getAccessibleSectionRoots in interface RootSectionFinderpublic DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc, boolean addDefaultSectionRoots)
RootSectionFinderIf no specific binding is defined at the workspace level, an empty list is returned.
getSectionRootsForWorkspace in interface RootSectionFindercurrentDoc - the target WorkspaceaddDefaultSectionRoots - flag to indicate is default roots should be addedpublic DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc)
RootSectionFinderIf no specific binding is defined at the workspace level, an empty list is returned.
getSectionRootsForWorkspace in interface RootSectionFindercurrentDoc - the target Workspacepublic DocumentModelList getDefaultSectionRoots(boolean onlyHeads, boolean addDefaultSectionRoots)
getDefaultSectionRoots in interface RootSectionFinderpublic DocumentModelList getDefaultSectionRoots(boolean onlyHeads)
getDefaultSectionRoots in interface RootSectionFinderprotected DocumentModelList getFiltredSectionRoots(List<String> rootPaths, boolean onlyHeads)
protected DocumentModelList filterDocuments(DocumentModelList docs)
protected DocumentModelList getDefaultSectionRoots(CoreSession session)
protected DocumentModelList getSectionRootsFromWorkspaceConfig(DocumentModel workspace, CoreSession session)
public void run()
UnrestrictedSessionRunnerUnrestrictedSessionRunner.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).
run in class UnrestrictedSessionRunnerprotected Set<String> getSectionRootTypes()
protected Set<String> getTypeNamesForFacet(String facetName)
protected Set<String> getSectionTypes()
Copyright © 2019 Nuxeo. All rights reserved.