public interface CommandController extends AutoCloseable
UICommand
close
void initialize() throws Exception
UICommand.initializeUI(org.jboss.forge.addon.ui.context.UIBuilder)
on the underlying UICommand
instance.Exception
- if problems occurred during initialization.boolean isInitialized()
true
if initialize()
has been called.Result execute() throws Exception
UICommand.execute(org.jboss.forge.addon.ui.context.UIExecutionContext)
. Causes available
CommandExecutionListener
instances to be called.IllegalStateException
- if initialize()
has not been called before invoking this method.Exception
- if problems occurred during initializationList<UIMessage> validate()
UICommand.validate(org.jboss.forge.addon.ui.context.UIValidationContext)
, and
InputComponent.validate(org.jboss.forge.addon.ui.context.UIValidationContext)
for each enabled
InputComponent
.IllegalStateException
- if initialize()
has not been called before invoking this method.List<UIMessage> validate(InputComponent<?,?> input)
InputComponent.validate(org.jboss.forge.addon.ui.context.UIValidationContext)
for the given
InputComponent
belonging to the underlying UICommand
.IllegalStateException
- if initialize()
has not been called before invoking this method.boolean isValid()
IllegalStateException
- if initialize()
has not been called before invoking this method.CommandController setValueFor(String inputName, Object value) throws IllegalArgumentException
InputComponent
with the given name.IllegalArgumentException
- if no InputComponent
with the given name existsIllegalStateException
- if initialize()
has not been called before invoking this method.Object getValueFor(String inputName) throws IllegalArgumentException
InputComponent
with the given name.IllegalArgumentException
- if no InputComponent
with the given name existsIllegalStateException
- if initialize()
has not been called before invoking this method.Map<String,InputComponent<?,?>> getInputs()
Map
of InputComponent
instances for this command.IllegalStateException
- if initialize()
has not been called before invoking this method.UICommandMetadata getMetadata()
UICommand.getMetadata(UIContext)
. Does not require initialization.boolean isEnabled()
UICommand.isEnabled(UIContext)
is true
. Does not require
initialization.boolean canExecute()
true
if UICommand.execute(org.jboss.forge.addon.ui.context.UIExecutionContext)
can be
called.IllegalStateException
- if initialize()
has not been called before invoking this method.Copyright © 2014 JBoss by Red Hat. All rights reserved.