com.ibm.etools.sfm.sfpi
Class SFOperationFactory

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

public class SFOperationFactory
extends java.lang.Object

SFOperationFactory is a collection of factory methods that allow easy creation of operations and operations files in service flow projects.


Constructor Summary
SFOperationFactory()
           
 
Method Summary
static SFChannelInput createChannelInput(java.util.List<SFMessage> messages)
          Creates a channel input to an operation.
static SFChannelOperation createChannelOperation(java.lang.String name)
          Creates a channel operation without the input or output set yet.
static SFChannelOutput createChannelOutput(java.util.List<SFMessage> messages)
          Creates a channel output to an operation.
static SFFault createFault(SFMessage message)
          Creates a fault of an operation.
static SFGenerationProperties createGenerationProperties(SFOperation operation, java.lang.String runtime, java.lang.String invokeType)
          Creates generation properties for the given operation.
static SFInput createInput(SFMessage message)
          Creates an input to an operation.
static SFOperation createOperation(java.lang.String name)
          Creates an operation without the input or output set yet.
static SFOperation createOperation(java.lang.String name, SFInput input, SFOutput output, java.util.List<SFFault> faults)
          Creates an operation.
static SFOperationsFile createOperationsFile(org.eclipse.core.resources.IProject project, java.lang.String name)
          Creates a SFOperationsFile object.
static SFOutput createOutput(SFMessage message)
          Creates an output to an operation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFOperationFactory

public SFOperationFactory()
Method Detail

createOperationsFile

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

Parameters:
project - The project where the operations file will be saved. This must be a subproject of a service flow project where operations can be saved.
name - The name of the file. The name must not include the path. If the name does not include the ".wsdl" extension, the ".wsdl" extension will be added.
Returns:
A SFOperationsFile 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 operations file was not created successfully.
WZEF1300E_FILENAMENOTVALID The file name is not a valid file name. ERROR: The operations file was not created successfully.

createOperation

public static SFOperation createOperation(java.lang.String name)
                                   throws SFException
Creates an operation without the input or output set yet.

Parameters:
name - The name of the operation.
Returns:
An operation.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The name is null. ERROR: The operation was not created successfully.
WZEF1200E_NAMENOTVALID The operation name is not a valid NCName. ERROR: The operation was not created successfully.

createChannelOperation

public static SFChannelOperation createChannelOperation(java.lang.String name)
                                                 throws SFException
Creates a channel operation without the input or output set yet.

Parameters:
name - The name of the operation.
Returns:
An operation.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The name is null. ERROR: The operation was not created successfully.
WZEF1200E_NAMENOTVALID The operation name is not a valid NCName. ERROR: The operation was not created successfully.

createOperation

public static SFOperation createOperation(java.lang.String name,
                                          SFInput input,
                                          SFOutput output,
                                          java.util.List<SFFault> faults)
                                   throws SFException
Creates an operation. If the input is a SFChannelInput and the output is a SFChannelOutput, the returned operation will be a SFChannelOperation.

Parameters:
name - The name of the operation.
input - The input.
output - The output.
faults - The faults.
Returns:
An operation.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The name, input, or output is null. ERROR: The operation was not created successfully.
WZEF1200E_NAMENOTVALID The operation name is not a valid NCName. ERROR: The operation was not created successfully.
WZEF1201E_CHANNELTYPEMISMATCH An attempt to add a non-channel input or output to a channel operation or an attempt to add a channel input or output to a non-channel operation was detected. ERROR: The operation was not created successfully.

createInput

public static SFInput createInput(SFMessage message)
                           throws SFException
Creates an input to an operation.

Parameters:
message - The input message.
Returns:
An input to an operation.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The message is null. ERROR: The input was not created successfully.

createOutput

public static SFOutput createOutput(SFMessage message)
                             throws SFException
Creates an output to an operation.

Parameters:
message - The output message.
Returns:
An output to an operation.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The message is null. ERROR: The output was not created successfully.

createChannelInput

public static SFChannelInput createChannelInput(java.util.List<SFMessage> messages)
                                         throws SFException
Creates a channel input to an operation.

Parameters:
messages - A list of input messages.
Returns:
A channel input to an operation.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The messages is null. ERROR: The channel input was not created successfully.

createChannelOutput

public static SFChannelOutput createChannelOutput(java.util.List<SFMessage> messages)
                                           throws SFException
Creates a channel output to an operation.

Parameters:
messages - A list of output messages.
Returns:
A channel output to an operation.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The messages is null. ERROR: The channel output was not created successfully.

createFault

public static SFFault createFault(SFMessage message)
                           throws SFException
Creates a fault of an operation.

Parameters:
message - The fault message.
Returns:
A fault of an operation.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The message is null. ERROR: The fault was not created successfully.

createGenerationProperties

public static SFGenerationProperties createGenerationProperties(SFOperation operation,
                                                                java.lang.String runtime,
                                                                java.lang.String invokeType)
                                                         throws SFException
Creates generation properties for the given operation.

Parameters:
operation - The operation.
runtime - The target runtime.
invokeType - The type of operation.
Returns:
Generation properties for the given operation.
Throws:
SFException - One of the following exceptions may result:
Error Description Severity
WZEF1001E_ARGSERROR Illegal arguments. The operation, runtime, or invokeType is null. ERROR: The generation properties were not created successfully.
WZEF1400E_INVOKETYPENOTVALID The invoke type is not valid. The invoke type must be one of InvokeType_COMMAREA, InvokeType_Channel, and InvokeType_MQSeries. ERROR: The generation properties were not created successfully.
WZEF1401E_RUNTIMENOTVALID The runtime is not valid. The runtime must be one of Runtime_CSFR31 and Runtime_CSFR32. ERROR: The generation properties were not created successfully.
WZEF1402E_RUNTIMENOTSUPPORTED The given runtime is not supported for the invoke type. ERROR: The generation properties were not created successfully.