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) |
getOriginatingUsername, isUnrestricted, runUnrestricted, setOriginatingUsername
public 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 RootSectionFinder
public DocumentModelList getAccessibleSectionRoots(DocumentModel currentDoc)
getAccessibleSectionRoots
in interface RootSectionFinder
public DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc, boolean addDefaultSectionRoots)
RootSectionFinder
If no specific binding is defined at the workspace level, an empty list is returned.
getSectionRootsForWorkspace
in interface RootSectionFinder
currentDoc
- the target WorkspaceaddDefaultSectionRoots
- flag to indicate is default roots should be addedpublic DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc)
RootSectionFinder
If no specific binding is defined at the workspace level, an empty list is returned.
getSectionRootsForWorkspace
in interface RootSectionFinder
currentDoc
- the target Workspacepublic DocumentModelList getDefaultSectionRoots(boolean onlyHeads, boolean addDefaultSectionRoots)
getDefaultSectionRoots
in interface RootSectionFinder
public DocumentModelList getDefaultSectionRoots(boolean onlyHeads)
getDefaultSectionRoots
in interface RootSectionFinder
protected 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()
UnrestrictedSessionRunner
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)
.
run
in class UnrestrictedSessionRunner
protected Set<String> getSectionRootTypes()
protected Set<String> getTypeNamesForFacet(String facetName)
protected Set<String> getSectionTypes()
Copyright © 2015 Nuxeo SA. All rights reserved.