com.ibm.as400.ui.util
Class MessagesBean

java.lang.Object
  extended by com.ibm.as400.ui.util.MessagesBean
All Implemented Interfaces:
DataBean

public class MessagesBean
extends Object
implements DataBean


Field Summary
Modifier and Type Field and Description
static int DETAIL_AS400MESSAGE
           
static int DETAIL_HTML
           
static int DETAIL_NONE
           
static int DETAIL_TEXT
           
static int DETAIL_URL
           
 
Constructor Summary
Constructor and Description
MessagesBean()
           
 
Method Summary
Modifier and Type Method and Description
 void addMessage(AS400Message AS400msg)
           
 void addMessage(String strMessage, String strID, String strTextDetails)
           
 void addMessage(String strMessage, String strID, String strHTMLDetails, String strAnchor)
           
 void addMessage(String strMessage, String strID, URL urlDetails)
           
 void addMessages(AS400Message[] AS400msgList)
           
 Capabilities getCapabilities()
          Returns a Capabilities object which identifies the attributes that aren't supported by this DataBean.
 String getHelpSet()
          Gets current help set for all HTML messages.
 Job getJob()
          Gets the job used to display the job log.
 String getMessage()
           
 int getMessageCount()
           
 ItemDescriptor[] getMessagesList()
           
 String[] getMessagesSelection()
           
 String getSelectedMessage()
           
 String getSelectedMessageAnchor()
           
 String getSelectedMessageDetail()
           
 int getSelectedMessageDetailType()
           
 String getSelectedMessageID()
           
 URL getSelectedMessageURL()
           
 int getSelection()
           
 AS400 getSystem()
           
 boolean hasAnyMessageDetail()
           
 boolean isSelectedMessageAS400()
           
 void load()
          Initializes this object.
 void save()
          Saves all changes that have been applied to this object via its accessor methods.
 boolean selectedMessageHasDetail()
           
 void setHelpSet(String helpSet)
          Sets the help set used for any messages shown as HTML help.
 void setJob(Job job)
          Sets the job used to display the job log.
 void setMessage(String message)
           
 void setMessagesList(ItemDescriptor[] items)
           
 void setMessagesSelection(String[] selection)
           
 void setSelectedMessage(String text)
           
 void setSelectedMessageID(String text)
           
 void setSelection(int iSelection)
           
 void setSystem(AS400 as400)
           
 void verifyChanges()
          Validates any changes that have been applied to this object via its accessor methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DETAIL_NONE

public static final int DETAIL_NONE
See Also:
Constant Field Values

DETAIL_TEXT

public static final int DETAIL_TEXT
See Also:
Constant Field Values

DETAIL_URL

public static final int DETAIL_URL
See Also:
Constant Field Values

DETAIL_HTML

public static final int DETAIL_HTML
See Also:
Constant Field Values

DETAIL_AS400MESSAGE

public static final int DETAIL_AS400MESSAGE
See Also:
Constant Field Values
Constructor Detail

MessagesBean

public MessagesBean()
Method Detail

load

public void load()
Description copied from interface: DataBean
Initializes this object.

This method should be called prior to handing the DataBean off to the UI Framework. On return from this method the bean should be in a state where it is ready to return data on any of its accessor methods.

Specified by:
load in interface DataBean

verifyChanges

public void verifyChanges()
Description copied from interface: DataBean
Validates any changes that have been applied to this object via its accessor methods.

This method is called just prior to save to give the receiver an opportunity to verify that its data is consistent with any changes made to other DataBeans associated with a given panel. If an inconsistency is discovered the DataBean should throw an exception. This will prevent the changes from being committed.

Specified by:
verifyChanges in interface DataBean

save

public void save()
Description copied from interface: DataBean
Saves all changes that have been applied to this object via its accessor methods. Called when the user has clicked the OK button on a panel.

Specified by:
save in interface DataBean

getCapabilities

public Capabilities getCapabilities()
Description copied from interface: DataBean
Returns a Capabilities object which identifies the attributes that aren't supported by this DataBean. There are many reasons why a DataBean might not support a given attribute. For example:

The Capabilities object may provide a list of instructions, or HandlerTasks, which the UI framework is to perform. Typically these involve disabling or removing certain UI components from a panel.

Specified by:
getCapabilities in interface DataBean
Returns:
a Capabilities object which reflects this object's capabilities
See Also:
Capabilities

setSelection

public void setSelection(int iSelection)

getSelection

public int getSelection()

setSystem

public void setSystem(AS400 as400)

getSystem

public AS400 getSystem()

getMessagesList

public ItemDescriptor[] getMessagesList()

setMessagesList

public void setMessagesList(ItemDescriptor[] items)

getMessagesSelection

public String[] getMessagesSelection()

setMessagesSelection

public void setMessagesSelection(String[] selection)

getSelectedMessage

public String getSelectedMessage()

setSelectedMessage

public void setSelectedMessage(String text)

getSelectedMessageID

public String getSelectedMessageID()

isSelectedMessageAS400

public boolean isSelectedMessageAS400()

selectedMessageHasDetail

public boolean selectedMessageHasDetail()

setSelectedMessageID

public void setSelectedMessageID(String text)

getSelectedMessageDetail

public String getSelectedMessageDetail()

getSelectedMessageURL

public URL getSelectedMessageURL()

getSelectedMessageAnchor

public String getSelectedMessageAnchor()

getSelectedMessageDetailType

public int getSelectedMessageDetailType()

getMessageCount

public int getMessageCount()

getMessage

public String getMessage()

setMessage

public void setMessage(String message)

setJob

public void setJob(Job job)
Sets the job used to display the job log. If no job is specified, the job button will not appear.

Parameters:
job - A com.ibm.as400.access.Job object
Since:
v5r1

getJob

public Job getJob()
Gets the job used to display the job log.

Returns:
a com.ibm.as400.access.Job object, null if none is set
Since:
v5r1

setHelpSet

public void setHelpSet(String helpSet)
Sets the help set used for any messages shown as HTML help. All HTML help messages use the same help set. If no help set is specified, HTML will be displayed without a help set.

Parameters:
helpSet - helpset contents in a string
Since:
v5r1

getHelpSet

public String getHelpSet()
Gets current help set for all HTML messages.

Returns:
a string with the help set contents
Since:
v5r1

addMessage

public void addMessage(String strMessage,
                       String strID,
                       String strHTMLDetails,
                       String strAnchor)

addMessage

public void addMessage(String strMessage,
                       String strID,
                       URL urlDetails)

addMessage

public void addMessage(String strMessage,
                       String strID,
                       String strTextDetails)

addMessage

public void addMessage(AS400Message AS400msg)

addMessages

public void addMessages(AS400Message[] AS400msgList)

hasAnyMessageDetail

public boolean hasAnyMessageDetail()