com.ibm.commerce.messaging.composer
Class Composer

java.lang.Object
  |
  +--com.ibm.commerce.messaging.composer.Composer

public class Composer
extends java.lang.Object

Creates the content of a message by calling a view based on the given device formats.


Field Summary
static java.lang.String EC_DEVICEFORMAT
           
static java.lang.String EC_JSPERROR
           
static java.lang.String LanguageID
           
 
Constructor Summary
Composer()
          Constructs the Composer object.
Composer(java.lang.String view, CommandContext comContext, TypedProperty inparms, java.util.Vector formats)
          Constructs the Composer Object.
Composer(java.lang.String view, CommandContext comContext, TypedProperty inparms, java.util.Vector formats, java.lang.Integer languageId)
          Constructs the Composer Object.
Composer(java.lang.String view, CommandContext comContext, TypedProperty inparms, java.util.Vector formats, java.lang.String languageId)
          Constructs the Composer Object.
 
Method Summary
 ComposerResult compose()
          Call the MessagingViewCommand to return a TypedProperty object that will contain a result key that will have a value which is the output when the view command is executed.
 CommandContext getCommandContext()
          Gets the commandContext property (com.ibm.commerce.command.CommandContext) value.
 java.util.Vector getDeviceFormats()
          Gets the deviceFormat property (java.util.Vector) value.
 TypedProperty getInputParms()
          Gets the inputParms property (com.ibm.commerce.datatype.TypedProperty) value.
 java.lang.Integer getLanguageId()
          Gets the languageId property (java.lang.Integer) value.
 TypedProperty getOutputParms()
          Gets the outputParms property (com.ibm.commerce.datatype.TypedProperty) value.
 java.lang.String getURLResult(java.lang.Integer format)
          Call the view and returns the generated output.
 java.lang.String getViewName()
          Gets the viewName property (java.lang.String) value.
 void setCommandContext(CommandContext commandContext)
          Sets the commandContext property (com.ibm.commerce.command.CommandContext) value.
 void setDeviceFormats(java.util.Vector deviceFormats)
          Sets the deviceFormat property (java.util.Vector) value.
 void setInputParms(TypedProperty inputParms)
          Sets the inputParms property (com.ibm.commerce.datatype.TypedProperty) value.
 void setLanguageId(java.lang.Integer languageId)
          Sets the languageId property (java.lang.Integer) value.
 void setOutputParms(TypedProperty outputParms)
          Sets the outputParms property (com.ibm.commerce.datatype.TypedProperty) value.
 void setViewName(java.lang.String viewName)
          Sets the viewName property (java.lang.String) value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EC_DEVICEFORMAT

public static final java.lang.String EC_DEVICEFORMAT

EC_JSPERROR

public static final java.lang.String EC_JSPERROR

LanguageID

public static final java.lang.String LanguageID
Constructor Detail

Composer

public Composer()
Constructs the Composer object.

Composer

public Composer(java.lang.String view,
                CommandContext comContext,
                TypedProperty inparms,
                java.util.Vector formats)
Constructs the Composer Object. Initializes the the view, command context, request properties and the device format used to call the JSP.
Parameters:
view - java.lang.String The view to call.
comContext - com.ibm.commerce.command.CommandContext The command context when the view is called.
inparms - com.ibm.commerce.datatype.TypedProperty The request properties of the view.
transports - java.util.Vector All the device formats used to call the view.

Composer

public Composer(java.lang.String view,
                CommandContext comContext,
                TypedProperty inparms,
                java.util.Vector formats,
                java.lang.Integer languageId)
Constructs the Composer Object. Initializes the the view, command context, request properties and the device format used to call the JSP.
Parameters:
view - java.lang.String The view to call.
comContext - com.ibm.commerce.command.CommandContext The command context when the view is called.
inparms - com.ibm.commerce.datatype.TypedProperty The request properties of the view.
transports - java.util.Vector All the device formats used to call the view.
languageId - java.lang.Integer The language Id when calling the view.

Composer

public Composer(java.lang.String view,
                CommandContext comContext,
                TypedProperty inparms,
                java.util.Vector formats,
                java.lang.String languageId)
Constructs the Composer Object. Initializes the the view, command context, request properties and the device format used to call the JSP.
Parameters:
view - java.lang.String The view to call.
comContext - com.ibm.commerce.command.CommandContext The command context when the view is called.
inparms - com.ibm.commerce.datatype.TypedProperty The request properties of the view.
transports - java.util.Vector All the device formats used to call the view.
languageId - java.lang.String The language Id when calling the view.
Method Detail

compose

public ComposerResult compose()
                       throws ECException
Call the MessagingViewCommand to return a TypedProperty object that will contain a result key that will have a value which is the output when the view command is executed.
Returns:
ComposerResult The result from calling the views for all device format id specified in the device format vector.

getCommandContext

public CommandContext getCommandContext()
Gets the commandContext property (com.ibm.commerce.command.CommandContext) value.
Returns:
The commandContext property value.
See Also:
setCommandContext(com.ibm.commerce.command.CommandContext)

getDeviceFormats

public java.util.Vector getDeviceFormats()
Gets the deviceFormat property (java.util.Vector) value.
Returns:
The deviceFormat property value.
See Also:
#setDeviceFormat

getInputParms

public TypedProperty getInputParms()
Gets the inputParms property (com.ibm.commerce.datatype.TypedProperty) value.
Returns:
The inputParms property value.
See Also:
setInputParms(com.ibm.commerce.datatype.TypedProperty)

getLanguageId

public java.lang.Integer getLanguageId()
Gets the languageId property (java.lang.Integer) value.
Returns:
The languageId property value.
See Also:
setLanguageId(java.lang.Integer)

getOutputParms

public TypedProperty getOutputParms()
Gets the outputParms property (com.ibm.commerce.datatype.TypedProperty) value.
Returns:
The outputParms property value.
See Also:
setOutputParms(com.ibm.commerce.datatype.TypedProperty)

getURLResult

public java.lang.String getURLResult(java.lang.Integer format)
                              throws ECException
Call the view and returns the generated output.
Parameters:
format - java.lang.String The device format of the view.
Returns:
java.lang.String The output from calling the view.
Throws:
ECException -  

getViewName

public java.lang.String getViewName()
Gets the viewName property (java.lang.String) value.
Returns:
The viewName property value.
See Also:
setViewName(java.lang.String)

setCommandContext

public void setCommandContext(CommandContext commandContext)
Sets the commandContext property (com.ibm.commerce.command.CommandContext) value.
Parameters:
commandContext - The new value for the property.
See Also:
getCommandContext()

setDeviceFormats

public void setDeviceFormats(java.util.Vector deviceFormats)
Sets the deviceFormat property (java.util.Vector) value.
Parameters:
deviceFormat - The new value for the property.
See Also:
#getDeviceFormat

setInputParms

public void setInputParms(TypedProperty inputParms)
Sets the inputParms property (com.ibm.commerce.datatype.TypedProperty) value.
Parameters:
inputParms - The new value for the property.
See Also:
getInputParms()

setLanguageId

public void setLanguageId(java.lang.Integer languageId)
Sets the languageId property (java.lang.Integer) value.
Parameters:
languageId - The new value for the property.
See Also:
getLanguageId()

setOutputParms

public void setOutputParms(TypedProperty outputParms)
Sets the outputParms property (com.ibm.commerce.datatype.TypedProperty) value.
Parameters:
outputParms - The new value for the property.
See Also:
getOutputParms()

setViewName

public void setViewName(java.lang.String viewName)
Sets the viewName property (java.lang.String) value.
Parameters:
viewName - The new value for the property.
See Also:
getViewName()