public abstract class AbstractCommandContext extends java.lang.Object implements CommandContext
rcs_id
Constructor and Description |
---|
AbstractCommandContext(com.softwareag.cis.workplace.MFWorkplaceAdapter mfworkplaceadapter) |
Modifier and Type | Method and Description |
---|---|
void |
execute(Command command)
Execute given command in this context
|
ApplicationContext |
getApplicationContext()
Obtain the ApplicationContext
|
com.softwareag.cis.server.Adapter |
getDisplayAdapter()
Get a living adapter which is used by Application Designer for display processing.
|
Item |
getItem()
Get selected item
|
java.util.Locale |
getLocale()
Get Locale to be used in this context
|
com.softwareag.cis.workplace.MFWorkplaceAdapter |
getWorkplaceAdapter()
Obtain the workplace adapter
|
static com.softwareag.cis.workplace.MFWorkplaceAdapter |
getWorkplaceAdapter(com.softwareag.cis.server.Adapter adapter)
Returns the MFWorkplaceAdapter obtained from the session 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
|
public AbstractCommandContext(com.softwareag.cis.workplace.MFWorkplaceAdapter mfworkplaceadapter)
public static com.softwareag.cis.workplace.MFWorkplaceAdapter getWorkplaceAdapter(com.softwareag.cis.server.Adapter adapter)
adapter
- from which the session context is obtainedpublic ApplicationContext getApplicationContext()
getApplicationContext
in interface CommandContext
public com.softwareag.cis.workplace.MFWorkplaceAdapter getWorkplaceAdapter()
public java.util.Locale getLocale()
getLocale
in interface CommandContext
public Item getItem()
getItem
in interface CommandContext
public com.softwareag.cis.server.Adapter getDisplayAdapter()
public void execute(Command command)
execute
in interface CommandContext
command
- public void openPageInTarget(java.lang.String url, java.lang.String target)
openPageInTarget
in interface CommandContext
url
- the URL to be opendtarget
- the target framepublic void sendError(java.lang.String text)
sendError
in interface CommandContext
text
- Text to displaypublic void showThrowable(java.lang.Throwable t)
showThrowable
in interface CommandContext
t
- the Throwablepublic void showThrowable(java.lang.String title, java.lang.String msg, java.lang.Throwable t)
showThrowable
in interface CommandContext
title
- msg
- t
- the Throwablepublic void showMessage(java.lang.String title, java.lang.String msg)
showMessage
in interface CommandContext
title
- msg
- public boolean showImageForCommand()
CommandContext
showImageForCommand
in interface CommandContext