com.ibm.etools.sfm.sfpi
Interface SFMessageFile


public interface SFMessageFile

The SFMessageFile interface provides methods to allow easy construction of message files. Message files contain messages which can be used as inputs and outputs to operations.


Method Summary
 void addMessage(SFMessage message)
          Adds a message to the message file.
 java.util.List<SFMessage> getMessages()
           
 java.lang.String getName()
           
 org.eclipse.xsd.XSDSchema getSchema()
           
 void save()
          Saves the message file.
 void setName(java.lang.String name)
          Sets the name of the message file.
 void setSchema(org.eclipse.xsd.XSDSchema schema)
          Sets the XML schema model for this message file.
 

Method Detail

getName

java.lang.String getName()
Returns:
The name of the message file.

setName

void setName(java.lang.String name)
             throws SFException
Sets the name of the message file.

Parameters:
name - The name of the file. The name must not include the path. If the name does not include the ".mxsd" extension, the ".mxsd" extension will be added.
Throws:
SFException - In case the supplied name is not valid, one of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The name is null. ERROR: The name was not set successfully.
WZEF1300E_FILENAMENOTVALID The file name is not a valid file name or the file name contains illegal message file characters such as a space or '#' character. ERROR: The name was not set successfully.

getMessages

java.util.List<SFMessage> getMessages()
                                      throws SFException
Returns:
The list of messages contained in the message file.
Throws:
SFException

addMessage

void addMessage(SFMessage message)
                throws SFException
Adds a message to the message file.

Parameters:
message - A message.
Throws:
SFException - In case the supplied message is not valid, one of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The message is null. ERROR: The message was not set added successfully.
WZEF1103E_MESSAGENOTNAMED The message is not named. ERROR: The message was not set added successfully.
WZEF1104E_MESSAGENAMECONFLICT The message file contains at least two messages with the same name. ERROR: The message was not set added successfully.

getSchema

org.eclipse.xsd.XSDSchema getSchema()
Returns:
The XML Schema that models the messages in this message file.

setSchema

void setSchema(org.eclipse.xsd.XSDSchema schema)
               throws SFException
Sets the XML schema model for this message file. This is a useful method for building up complex message models, using the Eclipse XSD API.

Parameters:
schema - An XML schema.
Throws:
SFException - In case the supplied schema is not valid, one of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The schema is null. ERROR: The schema was not set successfully.

save

void save()
          throws SFException
Saves the message file.

Throws:
SFException - In case the supplied schema is not valid, one of the following exceptions may result:
Error Description Severity
WZEF1301E_FILESAVEFAILED The file save failed ERROR: The file was not saved successfully.