com.sysord.mad.configuration
Interface CommandDefinition


public interface CommandDefinition

Description of a command defined in a MAD configuration.

Author:
philippe.palau@sysord.com http://www.sysord.com
See Also:
WidgetConfiguration, QueryDefinition, UICommandDefinition

Nested Class Summary
static class CommandDefinition.COMMAND_CATEGORY
          Categories of CommandDefinitions that can be used in a MAD configuration.
 
Method Summary
 CommandDefinition.COMMAND_CATEGORY getCommandCategory()
          Returns the command's category.
 java.lang.String getCommandId()
          Returns the ID of the command.
 java.lang.String getCommandLabel()
          Returns the command's label.
 com.sysord.eclipse.tools.swt.ImageResource getIconDescriptor()
          Returns the image resource of the icon used by the command, or null if the command doesn't use any icon.
 java.util.List<UICommandDefinition> getOnErrorPostActionCommands()
          Returns the list of UI commands to execute after this command if it fails.
 java.util.List<UICommandDefinition> getOnSuccessPostActionCommands()
          Returns the list of UI commands to execute after this command if it succeeds.
 QueryDefinition<?> getQueryAction()
          Returns the query launched by the command.
 boolean useIcon()
          Indicates if the command uses an icon image.
 

Method Detail

getCommandId

java.lang.String getCommandId()
Returns the ID of the command.

Returns:
the ID of the command.

getCommandCategory

CommandDefinition.COMMAND_CATEGORY getCommandCategory()
Returns the command's category.

Returns:
the command's category.

getCommandLabel

java.lang.String getCommandLabel()
Returns the command's label.

Returns:
the command's label.

getQueryAction

QueryDefinition<?> getQueryAction()
Returns the query launched by the command.

Returns:
the query launched by the command.

useIcon

boolean useIcon()
Indicates if the command uses an icon image.

Returns:
true if the command uses an icon image;
false otherwise.
See Also:
getIconDescriptor()

getIconDescriptor

com.sysord.eclipse.tools.swt.ImageResource getIconDescriptor()
Returns the image resource of the icon used by the command, or null if the command doesn't use any icon.

Returns:
the image resource or null.
See Also:
useIcon()

getOnSuccessPostActionCommands

java.util.List<UICommandDefinition> getOnSuccessPostActionCommands()
Returns the list of UI commands to execute after this command if it succeeds.

Returns:
the list of UI commands to execute.

getOnErrorPostActionCommands

java.util.List<UICommandDefinition> getOnErrorPostActionCommands()
Returns the list of UI commands to execute after this command if it fails.

Returns:
the list of UI commands to execute.