001package org.nuxeo.ecm.platform.publisher.helper;
002
003import org.nuxeo.ecm.core.api.DocumentModel;
004import org.nuxeo.ecm.core.api.DocumentModelList;
005
006public interface RootSectionFinder {
007
008    void reset();
009
010    /**
011     * Returns the head (root) sections that are bound to a given Workspace.
012     * <p>
013     * If no specific binding is defined at the workspace level, an empty list is returned.
014     *
015     * @param currentDoc the target Workspace
016     * @param addDefaultSectionRoots flag to indicate is default roots should be added
017     * @return
018     */
019    DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc, boolean addDefaultSectionRoots);
020
021    /**
022     * Returns the head (root) sections that are bound to a given Workspace.
023     * <p>
024     * If no specific binding is defined at the workspace level, an empty list is returned.
025     *
026     * @param currentDoc the target Workspace
027     * @return
028     */
029    DocumentModelList getSectionRootsForWorkspace(DocumentModel currentDoc);
030
031    DocumentModelList getAccessibleSectionRoots(DocumentModel currentDoc);
032
033    DocumentModelList getDefaultSectionRoots(boolean onlyHeads, boolean addDefaultSectionRoots);
034
035    DocumentModelList getDefaultSectionRoots(boolean onlyHeads);
036
037}