public abstract class AbstractRootSectionsFinder extends UnrestrictedSessionRunner implements RootSectionFinder
Modifier and Type | Field and Description |
---|---|
static String |
SCHEMA_PUBLISHING |
static String |
SECTIONS_PROPERTY_NAME |
isUnrestricted
Constructor and Description |
---|
AbstractRootSectionsFinder(CoreSession userSession) |
Modifier and Type | Method and Description |
---|---|
DocumentModelList |
getAccessibleSectionRoots(DocumentModel currentDoc) |
DocumentModelList |
getDefaultSectionRoots(boolean onlyHeads) |
DocumentModelList |
getDefaultSectionRoots(boolean onlyHeads,
boolean addDefaultSectionRoots) |
DocumentModelList |
getSectionRootsForWorkspace(DocumentModel currentDoc)
Returns the head (root) sections that are bound to a given Workspace.
|
DocumentModelList |
getSectionRootsForWorkspace(DocumentModel currentDoc,
boolean addDefaultSectionRoots)
Returns the head (root) sections that are bound to a given Workspace.
|
void |
reset() |
void |
run()
This method will be called by
UnrestrictedSessionRunner.runUnrestricted() with
UnrestrictedSessionRunner.session available as an unrestricted session. |
getOriginatingUsername, runUnrestricted, setOriginatingUsername
public static final String SCHEMA_PUBLISHING
public static final String SECTIONS_PROPERTY_NAME
public AbstractRootSectionsFinder(CoreSession userSession)
public void reset()
reset
in interface RootSectionFinder
public DocumentModelList getAccessibleSectionRoots(DocumentModel currentDoc) throws ClientException
getAccessibleSectionRoots
in interface RootSectionFinder
ClientException
public DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc, boolean addDefaultSectionRoots) throws ClientException
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
addedClientException
public DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc) throws ClientException
RootSectionFinder
If no specific binding is defined at the workspace level, an empty list is returned.
getSectionRootsForWorkspace
in interface RootSectionFinder
currentDoc
- the target WorkspaceClientException
public DocumentModelList getDefaultSectionRoots(boolean onlyHeads, boolean addDefaultSectionRoots) throws ClientException
getDefaultSectionRoots
in interface RootSectionFinder
ClientException
public DocumentModelList getDefaultSectionRoots(boolean onlyHeads) throws ClientException
getDefaultSectionRoots
in interface RootSectionFinder
ClientException
public void run() throws ClientException
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
ClientException
Copyright © 2013 Nuxeo SA. All Rights Reserved.