public class ActionService extends DefaultComponent implements ActionManager
Modifier and Type | Field and Description |
---|---|
static ComponentName |
ID |
Constructor and Description |
---|
ActionService() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
Action |
getAction(String actionId) |
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) |
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, registerExtension, unregisterExtension
public static final ComponentName ID
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 give 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 a enable flag depending on filters evaluation.
getActions
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 void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution
in class DefaultComponent
Exception
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution
in class DefaultComponent
Exception
@Deprecated public void unregisterFilterFactory(FilterFactory ff)
ff
- public void remove()
ActionManager
remove
in interface ActionManager
Copyright © 2011 Nuxeo SA. All Rights Reserved.