Nuxeo ECM Projects 5.4.3-SNAPSHOT

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:
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(String actionId)
           
 ActionRegistry getActionRegistry()
           
 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()
           
 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
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
applicationStarted, getAdapter, registerExtension, unregisterExtension
 
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 final ActionRegistry getActionRegistry()

getFilterRegistry

public final ActionFilterRegistry getFilterRegistry()

getActions

public List<Action> getActions(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 List<Action> getAllActions(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 List<Action> getActions(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(String actionId)
Specified by:
getAction in interface ActionManager

isRegistered

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

isEnabled

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

isEnabled

public boolean isEnabled(Action action,
                         ActionContext context)

getFilters

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

registerContribution

public void registerContribution(Object contribution,
                                 String extensionPoint,
                                 ComponentInstance contributor)
                          throws Exception
Overrides:
registerContribution in class DefaultComponent
Throws:
Exception

unregisterContribution

public void unregisterContribution(Object contribution,
                                   String extensionPoint,
                                   ComponentInstance contributor)
                            throws Exception
Overrides:
unregisterContribution in class DefaultComponent
Throws:
Exception

unregisterFilterFactory

@Deprecated
public void unregisterFilterFactory(FilterFactory ff)
Deprecated. seems not used in Nuxeo - should be removed - and anyway the merge is not done

Parameters:
ff -

remove

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

Specified by:
remove in interface ActionManager

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.