public class ActionService extends DefaultComponent implements ActionManager
Modifier and Type | Field and Description |
---|---|
static ComponentName |
ID |
lastModified
Constructor and Description |
---|
ActionService() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
boolean |
checkFilter(String filterId,
ActionContext context)
Returns false if given filter evaluation is supposed to deny access when checking for this filter.
|
protected boolean |
checkFilters(Action action,
List<String> filterIds,
ActionContext context) |
boolean |
checkFilters(List<String> filterIds,
ActionContext context)
Returns false if given filters evaluation is supposed to deny access when checking for this filter.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
Action |
getAction(String actionId) |
Action |
getAction(String actionId,
ActionContext context,
boolean hideUnavailableAction)
Returns action with given id, evaluating its filters in given context, and returning null if filters evaluation
denies access or if action is not found.
|
ActionRegistry |
getActionRegistry()
Deprecated.
since 5.5: use interface methods on ActionManager instead of public methods on ActionService.
|
List<Action> |
getActions(String category,
ActionContext context)
Gets actions for a category (filters are evaluated).
|
List<Action> |
getActions(String category,
ActionContext context,
boolean hideUnavailableActions)
Gets actions for a category (filters are evaluated).
|
List<Action> |
getAllActions(String category)
Gets all actions in a category (filters are NOT evaluated).
|
ActionFilterRegistry |
getFilterRegistry()
Deprecated.
since 5.5: use interface methods on ActionManager instead of public methods on ActionService.
|
ActionFilter[] |
getFilters(String actionId) |
boolean |
isEnabled(Action action,
ActionContext context) |
boolean |
isEnabled(String actionId,
ActionContext context) |
boolean |
isRegistered(String actionId) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
protected void |
registerFilterFactory(FilterFactory ff)
Deprecated.
seems not used in Nuxeo - should be removed - and anyway the merge is not done
|
void |
remove()
Cleanup method.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterFilterFactory(FilterFactory ff)
Deprecated.
seems not used in Nuxeo - should be removed - and anyway the merge is not done
|
applicationStarted, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtension
public static final ComponentName ID
public ActionService()
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime context@Deprecated public final ActionRegistry getActionRegistry()
@Deprecated public final ActionFilterRegistry getFilterRegistry()
public List<Action> getActions(String category, ActionContext context)
ActionManager
Only actions available in the given context are returned
getActions
in interface ActionManager
public List<Action> getAllActions(String category)
ActionManager
getAllActions
in interface ActionManager
public List<Action> getActions(String category, ActionContext context, boolean hideUnavailableActions)
ActionManager
If hideUnavailableActions, all actions of the category are returned but actions are flagged with an available flag depending on filters evaluation.
getActions
in interface ActionManager
public Action getAction(String actionId, ActionContext context, boolean hideUnavailableAction)
ActionManager
If hideUnavailableActions is false, the action is always returned but it is flagged with an available flag depending on filters evaluation.
getAction
in interface ActionManager
public Action getAction(String actionId)
getAction
in interface ActionManager
public boolean isRegistered(String actionId)
isRegistered
in interface ActionManager
public boolean isEnabled(String actionId, ActionContext context)
isEnabled
in interface ActionManager
public boolean isEnabled(Action action, ActionContext context)
public ActionFilter[] getFilters(String actionId)
getFilters
in interface ActionManager
public boolean checkFilter(String filterId, ActionContext context)
ActionManager
checkFilter
in interface ActionManager
public boolean checkFilters(List<String> filterIds, ActionContext context)
ActionManager
checkFilters
in interface ActionManager
protected boolean checkFilters(Action action, List<String> filterIds, ActionContext context)
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
@Deprecated protected void registerFilterFactory(FilterFactory ff)
ff
- @Deprecated public void unregisterFilterFactory(FilterFactory ff)
ff
- public void remove()
ActionManager
remove
in interface ActionManager
Copyright © 2015 Nuxeo SA. All rights reserved.