public interface WebActions
Modifier and Type | Field and Description |
---|---|
static String |
AJAX_TAB_PROPERTY
Framework property to control ajaxified behaviour of document tabs.
|
static String |
CURRENT_TAB_CHANGED_EVENT
Event raised when the current tab has changed, with 2 parameters: first parameter is a String representing the
tab category, and second parameter is a String representing the new tab id (or null if current tab is reset for
this category).
|
static String |
CURRENT_TAB_SELECTED_EVENT
Event raised when the current tab is selected, with 2 parameters: first parameter is a String representing the
tab category, and second parameter is a String representing the new tab id (or null if current tab is reset for
this category).
|
static String |
DEFAULT_TABS_CATEGORY
The category of actions for default tabs
|
static String |
DOCUMENTS_MAIN_TAB_ID
Identifier of main tab for the "Documents management" area
|
static String |
MAIN_TAB_ID_PARAMETER
Request parameter used for main tab id settings
|
static String |
MAIN_TABS_CATEGORY
The category of actions for main tabs
|
static String |
NULL_TAB_ID |
static String |
SUBTAB_CATEGORY_SUFFIX |
static String |
TAB_IDS_PARAMETER
Request parameter used for tab ids settings
|
Modifier and Type | Method and Description |
---|---|
boolean |
canUseAjaxTabs()
Returns true if history push state is supported by browser.
|
boolean |
checkFilter(String filterId) |
Action |
getAction(ActionContext context,
String actionId,
boolean includeFiltered,
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 includeFiltered,
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.
|
String |
getCurrentLifeCycleState()
Deprecated.
should be handled by a workflow related (or at least document) action listener.
|
Action |
getCurrentSubTabAction()
Returns the current sub tab for a category computed from the current tab action id and the suffix
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
SUBTAB_CATEGORY_SUFFIX . |
String |
getCurrentSubTabId()
Returns the current sub tab id for a category computed from the current tab action id and the suffix
SUBTAB_CATEGORY_SUFFIX . |
Action |
getCurrentTabAction()
Returns the current action for category
DEFAULT_TABS_CATEGORY |
Action |
getCurrentTabAction(String category)
Returns the current action for given category.
|
String |
getCurrentTabId()
Returns the current action id for category
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,...
|
Action |
getDocumentAction(DocumentModel document,
String actionId,
boolean includeFiltered,
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
SUBTAB_CATEGORY_SUFFIX . |
List<Action> |
getSubViewActionsList()
Deprecated.
|
List<Action> |
getTabsList()
Returns filtered actions for the category
DEFAULT_TABS_CATEGORY |
List<Action> |
getUnfiltredActionsList(String category)
Deprecated.
since 5.7, use
getActionsList(String, ActionContext, boolean) |
List<Action> |
getUnfiltredActionsList(String category,
ActionContext context)
Deprecated.
since 5.7, use
getActionsList(String, ActionContext, boolean) |
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 |
resetCurrentTab()
Resets current tab information (includes sub tab information) for category
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
SUBTAB_CATEGORY_SUFFIX . |
void |
resetTabList()
Resets actions resolved for category
DEFAULT_TABS_CATEGORY so that they're recomputed. |
void |
selectTabAction()
Deprecated.
since 5.4: useless, and does nothing
|
void |
setCurrentSubTabAction(Action tabAction)
Sets the current sub tab for a category computed from the current tab action id and the suffix
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
SUBTAB_CATEGORY_SUFFIX . |
void |
setCurrentTabAction(Action tabAction)
Sets the current action for category
DEFAULT_TABS_CATEGORY |
void |
setCurrentTabAction(String currentTabActionId)
Deprecated.
use
#setCurrentTabId() or setCurrentTabAction(String, Action) |
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
setCurrentTabAndNavigate(DocumentModel, String) for the current document. |
void |
setCurrentTabId(String tabId)
Sets the current action id for category
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]...]
|
void |
setSubTabsList(List<Action> tabsList)
Deprecated.
since 5.4.2: useless
|
void |
setTabsList(List<Action> tabsList)
Deprecated.
since 5.4.2: useless
|
boolean |
useAjaxTabs()
Returns true if ajaxified behaviour of tabs is activated on the server, and if history push state is supported by
browser.
|
static final String NULL_TAB_ID
static final String DEFAULT_TABS_CATEGORY
static final String MAIN_TABS_CATEGORY
static final String SUBTAB_CATEGORY_SUFFIX
static final String DOCUMENTS_MAIN_TAB_ID
static final String TAB_IDS_PARAMETER
static final String MAIN_TAB_ID_PARAMETER
static final String CURRENT_TAB_CHANGED_EVENT
static final String CURRENT_TAB_SELECTED_EVENT
This event is sent also when current tab did not change.
static final String AJAX_TAB_PROPERTY
List<Action> getDocumentActions(DocumentModel document, String category, boolean removeFiltered, boolean postFilter)
removeFiltered:
- if true, do not return filtered actions. Useful to display filtered actions as disabled
(by using using value false).postFilter:
- if true, do not filter actions. Actions will need to be filtered or disabled at render time.
Useful to filter actions when filtering context is available at render time only (for instance when
displaying actions in listings inside a JSF iteration done at render time).Action getDocumentAction(DocumentModel document, String actionId, boolean includeFiltered, boolean postFilter)
Returns null if action is not found or filtered (depending on additional parameters).
removeFiltered:
- if true, do not return filtered actions. Useful to display filtered actions as disabled
(by using using value false).postFilter:
- if true, do not filter actions. Actions will need to be filtered or disabled at render time.
Useful to filter actions when filtering context is available at render time only (for instance when
displaying actions in listings inside a JSF iteration done at render time).List<Action> getActions(ActionContext context, String category, boolean includeFiltered, boolean postFilter)
removeFiltered:
- if true, do not return filtered actions. Useful to display filtered actions as disabled
(by using using value false).postFilter:
- if true, do not filter actions. Actions will need to be filtered or disabled at render time.
Useful to filter actions when filtering context is available at render time only (for instance when
displaying actions in listings inside a JSF iteration done at render time).Action getAction(ActionContext context, String actionId, boolean includeFiltered, boolean postFilter)
Returns null if action is not found or filtered (depending on additional parameters).
removeFiltered:
- if true, do not return filtered actions. Useful to display filtered actions as disabled
(by using using value false).postFilter:
- if true, do not filter actions. Actions will need to be filtered or disabled at render time.
Useful to filter actions when filtering context is available at render time only (for instance when
displaying actions in listings inside a JSF iteration done at render time).boolean isAvailableForDocument(DocumentModel document, Action action)
boolean isAvailable(ActionContext context, Action action)
List<Action> getActionsList(String category, ActionContext context)
Actions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
List<Action> getActionsList(String category, Boolean removeFiltered)
Actions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
List<Action> getActionsListForDocument(String category, DocumentModel document, boolean removeFiltered)
Actions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
List<Action> getActionsList(String category, ActionContext context, boolean removeFiltered)
Actions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
List<Action> getActionsList(String category)
Since 5.8, the category can be a list of categories, separated by commas.
getActionsList(String, ActionContext)
@Deprecated List<Action> getUnfiltredActionsList(String category, ActionContext context)
getActionsList(String, ActionContext, boolean)
Actions are not filtered according to filters set on the actions definitions: actions that should have been removed are just marked as non-available.
Since 5.8, the category can be a list of categories, separated by commas.
@Deprecated List<Action> getUnfiltredActionsList(String category)
getActionsList(String, ActionContext, boolean)
Since 5.8, the category can be a list of categories, separated by commas.
List<Action> getAllActions(String category)
List<Action> getTabsList()
DEFAULT_TABS_CATEGORY
List<Action> getSubTabsList()
SUBTAB_CATEGORY_SUFFIX
.Action getCurrentTabAction()
DEFAULT_TABS_CATEGORY
void setCurrentTabAction(Action tabAction)
DEFAULT_TABS_CATEGORY
Action getCurrentSubTabAction()
SUBTAB_CATEGORY_SUFFIX
.void setCurrentSubTabAction(Action tabAction)
SUBTAB_CATEGORY_SUFFIX
.String getCurrentTabId()
DEFAULT_TABS_CATEGORY
void setCurrentTabId(String tabId)
DEFAULT_TABS_CATEGORY
.
Does nothing if tabId is null, but resets current tab for this category when using an empty string instead.
String getCurrentSubTabId()
SUBTAB_CATEGORY_SUFFIX
.void setCurrentSubTabId(String tabId)
SUBTAB_CATEGORY_SUFFIX
.
Does nothing if sub tab id is null, but resets current tab for this category when using an empty string instead.
void resetTabList()
DEFAULT_TABS_CATEGORY
so that they're recomputed. Also calls
resetCurrentTab()
void resetCurrentTab()
DEFAULT_TABS_CATEGORY
.Action getCurrentTabAction(String category)
Action getCurrentSubTabAction(String parentActionId)
SUBTAB_CATEGORY_SUFFIX
.void setCurrentTabAction(String category, Action tabAction)
If given action is null, it resets the current action for this category.
String getCurrentTabId(String category)
boolean hasCurrentTabId(String category)
void setCurrentTabId(String category, String tabId, String... subTabIds)
String getCurrentTabIds()
void setCurrentTabIds(String tabIds)
If category is omitted or empty, the category 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,...
void resetCurrentTabs()
void resetCurrentTabs(String category)
SUBTAB_CATEGORY_SUFFIX
.String setCurrentTabAndNavigate(String currentTabActionId)
setCurrentTabAndNavigate(DocumentModel, String)
for the current document.
Given action should hold the category DEFAULT_TABS_CATEGORY
NavigationContext.getCurrentDocument()
String setCurrentTabAndNavigate(DocumentModel document, String currentTabActionId)
Given action should hold the category DEFAULT_TABS_CATEGORY
document
- to document which will be shown in the view pagecurrentTabActionId
- the tab that will be selected in the view pageboolean checkFilter(String filterId)
ActionManager.checkFilter(String, ActionContext)
Action getAction(String actionId, boolean removeFiltered)
ActionManager.getAction(String, ActionContext, boolean)
Action getActionForDocument(String actionId, DocumentModel document, boolean removeFiltered)
ActionManager.getAction(String, ActionContext, boolean)
Action getAction(String actionId, ActionContext context, boolean removeFiltered)
ActionManager.getAction(String, ActionContext, boolean)
boolean useAjaxTabs()
AJAX_TAB_PROPERTY
,
canUseAjaxTabs()
boolean canUseAjaxTabs()
useAjaxTabs()
@Deprecated List<Action> getSubViewActionsList()
@Deprecated void setCurrentTabAction(String currentTabActionId)
#setCurrentTabId()
or setCurrentTabAction(String, Action)
@Deprecated void selectTabAction()
@Deprecated String getCurrentLifeCycleState()
@Deprecated void setTabsList(List<Action> tabsList)
@Deprecated void setSubTabsList(List<Action> tabsList)
Copyright © 2016 Nuxeo SA. All rights reserved.