@Name(value="mainTabsActions") @Scope(value=CONVERSATION) @Install(precedence=10) public class MainTabsActions extends Object implements Serializable
Maintains a Map of tab id -> contextual document.
Modifier and Type | Field and Description |
---|---|
protected ActionManager |
actionManager |
static String |
DEFAULT_VIEW |
protected CoreSession |
documentManager |
protected Map<String,DocumentModel> |
documentsByMainTabs |
protected NavigationContext |
navigationContext |
protected RepositoryManager |
repositoryManager |
protected WebActions |
webActions |
Constructor and Description |
---|
MainTabsActions() |
Modifier and Type | Method and Description |
---|---|
protected String |
getCurrentMainTabFromRequest() |
DocumentModel |
getDocumentFor(String mainTabId) |
DocumentModel |
getDocumentFor(String mainTabId,
DocumentModel defaultDocument) |
String |
getPatternFor(String mainTabId) |
String |
getViewFor(Action mainTabAction) |
String |
getViewFor(String mainTabId) |
boolean |
isOnMainTab(String mainTabId) |
void |
setDocumentFor(String mainTabId,
DocumentModel doc)
Set the document used for a given
mainTabId . |
protected boolean |
shouldHandleRequest()
Only handle non POST requests
|
void |
updateContextualDocument() |
public static final String DEFAULT_VIEW
@In(create=true) protected transient RepositoryManager repositoryManager
@In(create=true, required=false) protected transient CoreSession documentManager
@In(create=true, required=false) protected transient NavigationContext navigationContext
@In(create=true) protected transient WebActions webActions
@In(create=true, required=false) protected transient ActionManager actionManager
protected Map<String,DocumentModel> documentsByMainTabs
public MainTabsActions()
@Observer(value="navigateToDocument") public void updateContextualDocument()
protected boolean shouldHandleRequest()
protected String getCurrentMainTabFromRequest()
public void setDocumentFor(String mainTabId, DocumentModel doc)
mainTabId
.public DocumentModel getDocumentFor(String mainTabId)
public DocumentModel getDocumentFor(String mainTabId, DocumentModel defaultDocument)
public String getViewFor(Action mainTabAction)
public String getViewFor(String mainTabId)
public String getPatternFor(String mainTabId)
public boolean isOnMainTab(String mainTabId)
Copyright © 2018 Nuxeo. All rights reserved.