com.softwareag.cis.plugin.command.context
Interface CommandContext

All Known Implementing Classes:
AbstractCommandContext, GlobalCommandContext

public interface CommandContext

Context for command execution


Field Summary
static java.lang.String rcs_id
           
 
Method Summary
 void execute(Command command)
          Execute given command in this context
 ApplicationContext getApplicationContext()
          Obtain the ApplicationContext
 Item getItem()
          Get selected item
 java.util.Locale getLocale()
          Get Locale to be used in this context
 void openPageInTarget(java.lang.String url, java.lang.String target)
          Open given external URL in given target frame
 void sendError(java.lang.String text)
          Display an error message
 boolean showImageForCommand()
          Command is executed with a CommandContext.
 void showMessage(java.lang.String title, java.lang.String msg)
          Display message in popup dialog
 void showThrowable(java.lang.String title, java.lang.String msg, java.lang.Throwable t)
          Display any Throwable which occured during processing
 void showThrowable(java.lang.Throwable t)
          Display any Throwable which occured during processing
 

Field Detail

rcs_id

static final java.lang.String rcs_id
See Also:
Constant Field Values
Method Detail

execute

void execute(Command command)
Execute given command in this context

Parameters:
command -

getApplicationContext

ApplicationContext getApplicationContext()
Obtain the ApplicationContext

Returns:
the ApplicationContext (may be null for command line application)

getLocale

java.util.Locale getLocale()
Get Locale to be used in this context

Returns:
the Locale

getItem

Item getItem()
Get selected item

Returns:
the selected item or null, if none selected

openPageInTarget

void openPageInTarget(java.lang.String url,
                      java.lang.String target)
Open given external URL in given target frame

Parameters:
url - the URL to be opend
target - the target frame

sendError

void sendError(java.lang.String text)
Display an error message

Parameters:
text - Text to display

showThrowable

void showThrowable(java.lang.Throwable t)
Display any Throwable which occured during processing

Parameters:
t - the Throwable

showThrowable

void showThrowable(java.lang.String title,
                   java.lang.String msg,
                   java.lang.Throwable t)
Display any Throwable which occured during processing

Parameters:
title -
msg -
t - the Throwable

showMessage

void showMessage(java.lang.String title,
                 java.lang.String msg)
Display message in popup dialog

Parameters:
title -
msg -

showImageForCommand

boolean showImageForCommand()
Command is executed with a CommandContext. Override this method to enable or disable showing of Icons for Commands.