@Name(value="webActions") @Scope(value=CONVERSATION) @Install(precedence=10) public class WebActionsBean extends Object implements WebActions, Serializable
| Modifier and Type | Field and Description | 
|---|---|
protected ActionContextProvider | 
actionContextProvider  | 
protected ActionManager | 
actionManager  | 
protected TabActionsSelection | 
currentTabActions  | 
protected NavigationContext | 
navigationContext  | 
protected List<Action> | 
subTabsActionsList  | 
protected String | 
subTabsCategory  | 
protected List<Action> | 
tabsActionsList  | 
AJAX_TAB_PROPERTY, CURRENT_TAB_CHANGED_EVENT, CURRENT_TAB_SELECTED_EVENT, DEFAULT_TABS_CATEGORY, DOCUMENTS_MAIN_TAB_ID, MAIN_TAB_ID_PARAMETER, MAIN_TABS_CATEGORY, NULL_TAB_ID, SUBTAB_CATEGORY_SUFFIX, TAB_IDS_PARAMETER| Constructor and Description | 
|---|
WebActionsBean()  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
canUseAjaxTabs()
Returns true if history push state is supported by browser. 
 | 
boolean | 
checkFilter(String filterId)  | 
protected ActionContext | 
createActionContext()  | 
protected ActionContext | 
createActionContext(DocumentModel document)  | 
Action | 
getAction(ActionContext context,
         String actionId,
         boolean removeFiltered,
         boolean postFilter)
Return action in given action context for given id. 
 | 
Action | 
getAction(String actionId,
         ActionContext context,
         boolean removeFiltered)  | 
Action | 
getAction(String actionId,
         boolean removeFiltered)  | 
Action | 
getActionForDocument(String actionId,
                    DocumentModel document,
                    boolean removeFiltered)
Return action with given id, with context filled with given document. 
 | 
List<Action> | 
getActions(ActionContext context,
          String category,
          boolean removeFiltered,
          boolean postFilter)
Return actions in given action context for given category. 
 | 
List<Action> | 
getActionsList(String category)
Returns all filtered actions for a given category, creating a new context for the filters resolution. 
 | 
List<Action> | 
getActionsList(String category,
              ActionContext context)
Returns all filtered actions for a given category and given resolution context. 
 | 
List<Action> | 
getActionsList(String category,
              ActionContext context,
              boolean removeFiltered)
Returns all filtered actions for a given category and given resolution context. 
 | 
List<Action> | 
getActionsList(String category,
              Boolean removeFiltered)
Returns all filtered actions for a given category and given resolution context, creating a new context for the
 filters resolution. 
 | 
List<Action> | 
getActionsListForDocument(String category,
                         DocumentModel document,
                         boolean removeFiltered)
Returns all filtered actions for a given category and a context built with given current document context,
 creating a new context for the filters resolution. 
 | 
List<Action> | 
getAllActions(String category)
Returns all actions for a given category, without filtering. 
 | 
Action | 
getCurrentSubTabAction()
Returns the current sub tab for a category computed from the current tab action id and the suffix
  
WebActions.SUBTAB_CATEGORY_SUFFIX. | 
Action | 
getCurrentSubTabAction(String parentActionId)
Returns the current sub tab action for given parent action, computing the category from parent action id with
 suffix  
WebActions.SUBTAB_CATEGORY_SUFFIX. | 
String | 
getCurrentSubTabId()
Returns the current sub tab id for a category computed from the current tab action id and the suffix
  
WebActions.SUBTAB_CATEGORY_SUFFIX. | 
Action | 
getCurrentTabAction()
Returns the current action for category  
WebActions.DEFAULT_TABS_CATEGORY | 
Action | 
getCurrentTabAction(String category)
Returns the current action for given category. 
 | 
String | 
getCurrentTabId()
Returns the current action id for category  
WebActions.DEFAULT_TABS_CATEGORY | 
String | 
getCurrentTabId(String category)
Returns the current action id for given category 
 | 
String | 
getCurrentTabIds()
Returns current tab ids as a string, encoded as is: CATEGORY_1:ACTION_ID_1,CATEGORY_2:ACTION_ID_2,... 
 | 
protected Action | 
getDefaultTab(String category)  | 
Action | 
getDocumentAction(DocumentModel document,
                 String actionId,
                 boolean removeFiltered,
                 boolean postFilter)
Return action in given document context for given id. 
 | 
List<Action> | 
getDocumentActions(DocumentModel document,
                  String category,
                  boolean removeFiltered,
                  boolean postFilter)
Return actions in given document context for given category. 
 | 
List<Action> | 
getSubTabsList()
Returns filtered actions for a category computed from the current tab action id and the suffix
  
WebActions.SUBTAB_CATEGORY_SUFFIX. | 
List<Action> | 
getTabsList()
Returns filtered actions for the category  
WebActions.DEFAULT_TABS_CATEGORY | 
boolean | 
hasCurrentTabId(String category)
Indicates if the current tab id is set for given category 
 | 
boolean | 
isAvailable(ActionContext context,
           Action action)
Returns true if filters evaluation for given action, in given action context, grants access. 
 | 
boolean | 
isAvailableForDocument(DocumentModel document,
                      Action action)
Returns true if filters evaluation for given action, in given document context, grants access. 
 | 
void | 
onHotReloadFlush()  | 
boolean | 
removeActionOptims()
Returns true if configuration property to remove optimizations around actions (for compatibility) has been
 enabled. 
 | 
void | 
resetCurrentTab()
Resets current tab information (includes sub tab information) for category  
WebActions.DEFAULT_TABS_CATEGORY. | 
void | 
resetCurrentTabs()
Resets all current tabs information. 
 | 
void | 
resetCurrentTabs(String category)
Resets current tabs for given category, taking subtabs into account by resetting actions in categories computed
 from reset actions id with suffix  
WebActions.SUBTAB_CATEGORY_SUFFIX. | 
protected void | 
resetSubTabs()  | 
void | 
resetTabList()
Resets actions resolved for category  
WebActions.DEFAULT_TABS_CATEGORY so that they're recomputed. | 
void | 
setCurrentSubTabAction(Action tabAction)
Sets the current sub tab for a category computed from the current tab action id and the suffix
  
WebActions.SUBTAB_CATEGORY_SUFFIX. | 
void | 
setCurrentSubTabId(String tabId)
Sets the current sub tab id for a category computed from the current tab action id and the suffix
  
WebActions.SUBTAB_CATEGORY_SUFFIX. | 
void | 
setCurrentTabAction(Action currentTabAction)
Sets the current action for category  
WebActions.DEFAULT_TABS_CATEGORY | 
void | 
setCurrentTabAction(String category,
                   Action tabAction)
Sets the current action for given category. 
 | 
String | 
setCurrentTabAndNavigate(DocumentModel document,
                        String currentTabActionId)
Navigate to the given document and opens the view page of the given document selecting the given tab. 
 | 
String | 
setCurrentTabAndNavigate(String currentTabActionId)
Calls  
WebActions.setCurrentTabAndNavigate(DocumentModel, String) for the current document. | 
void | 
setCurrentTabId(String tabId)
Sets the current action id for category  
WebActions.DEFAULT_TABS_CATEGORY. | 
void | 
setCurrentTabId(String category,
               String tabId,
               String... subTabIds)
Sets the current action for given category, with additional sub tabs. 
 | 
void | 
setCurrentTabIds(String tabIds)
Sets current tab ids as a String, splitting on commas ',' and parsing each action information as is:
 CATEGORY:ACTION_ID[:OPTIONAL_SUB_ACTION_ID[:OPTIONAL_SUB_ACTION_ID]...] 
 | 
boolean | 
useAjaxTabs()
Returns true if ajaxified behaviour of tabs is activated on the server, and if history push state is supported by
 browser. 
 | 
@In(create=true,
    required=false)
protected transient ActionManager actionManager
@In(create=true,
    required=false)
protected transient ActionContextProvider actionContextProvider
@In(create=true,
    required=false)
protected transient NavigationContext navigationContext
protected List<Action> tabsActionsList
protected String subTabsCategory
protected List<Action> subTabsActionsList
protected TabActionsSelection currentTabActions
public WebActionsBean()
public List<Action> getDocumentActions(DocumentModel document, String category, boolean removeFiltered, boolean postFilter)
WebActionsgetDocumentActions in interface WebActionspublic Action getDocumentAction(DocumentModel document, String actionId, boolean removeFiltered, boolean postFilter)
WebActionsReturns null if action is not found or filtered (depending on additional parameters).
getDocumentAction in interface WebActionspublic List<Action> getActions(ActionContext context, String category, boolean removeFiltered, boolean postFilter)
WebActionsgetActions in interface WebActionspublic Action getAction(ActionContext context, String actionId, boolean removeFiltered, boolean postFilter)
WebActionsReturns null if action is not found or filtered (depending on additional parameters).
getAction in interface WebActionspublic boolean isAvailableForDocument(DocumentModel document, Action action)
WebActionsisAvailableForDocument in interface WebActionspublic boolean isAvailable(ActionContext context, Action action)
WebActionsisAvailable in interface WebActionspublic List<Action> getActionsList(String category, ActionContext context, boolean removeFiltered)
WebActionsActions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
getActionsList in interface WebActionspublic List<Action> getActionsList(String category, Boolean removeFiltered)
WebActionsActions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
getActionsList in interface WebActionspublic List<Action> getActionsList(String category, ActionContext context)
WebActionsActions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
getActionsList in interface WebActionspublic List<Action> getActionsListForDocument(String category, DocumentModel document, boolean removeFiltered)
WebActionsActions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
getActionsListForDocument in interface WebActionspublic List<Action> getActionsList(String category)
WebActionsSince 5.8, the category can be a list of categories, separated by commas.
getActionsList in interface WebActionsWebActions.getActionsList(String, ActionContext)public List<Action> getAllActions(String category)
WebActionsgetAllActions in interface WebActionsprotected ActionContext createActionContext()
protected ActionContext createActionContext(DocumentModel document)
public Action getAction(String actionId, boolean removeFiltered)
getAction in interface WebActionsActionManager.getAction(String, ActionContext, boolean)public Action getActionForDocument(String actionId, DocumentModel document, boolean removeFiltered)
WebActionsgetActionForDocument in interface WebActionsActionManager.getAction(String, ActionContext, boolean)public Action getAction(String actionId, ActionContext context, boolean removeFiltered)
getAction in interface WebActionsActionManager.getAction(String, ActionContext, boolean)public boolean checkFilter(String filterId)
checkFilter in interface WebActionsActionManager.checkFilter(String, ActionContext)protected Action getDefaultTab(String category)
public Action getCurrentTabAction(String category)
WebActionsgetCurrentTabAction in interface WebActionspublic void setCurrentTabAction(String category, Action tabAction)
WebActionsIf given action is null, it resets the current action for this category.
setCurrentTabAction in interface WebActionspublic Action getCurrentSubTabAction(String parentActionId)
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.getCurrentSubTabAction in interface WebActionspublic String getCurrentTabId(String category)
WebActionsgetCurrentTabId in interface WebActionspublic boolean hasCurrentTabId(String category)
WebActionshasCurrentTabId in interface WebActionspublic void setCurrentTabId(String category, String tabId, String... subTabIds)
WebActionssetCurrentTabId in interface WebActionspublic String getCurrentTabIds()
WebActionsgetCurrentTabIds in interface WebActionspublic void setCurrentTabIds(String tabIds)
WebActions
 If category is omitted or empty, the category WebActions.DEFAULT_TABS_CATEGORY will be used (if there is no subtab
 information).
 
The resulting string looks like: CATEGORY_1:ACTION_ID_1,CATEGORY_2:ACTION_ID_2_SUB_ACTION_ID_2,...
setCurrentTabIds in interface WebActionspublic void resetCurrentTabs()
WebActionsresetCurrentTabs in interface WebActionspublic void resetCurrentTabs(String category)
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.resetCurrentTabs in interface WebActionspublic void resetCurrentTab()
WebActionsWebActions.DEFAULT_TABS_CATEGORY.resetCurrentTab in interface WebActionsprotected void resetSubTabs()
@Observer(value={"userAllDocumentTypesSelectionChanged","locationSelectionChanged"},
          create=false)
 @BypassInterceptors
public void resetTabList()
WebActionsWebActions.DEFAULT_TABS_CATEGORY so that they're recomputed. Also calls
 WebActions.resetCurrentTab()resetTabList in interface WebActions@Factory(value="tabsActionsList",
         scope=EVENT)
public List<Action> getTabsList()
WebActionsWebActions.DEFAULT_TABS_CATEGORYgetTabsList in interface WebActions@Factory(value="subTabsActionsList",
         scope=EVENT)
public List<Action> getSubTabsList()
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.getSubTabsList in interface WebActions@Factory(value="currentTabAction",
         scope=EVENT)
public Action getCurrentTabAction()
WebActionsWebActions.DEFAULT_TABS_CATEGORYgetCurrentTabAction in interface WebActionspublic void setCurrentTabAction(Action currentTabAction)
WebActionsWebActions.DEFAULT_TABS_CATEGORYsetCurrentTabAction in interface WebActions@Factory(value="currentSubTabAction",
         scope=EVENT)
public Action getCurrentSubTabAction()
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.getCurrentSubTabAction in interface WebActionspublic void setCurrentSubTabAction(Action tabAction)
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.setCurrentSubTabAction in interface WebActionspublic String getCurrentTabId()
WebActionsWebActions.DEFAULT_TABS_CATEGORYgetCurrentTabId in interface WebActionspublic void setCurrentTabId(String tabId)
WebActionsWebActions.DEFAULT_TABS_CATEGORY.
 Does nothing if tabId is null, but resets current tab for this category when using an empty string instead.
setCurrentTabId in interface WebActionspublic String getCurrentSubTabId()
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.getCurrentSubTabId in interface WebActionspublic void setCurrentSubTabId(String tabId)
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.
 Does nothing if sub tab id is null, but resets current tab for this category when using an empty string instead.
setCurrentSubTabId in interface WebActionspublic String setCurrentTabAndNavigate(String currentTabActionId)
WebActionsWebActions.setCurrentTabAndNavigate(DocumentModel, String) for the current document.
 
 Given action should hold the category WebActions.DEFAULT_TABS_CATEGORY
setCurrentTabAndNavigate in interface WebActionsNavigationContext.getCurrentDocument()public String setCurrentTabAndNavigate(DocumentModel document, String currentTabActionId)
WebActions
 Given action should hold the category WebActions.DEFAULT_TABS_CATEGORY
setCurrentTabAndNavigate in interface WebActionsdocument - to document which will be shown in the view pagecurrentTabActionId - the tab that will be selected in the view page@Factory(value="useAjaxTabs",
         scope=SESSION)
public boolean useAjaxTabs()
WebActionsuseAjaxTabs in interface WebActionsWebActions.AJAX_TAB_PROPERTY, 
WebActions.canUseAjaxTabs()@Factory(value="canUseAjaxTabs",
         scope=SESSION)
public boolean canUseAjaxTabs()
WebActionscanUseAjaxTabs in interface WebActionsWebActions.useAjaxTabs()@Factory(value="removeActionOptims",
         scope=SESSION)
public boolean removeActionOptims()
@Observer(value="flush",
          create=false)
 @BypassInterceptors
public void onHotReloadFlush()
Copyright © 2019 Nuxeo. All rights reserved.