Class AbstractContextCommand
java.lang.Object
com.levigo.jadice.web.client.util.command.InjectedCommand
com.levigo.jadice.web.client.commands.AbstractContextCommand
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
AbstractPageViewCommand
,ToggleNotificationsCommand
Abstract base class for context aware injected commands.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Context
protected void
Propagate a change of the context from which this command is currently being executed.void
setContext
(Context context) Invoked by command injection.Methods inherited from class com.levigo.jadice.web.client.util.command.InjectedCommand
canExecute, canExecute, clearInjections, execute, execute, getKey, isSelected, isSelected, setKey
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.levigo.jadice.web.client.util.command.Command
getID, isAvailable, isAvailable
-
Constructor Details
-
AbstractContextCommand
public AbstractContextCommand()
-
-
Method Details
-
getContext
- Returns:
- the context
-
propagateContextChange
protected void propagateContextChange()Propagate a change of the context from which this command is currently being executed. Silently skip propagating a change, if there is no current context. -
setContext
Invoked by command injection.Developers should not invoke this method in any direct way.
- Parameters:
context
- The context to be set.
-