com.ibm.commerce.tools.campaigns
Class CampaignCollateralCreateCmdImpl

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

public class CampaignCollateralCreateCmdImpl
extends TaskCommandImpl
implements CampaignCollateralCreateCmd

The CampaignCollateralCreateCmdImpl class implements the CampaignCollateralCreateCmd interface to provide the task command that creates an ad copy. Different implementations of this interface can be provided for different stores.


Field Summary
protected  java.lang.String _collateralDescriptionField1
          Collateral description field 1.
protected  java.lang.String _collateralDescriptionField2
          Collateral description field 2.
protected  java.lang.String _collateralField1
          Collateral custom field 1.
protected  java.lang.String _collateralField2
          Collateral custom field 2.
protected  java.lang.Integer _collateralId
          Collateral ID.
protected  java.lang.String _collateralLocation
          Collateral image file location.
protected  java.lang.String _collateralMarketingText
          Collateral marketing text.
protected  java.lang.String _collateralName
          Collateral name.
protected  java.lang.Integer _collateralType
          Collateral image type.
protected  java.lang.String _collateralUrl
          Collateral URL.
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.CampaignCollateralCreateCmd
defaultCommandClassName, Name
 
Constructor Summary
CampaignCollateralCreateCmdImpl()
           
 
Method Summary
 java.lang.Integer getCollateralId()
          Returns the collateral ID of the newly created ad copy.
 boolean isReadyToCallExecute()
          Checks to see if the command is ready to call.
 void performExecute()
          Performs the execution of the command.
 void setCollateralDescriptionField1(java.lang.String field1)
          Sets the collateral description field 1.
 void setCollateralDescriptionField2(java.lang.String field2)
          Sets the collateral description field 2.
 void setCollateralField1(java.lang.String field1)
          Sets the collateral custom field 1.
 void setCollateralField2(java.lang.String field2)
          Sets the collateral custom field 2.
 void setCollateralLocation(java.lang.String location)
          Sets the collateral image file location.
 void setCollateralMarketingText(java.lang.String text)
          Sets the collateral marketing text.
 void setCollateralName(java.lang.String name)
          Sets the name of the collateral.
 void setCollateralType(java.lang.Integer type)
          Sets the image type of the collateral.
 void setCollateralUrl(java.lang.String url)
          Sets the URL of the collateral.
 
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

_collateralDescriptionField1

protected java.lang.String _collateralDescriptionField1
Collateral description field 1.

_collateralDescriptionField2

protected java.lang.String _collateralDescriptionField2
Collateral description field 2.

_collateralField1

protected java.lang.String _collateralField1
Collateral custom field 1.

_collateralField2

protected java.lang.String _collateralField2
Collateral custom field 2.

_collateralId

protected java.lang.Integer _collateralId
Collateral ID.

_collateralLocation

protected java.lang.String _collateralLocation
Collateral image file location.

_collateralMarketingText

protected java.lang.String _collateralMarketingText
Collateral marketing text.

_collateralName

protected java.lang.String _collateralName
Collateral name.

_collateralType

protected java.lang.Integer _collateralType
Collateral image type.

_collateralUrl

protected java.lang.String _collateralUrl
Collateral URL.

COPYRIGHT

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

CampaignCollateralCreateCmdImpl

public CampaignCollateralCreateCmdImpl()
Method Detail

getCollateralId

public java.lang.Integer getCollateralId()
Returns the collateral ID of the newly created ad copy. You must execute this task command before accessing this value.
Specified by:
getCollateralId in interface CampaignCollateralCreateCmd
Returns:
An integer of the collateral ID.

isReadyToCallExecute

public boolean isReadyToCallExecute()
Checks to see if the command is ready to call. This method will return false if the collateral ID 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.

setCollateralDescriptionField1

public void setCollateralDescriptionField1(java.lang.String field1)
Sets the collateral description field 1.
Specified by:
setCollateralDescriptionField1 in interface CampaignCollateralCreateCmd
Parameters:
field1 - The description field 1 of the collateral.

setCollateralDescriptionField2

public void setCollateralDescriptionField2(java.lang.String field2)
Sets the collateral description field 2.
Specified by:
setCollateralDescriptionField2 in interface CampaignCollateralCreateCmd
Parameters:
field2 - The description field 2 of the collateral.

setCollateralField1

public void setCollateralField1(java.lang.String field1)
Sets the collateral custom field 1.
Specified by:
setCollateralField1 in interface CampaignCollateralCreateCmd
Parameters:
field1 - The custom field 1 of the collateral.

setCollateralField2

public void setCollateralField2(java.lang.String field2)
Sets the collateral custom field 2.
Specified by:
setCollateralField2 in interface CampaignCollateralCreateCmd
Parameters:
field2 - The custom field 2 of the collateral.

setCollateralLocation

public void setCollateralLocation(java.lang.String location)
Sets the collateral image file location.
Specified by:
setCollateralLocation in interface CampaignCollateralCreateCmd
Parameters:
location - The image file location of the collateral.

setCollateralMarketingText

public void setCollateralMarketingText(java.lang.String text)
Sets the collateral marketing text.
Specified by:
setCollateralMarketingText in interface CampaignCollateralCreateCmd
Parameters:
text - The marketing text of the collateral.

setCollateralName

public void setCollateralName(java.lang.String name)
Sets the name of the collateral.
Specified by:
setCollateralName in interface CampaignCollateralCreateCmd
Parameters:
name - The name of the collateral.

setCollateralType

public void setCollateralType(java.lang.Integer type)
Sets the image type of the collateral.
Specified by:
setCollateralType in interface CampaignCollateralCreateCmd
Parameters:
type - The image type of the collateral.

setCollateralUrl

public void setCollateralUrl(java.lang.String url)
Sets the URL of the collateral.
Specified by:
setCollateralUrl in interface CampaignCollateralCreateCmd
Parameters:
url - The URL of the collateral.