com.ibm.etools.sfm.sfpi
Class SFMessageFactory

java.lang.Object
  extended by com.ibm.etools.sfm.sfpi.SFMessageFactory

public class SFMessageFactory
extends java.lang.Object

SFMessageFactory is a collection of factory methods that allow easy creation of messages and message files in service flow projects.


Constructor Summary
SFMessageFactory()
           
 
Method Summary
static SFMessage createMessage(java.lang.String name)
          Creates a message.
static SFMessageFile createMessageFile(org.eclipse.core.resources.IProject project, java.lang.String name)
          Creates a SFMessageFile object.
static SFMessageFile createMessageFile(org.eclipse.core.resources.IProject project, java.lang.String name, org.eclipse.xsd.XSDSchema schema)
          Creates a SFMessageFile object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFMessageFactory

public SFMessageFactory()
Method Detail

createMessageFile

public static SFMessageFile createMessageFile(org.eclipse.core.resources.IProject project,
                                              java.lang.String name)
                                       throws SFException
Creates a SFMessageFile object.

Parameters:
project - The project where the message file will be saved. This must be a subproject of a service flow project where messages can be saved.
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.
Returns:
A SFMessageFile object.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The project or name is null. ERROR: The message file was not created 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 message file was not created successfully.

createMessageFile

public static SFMessageFile createMessageFile(org.eclipse.core.resources.IProject project,
                                              java.lang.String name,
                                              org.eclipse.xsd.XSDSchema schema)
                                       throws SFException
Creates a SFMessageFile object.

Parameters:
project - The project where the message file will be saved. This must be a subproject of a service flow project where messages can be saved.
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.
schema - A schema which defines the messages in the message file.
Returns:
A SFMessageFile object.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The project, name, or schema is null. ERROR: The message file was not created 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 message file was not created successfully.

createMessage

public static SFMessage createMessage(java.lang.String name)
                               throws SFException
Creates a message.

Parameters:
name - The name of the message.
Returns:
A message.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The name is null. ERROR: The message was not created successfully.
WZEF1100E_NAMENOTVALID The message or element name is not valid. A message or element name must not contain spaces or the colon (':') character. A message or element name must begin with either a letter or an underscore ('_') character. ERROR: The message was not created successfully.
WZEF1101W_COBOLNAMENOTVALID The message name is not a valid COBOL variable name. Either the name is illegal in COBOL or it matches a COBOL reserved word. ERROR: The message was not created successfully.