Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.actions
Class ActionService

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.platform.actions.ActionService
All Implemented Interfaces:
java.io.Serializable, ActionManager, Adaptable, Component, Extensible

public class ActionService
extends DefaultComponent
implements ActionManager

Author:
Bogdan Stefanescu
See Also:
Serialized Form

Field Summary
static ComponentName ID
           
 
Constructor Summary
ActionService()
           
 
Method Summary
 void activate(ComponentContext context)
          Activates the component.
 void deactivate(ComponentContext context)
          Deactivates the component.
 Action getAction(java.lang.String actionId)
           
 ActionRegistry getActionRegistry()
           
 java.util.List<Action> getActions(java.lang.String category, ActionContext context)
          Gets actions for a category (filters are evaluated).
 java.util.List<Action> getActions(java.lang.String category, ActionContext context, boolean hideUnavailableActions)
          Gets actions for a category (filters are evaluated).
 java.util.List<Action> getAllActions(java.lang.String category)
          Gets all actions in a category (filters are NOT evaluated).
 ActionFilterRegistry getFilterRegistry()
           
 ActionFilter[] getFilters(java.lang.String actionId)
           
 boolean isEnabled(Action action, ActionContext context)
           
 boolean isEnabled(java.lang.String actionId, ActionContext context)
           
 boolean isRegistered(java.lang.String actionId)
           
 void registerActionExtension(Extension extension)
           
 void registerExtension(Extension extension)
          Registers the given extension.
 void registerFilterExtension(Extension extension)
           
 void remove()
          Cleanup method.
 void unregisterActionExtension(Extension extension)
           
 void unregisterExtension(Extension extension)
          Unregisters the given extension.
 void unregisterFilterExtension(Extension extension)
           
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
getAdapter, registerContribution, unregisterContribution
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final ComponentName ID
Constructor Detail

ActionService

public ActionService()
Method Detail

activate

public void activate(ComponentContext context)
Description copied from interface: Component
Activates the component.

This method is called by the runtime when a component is activated.

Specified by:
activate in interface Component
Overrides:
activate in class DefaultComponent
Parameters:
context - the runtime context

deactivate

public void deactivate(ComponentContext context)
Description copied from interface: Component
Deactivates the component.

This method is called by the runtime when a component is deactivated.

Specified by:
deactivate in interface Component
Overrides:
deactivate in class DefaultComponent
Parameters:
context - the runtime context

getActionRegistry

public ActionRegistry getActionRegistry()

getFilterRegistry

public ActionFilterRegistry getFilterRegistry()

getActions

public java.util.List<Action> getActions(java.lang.String category,
                                         ActionContext context)
Description copied from interface: ActionManager
Gets actions for a category (filters are evaluated).

Only actions available in the give context are returned

Specified by:
getActions in interface ActionManager

getAllActions

public java.util.List<Action> getAllActions(java.lang.String category)
Description copied from interface: ActionManager
Gets all actions in a category (filters are NOT evaluated).

Specified by:
getAllActions in interface ActionManager

getActions

public java.util.List<Action> getActions(java.lang.String category,
                                         ActionContext context,
                                         boolean hideUnavailableActions)
Description copied from interface: ActionManager
Gets actions for a category (filters are evaluated).

If hideUnavailableActions, all actions of the category are returned but actions are flagged with a enable flag depending on filters evaluation.

Specified by:
getActions in interface ActionManager

getAction

public Action getAction(java.lang.String actionId)
Specified by:
getAction in interface ActionManager

isRegistered

public boolean isRegistered(java.lang.String actionId)
Specified by:
isRegistered in interface ActionManager

isEnabled

public boolean isEnabled(java.lang.String actionId,
                         ActionContext context)
Specified by:
isEnabled in interface ActionManager

isEnabled

public boolean isEnabled(Action action,
                         ActionContext context)

getFilters

public ActionFilter[] getFilters(java.lang.String actionId)
Specified by:
getFilters in interface ActionManager

registerExtension

public void registerExtension(Extension extension)
Description copied from interface: Extensible
Registers the given extension.

Specified by:
registerExtension in interface Extensible
Overrides:
registerExtension in class DefaultComponent
Parameters:
extension - the extension to register

unregisterExtension

public void unregisterExtension(Extension extension)
Description copied from interface: Extensible
Unregisters the given extension.

Specified by:
unregisterExtension in interface Extensible
Overrides:
unregisterExtension in class DefaultComponent
Parameters:
extension - the extension to unregister

registerFilterExtension

public void registerFilterExtension(Extension extension)

unregisterFilterExtension

public void unregisterFilterExtension(Extension extension)

registerActionExtension

public void registerActionExtension(Extension extension)

unregisterActionExtension

public void unregisterActionExtension(Extension extension)

remove

public void remove()
Description copied from interface: ActionManager
Cleanup method.

Specified by:
remove in interface ActionManager

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.