Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.ui.web.api
Interface WebActions

All Known Implementing Classes:
WebActionsBean

public interface WebActions

Component that handles actions retrieval as well as current tab(s) selection.

Author:
Anahide Tchertchian

Field Summary
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 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
 
Method Summary
 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> 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,...
 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)
          Returns all actions for a given category, creating a new context for the filters resolution.
 List<Action> getUnfiltredActionsList(String category, ActionContext context)
          Returns all actions for a given category and given resolution context.
 boolean hasCurrentTabId(String category)
          Indicates if the current tab id is set for given category
 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
 

Field Detail

NULL_TAB_ID

static final String NULL_TAB_ID
See Also:
Constant Field Values

DEFAULT_TABS_CATEGORY

static final String DEFAULT_TABS_CATEGORY
The category of actions for default tabs

See Also:
Constant Field Values

MAIN_TABS_CATEGORY

static final String MAIN_TABS_CATEGORY
The category of actions for main tabs

Since:
5.4.3
See Also:
Constant Field Values

SUBTAB_CATEGORY_SUFFIX

static final String SUBTAB_CATEGORY_SUFFIX
See Also:
Constant Field Values

DOCUMENTS_MAIN_TAB_ID

static final String DOCUMENTS_MAIN_TAB_ID
Identifier of main tab for the "Documents management" area

Since:
5.4.3
See Also:
Constant Field Values

TAB_IDS_PARAMETER

static final String TAB_IDS_PARAMETER
Request parameter used for tab ids settings

Since:
5.4.3
See Also:
Constant Field Values

MAIN_TAB_ID_PARAMETER

static final String MAIN_TAB_ID_PARAMETER
Request parameter used for main tab id settings

Since:
5.4.3
See Also:
Constant Field Values

CURRENT_TAB_CHANGED_EVENT

static final 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).

Since:
5.4.2
See Also:
Constant Field Values
Method Detail

getActionsList

List<Action> getActionsList(String category,
                            ActionContext context)
Returns all filtered actions for a given category and given resolution context.

Actions are filtered according to filters set on the actions definitions.


getActionsList

List<Action> getActionsList(String category)
Returns all filtered actions for a given category, creating a new context for the filters resolution.

See Also:
getActionsList(String, ActionContext)

getUnfiltredActionsList

List<Action> getUnfiltredActionsList(String category,
                                     ActionContext context)
Returns all actions for a given category and given resolution context.

Actions are not filtered according to filters set on the actions definitions: actions that should have been removed are just marked as non-available.


getUnfiltredActionsList

List<Action> getUnfiltredActionsList(String category)
Returns all actions for a given category, creating a new context for the filters resolution.

See Also:
getUnfiltredActionsList(String, ActionContext)

getAllActions

List<Action> getAllActions(String category)
Returns all actions for a given category, without filtering.


getTabsList

List<Action> getTabsList()
Returns filtered actions for the category DEFAULT_TABS_CATEGORY


getSubTabsList

List<Action> getSubTabsList()
Returns filtered actions for a category computed from the current tab action id and the suffix SUBTAB_CATEGORY_SUFFIX.


getCurrentTabAction

Action getCurrentTabAction()
Returns the current action for category DEFAULT_TABS_CATEGORY


setCurrentTabAction

void setCurrentTabAction(Action tabAction)
Sets the current action for category DEFAULT_TABS_CATEGORY


getCurrentSubTabAction

Action getCurrentSubTabAction()
Returns the current sub tab for a category computed from the current tab action id and the suffix SUBTAB_CATEGORY_SUFFIX.


setCurrentSubTabAction

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.


getCurrentTabId

String getCurrentTabId()
Returns the current action id for category DEFAULT_TABS_CATEGORY


setCurrentTabId

void setCurrentTabId(String tabId)
Sets the current action id for category DEFAULT_TABS_CATEGORY.

Does nothing if tabId is null, but resets current tab for this category when using an empty string instead.


getCurrentSubTabId

String getCurrentSubTabId()
Returns the current sub tab id for a category computed from the current tab action id and the suffix SUBTAB_CATEGORY_SUFFIX.


setCurrentSubTabId

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.

Does nothing if sub tab id is null, but resets current tab for this category when using an empty string instead.


resetTabList

void resetTabList()
Resets actions resolved for category DEFAULT_TABS_CATEGORY so that they're recomputed. Also calls resetCurrentTab()


resetCurrentTab

void resetCurrentTab()
Resets current tab information (includes sub tab information) for category DEFAULT_TABS_CATEGORY.


getCurrentTabAction

Action getCurrentTabAction(String category)
Returns the current action for given category.


getCurrentSubTabAction

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.


setCurrentTabAction

void setCurrentTabAction(String category,
                         Action tabAction)
Sets the current action for given category.

If given action is null, it resets the current action for this category.


getCurrentTabId

String getCurrentTabId(String category)
Returns the current action id for given category


hasCurrentTabId

boolean hasCurrentTabId(String category)
Indicates if the current tab id is set for given category

Since:
5.4.3

setCurrentTabId

void setCurrentTabId(String category,
                     String tabId,
                     String... subTabIds)
Sets the current action for given category, with additional sub tabs.


getCurrentTabIds

String getCurrentTabIds()
Returns current tab ids as a string, encoded as is: CATEGORY_1:ACTION_ID_1,CATEGORY_2:ACTION_ID_2,...

Since:
5.4.2

setCurrentTabIds

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]...]

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,...

Since:
5.4.2

resetCurrentTabs

void resetCurrentTabs()
Resets all current tabs information.

Since:
5.4.2

resetCurrentTabs

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.


setCurrentTabAndNavigate

String setCurrentTabAndNavigate(String currentTabActionId)
Calls setCurrentTabAndNavigate(DocumentModel, String) for the current document.

Given action should hold the category DEFAULT_TABS_CATEGORY

See Also:
NavigationContext.getCurrentDocument()

setCurrentTabAndNavigate

String setCurrentTabAndNavigate(DocumentModel document,
                                String currentTabActionId)
Navigate to the given document and opens the view page of the given document selecting the given tab.

Given action should hold the category DEFAULT_TABS_CATEGORY

Parameters:
document - to document which will be shown in the view page
currentTabActionId - the tab that will be selected in the view page
Returns:
the JSF view for the given document.

getSubViewActionsList

@Deprecated
List<Action> getSubViewActionsList()
Deprecated. 


setCurrentTabAction

@Deprecated
void setCurrentTabAction(String currentTabActionId)
Deprecated. use #setCurrentTabId() or setCurrentTabAction(String, Action)


selectTabAction

@Deprecated
void selectTabAction()
Deprecated. since 5.4: useless, and does nothing


getCurrentLifeCycleState

@Deprecated
String getCurrentLifeCycleState()
                                throws Exception
Deprecated. should be handled by a workflow related (or at least document) action listener.

Throws:
Exception

setTabsList

@Deprecated
void setTabsList(List<Action> tabsList)
Deprecated. since 5.4.2: useless


setSubTabsList

@Deprecated
void setSubTabsList(List<Action> tabsList)
Deprecated. since 5.4.2: useless


Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.