public static final class

ActionRegistry.Entry

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

Class Overview

An entry in the action registry.

Summary

Public Methods
void addSituationOverride(Action action, int situation)
Adds an action to be used instead of the default action for a given situation.
Action getActionForSituation(int situation)
Returns an action for a given situation.
Action getDefaultAction()
Gets the default action
List<String> getNames()
Gets the list of registered names for the entry
ActionRegistry.Predicate getPredicate()
Gets the predicate for the entry.
void setDefaultAction(Action action)
Sets the default action.
void setPredicate(ActionRegistry.Predicate predicate)
Sets the predicate for the entry.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void addSituationOverride (Action action, int situation)

Adds an action to be used instead of the default action for a given situation.

Parameters
action Action for the situation
situation The situation to override

public Action getActionForSituation (int situation)

Returns an action for a given situation.

Parameters
situation Situation for the entry
Returns
  • The action defined for the situation override, or the default action

public Action getDefaultAction ()

Gets the default action

Returns
  • The default action

public List<String> getNames ()

Gets the list of registered names for the entry

Returns
  • A list of names

public ActionRegistry.Predicate getPredicate ()

Gets the predicate for the entry.

Returns
  • The entry's predicate, or null if it is not defined

public void setDefaultAction (Action action)

Sets the default action.

The action must not be null.

Parameters
action The default action for the entry

public void setPredicate (ActionRegistry.Predicate predicate)

Sets the predicate for the entry.

Parameters
predicate A predicate for the entry

public String toString ()