public class

ActionRegistry

extends Object
java.lang.Object
   ↳ com.urbanairship.actions.ActionRegistry

Class Overview

Class responsible for runtime-persisting actions and associating them with names and predicates.

Summary

Nested Classes
class ActionRegistry.Entry An entry in the action registry. 
interface ActionRegistry.Predicate ActionArgument predicate  
Public Constructors
ActionRegistry()
Public Methods
Set<ActionRegistry.Entry> getEntries()
Gets the set of registry entries that are currently registered.
ActionRegistry.Entry getEntry(String name)
Gets an action entry for a given name.
ActionRegistry.Entry registerAction(Class<? extends Action> clazz, String... names)
Registers an action by class.
ActionRegistry.Entry registerAction(Action action, String... names)
Registers an action.
void registerDefaultActions(Context context)
Registers default actions.
void unregisterAction(String name)
Unregister an action from the registry.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ActionRegistry ()

Public Methods

public Set<ActionRegistry.Entry> getEntries ()

Gets the set of registry entries that are currently registered.

Returns
  • Set of registered entries

public ActionRegistry.Entry getEntry (String name)

Gets an action entry for a given name.

Parameters
name The name of the action
Returns
  • An Entry for the name, or null if no entry exists for the given name

public ActionRegistry.Entry registerAction (Class<? extends Action> clazz, String... names)

Registers an action by class.

Parameters
clazz The class to register
names The names the action will be registered under
Returns
  • The entry.
Throws
IllegalArgumentException If no names were provided, or if th one of the names is an empty string.

public ActionRegistry.Entry registerAction (Action action, String... names)

Registers an action.

If another entry is registered under specified name, it will be removed from that entry and used for the new action.

Parameters
action The action to register
names The names the action will be registered under
Returns
  • The entry.
Throws
IllegalArgumentException If no names were provided, or if th one of the names is an empty string.

public void registerDefaultActions (Context context)

Registers default actions.

Parameters
context The application context.

public void unregisterAction (String name)

Unregister an action from the registry.

Parameters
name The name of the action.