com.ibm.commerce.tools.campaigns
Class CampaignCreateCmdImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.tools.campaigns.CampaignCreateCmdImpl
All Implemented Interfaces:
CampaignCreateCmd, ECCommand, TaskCommand

public class CampaignCreateCmdImpl
extends TaskCommandImpl
implements CampaignCreateCmd

The CampaignCreateCmdImpl class implements the CampaignCreateCmd interface to provide the task command that creates a campaign. Different implementations of this interface can be provided for different stores.


Field Summary
protected  java.lang.String _campaignDescription
          Campaign description.
protected  java.lang.String _campaignField1
          Campaign custom field.
protected  java.lang.Integer _campaignId
          Campaign ID.
protected  java.lang.String _campaignName
          Campaign name.
protected  java.lang.String _campaignObjective
          Campaign business objective.
protected  java.lang.String _campaignOwner
          Campaign sponsor.
protected  java.lang.String _campaignStatus
          Campaign status.
protected  java.lang.Integer _campaignType
          Campaign type.
static java.lang.String COPYRIGHT
          Copyright.
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.tools.campaigns.CampaignCreateCmd
defaultCommandClassName, Name
 
Constructor Summary
CampaignCreateCmdImpl()
           
 
Method Summary
 java.lang.Integer getCampaignId()
          Returns the campaign ID of the newly created campaign.
 boolean isReadyToCallExecute()
          Checks to see if the command is ready to call.
 void performExecute()
          Performs the execution of the command.
 void setCampaignDescription(java.lang.String description)
          Sets the campaign description.
 void setCampaignField1(java.lang.String field1)
          Sets the campaign custom field.
 void setCampaignName(java.lang.String name)
          Sets the campaign name.
 void setCampaignObjective(java.lang.String objective)
          Sets the campaign business objective.
 void setCampaignOwner(java.lang.String owner)
          Sets the campaign sponsor.
 void setCampaignStatus(java.lang.String status)
          Sets the campaign status.
 void setCampaignType(java.lang.Integer type)
          Sets the campaign type.
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 

Field Detail

_campaignDescription

protected java.lang.String _campaignDescription
Campaign description.

_campaignField1

protected java.lang.String _campaignField1
Campaign custom field.

_campaignId

protected java.lang.Integer _campaignId
Campaign ID.

_campaignName

protected java.lang.String _campaignName
Campaign name.

_campaignObjective

protected java.lang.String _campaignObjective
Campaign business objective.

_campaignOwner

protected java.lang.String _campaignOwner
Campaign sponsor.

_campaignStatus

protected java.lang.String _campaignStatus
Campaign status.

_campaignType

protected java.lang.Integer _campaignType
Campaign type.

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright.
Constructor Detail

CampaignCreateCmdImpl

public CampaignCreateCmdImpl()
Method Detail

getCampaignId

public java.lang.Integer getCampaignId()
Returns the campaign ID of the newly created campaign. You must execute this task command before accessing this value.
Specified by:
getCampaignId in interface CampaignCreateCmd
Returns:
An integer of the campaign ID.

isReadyToCallExecute

public boolean isReadyToCallExecute()
Checks to see if the command is ready to call. This method will return false if the campaign name is null.
Overrides:
isReadyToCallExecute in class AbstractECCommand
Returns:
true if the command is ready to go.

performExecute

public void performExecute()
                    throws ECException
Performs the execution of the command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

setCampaignDescription

public void setCampaignDescription(java.lang.String description)
Sets the campaign description.
Specified by:
setCampaignDescription in interface CampaignCreateCmd
Parameters:
description - The description of the campaign.

setCampaignField1

public void setCampaignField1(java.lang.String field1)
Sets the campaign custom field.
Specified by:
setCampaignField1 in interface CampaignCreateCmd
Parameters:
field1 - The custom field of the campaign.

setCampaignName

public void setCampaignName(java.lang.String name)
Sets the campaign name.
Specified by:
setCampaignName in interface CampaignCreateCmd
Parameters:
name - The name of the campaign.

setCampaignObjective

public void setCampaignObjective(java.lang.String objective)
Sets the campaign business objective.
Specified by:
setCampaignObjective in interface CampaignCreateCmd
Parameters:
objective - The business objective of the campaign.

setCampaignOwner

public void setCampaignOwner(java.lang.String owner)
Sets the campaign sponsor.
Specified by:
setCampaignOwner in interface CampaignCreateCmd
Parameters:
owner - The sponsor of the campaign.

setCampaignStatus

public void setCampaignStatus(java.lang.String status)
Sets the campaign status.
Specified by:
setCampaignStatus in interface CampaignCreateCmd
Parameters:
status - The status of the campaign.

setCampaignType

public void setCampaignType(java.lang.Integer type)
Sets the campaign type.
Specified by:
setCampaignType in interface CampaignCreateCmd
Parameters:
type - The type of the campaign.