com.ibm.commerce.interestitems.commands
Class InterestItemListCopyCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.interestitems.commands.InterestItemListCopyCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, InterestItemListCopyCmd, Protectable

public class InterestItemListCopyCmdImpl
extends ControllerCommandImpl
implements InterestItemListCopyCmd

The InterestItemListCopy command creates or updates an interest item list by copying from existing interest item lists.


Field Summary
static java.lang.String COPYRIGHT
          The internal copyright field.
 
Fields inherited from class com.ibm.commerce.command.ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.interestitems.commands.InterestItemListCopyCmd
defaultCommandClassName, NAME
 
Constructor Summary
InterestItemListCopyCmdImpl()
          No value constructor.
 
Method Summary
 void checkIsAllowed(AccessVector resource, java.lang.String action)
          Check to see if user can perform action on resource.
 java.lang.Long[] getResourceOwners()
          Returns all the organization unit that owns the resources accessed by this command.It will return null if no resource is being accessed by this command.
 boolean isReadyToCallExecute()
          isReadyToCallExecute method is called by the Targettable Command frame work before the execution of the command.
 void performExecute()
          Contains the actual business logic of the command It should be implemented by all the command writer.
 void reset()
          This method should be called after a command has been executed to reset its states variables.
 java.util.Hashtable retrieveValidNumericOutListId(java.lang.String[] asaListRn, java.lang.Long aUserNumber)
           
 void setCatEntryId(java.lang.String[] asaCatEntryId)
          Specifies either "*" or zero or more reference numbers of products or items (from the CATENTRY_ID column in the IITEM table, ) to delete from the interest list(s) specified by ListId.
 void setDisplaySeq(java.lang.Double adDisplaySeq)
          Specifies the display sequence for the interest item lists to which interest items are copied.
 void setInListId(java.lang.String[] asaInListId)
          Specifies zero or more interest item lists to be copied from.
 void setInListIdName(java.lang.String[] asaListIdName)
          Specifies the names of name-value pairs to be added to the redirection URL.
 void setInListMemberId(java.lang.Long anInListMemberId)
          The reference number of the member whose interest lists will be copied.
 void setOutListDesc(java.lang.String astrDesc)
          Specifies a description of the output interest lists.
 void setOutListId(java.lang.String[] asaListId)
          Specifies zero or more interest item lists to be copied to.
 void setOutListIdName(java.lang.String[] asaListIdName)
          Specifies the names of name-value pairs to be added to the redirection URL.
 void setRequestProperties(TypedProperty aRequestProperties)
          The WebController calls this method before invoking the execute method in this command to set the request properties for this command.
 void validateParameters()
          Performs server side parameter checking.
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
The internal copyright field.
Constructor Detail

InterestItemListCopyCmdImpl

public InterestItemListCopyCmdImpl()
No value constructor.
Method Detail

checkIsAllowed

public void checkIsAllowed(AccessVector resource,
                           java.lang.String action)
                    throws ECException
Check to see if user can perform action on resource. This is called by the command to perform resource level access control check in addition to the reources returned by the getResources() method.

Parameters:
resource - AccessVector - the resource to be acted on
action - String - action to be performed on the resource
Throws:
ECException -  

getResourceOwners

public java.lang.Long[] getResourceOwners()
                                   throws ECException
Description copied from interface: AccCommand
Returns all the organization unit that owns the resources accessed by this command.It will return null if no resource is being accessed by this command. This method was used in previous version for command level access control check. It is no longer required. It is kept for backward compatibility. The default implementation returns null.

Specified by:
getResourceOwners in interface AccCommand
Overrides:
getResourceOwners in class ControllerCommandImpl
Following copied from interface: com.ibm.commerce.command.AccCommand
Returns:
Long[] - an array of all organization unit reference numbers a site owner is representated by an organization unit value of -1

isReadyToCallExecute

public boolean isReadyToCallExecute()
Description copied from class: AbstractECTargetableCommand
isReadyToCallExecute method is called by the Targettable Command frame work before the execution of the command. The default implementation is to return true.

Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
Following copied from class: com.ibm.commerce.command.AbstractECTargetableCommand
Returns:
boolean - true if we can execute the command false if we canot execute the command

performExecute

public void performExecute()
                    throws ECException
Description copied from interface: ECCommand
Contains the actual business logic of the command It should be implemented by all the command writer.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

reset

public void reset()
Description copied from class: AbstractECTargetableCommand
This method should be called after a command has been executed to reset its states variables. After the call to reset, we should be able to execute the command again.
Overrides:
reset in class AbstractECTargetableCommand

retrieveValidNumericOutListId

public java.util.Hashtable retrieveValidNumericOutListId(java.lang.String[] asaListRn,
                                                         java.lang.Long aUserNumber)
                                                  throws ECException

setCatEntryId

public void setCatEntryId(java.lang.String[] asaCatEntryId)
Specifies either "*" or zero or more reference numbers of products or items (from the CATENTRY_ID column in the IITEM table, ) to delete from the interest list(s) specified by ListId. If "*" is specified, the command behaves as if all interest items in the given interest list(s) were specified.
Specified by:
setCatEntryId in interface InterestItemListCopyCmd
Parameters:
asaCatEntryId - the array of catalog entry id

setDisplaySeq

public void setDisplaySeq(java.lang.Double adDisplaySeq)
Specifies the display sequence for the interest item lists to which interest items are copied. If this parameter is not specified and a new interest item list is created, its display sequence is set to one more than the maximum display sequence for all the shopper's existing interest item lists, or "1" if there are not yet any interest item lists for this shopper.
Specified by:
setDisplaySeq in interface InterestItemListCopyCmd
Parameters:
adDisplaySeq - the display sequence

setInListId

public void setInListId(java.lang.String[] asaInListId)
Specifies zero or more interest item lists to be copied from. In addition to interest item list reference numbers it can be specified as one of the special abbreviations ".", "*". If "." is specified, the GetCurrentIILists process task is invoked to obtain the shopper's current interest item lists, and the command behaves as if the current interest item lists were specified. If GetCurrentIILists process task determines that there are no current interest item lists, the most recently updated item interest item list is used. If "*" is specified, the command behaves as if all shopper's interest item lists were specified.
Specified by:
setInListId in interface InterestItemListCopyCmd
Parameters:
asaInListId - the input ListId

setInListIdName

public void setInListIdName(java.lang.String[] asaListIdName)
Specifies the names of name-value pairs to be added to the redirection URL. The values of the added name-value pairs are the reference numbers of the interest item lists specified by InListId. This is provided to make it possible to obtain the reference numbers of the interest item lists when InListId is not explicitly specified.
Specified by:
setInListIdName in interface InterestItemListCopyCmd
Parameters:
asaListIdName - the String array of names

setInListMemberId

public void setInListMemberId(java.lang.Long anInListMemberId)
The reference number of the member whose interest lists will be copied. If this parameter is not specified, the default is the current user.
Specified by:
setInListMemberId in interface InterestItemListCopyCmd
Parameters:
anInListMemberId - the inlist member id

setOutListDesc

public void setOutListDesc(java.lang.String astrDesc)
Specifies a description of the output interest lists. If the output interest list exists, and a description is entered, this new description will replace the existing description. If the output interest list needs to be created, this text specifies the description for it. If the output interest list needs to be created and a description is not specified and, only one input interest list is specified, the description defaults to the input interest list's description. Otherwise, it defaults to blank.
Specified by:
setOutListDesc in interface InterestItemListCopyCmd
Parameters:
astrDesc - the description of the output interest lists

setOutListId

public void setOutListId(java.lang.String[] asaListId)
Specifies zero or more interest item lists to be copied to. In addition to interest item list reference numbers it can be specified as one of the special abbreviations ".", "*" and "**". If "." is specified, the GetCurrentIILists process task is invoked to obtain the shopper's current interest item lists, and the command behaves as if the current interest item lists were specified. If GetCurrentIILists process task determines that there are no current interest item lists, the most recently updated item interest item list is used. If "*" is specified, the command behaves as if all shopper's interest item lists were specified. If "**" is specified, a new interest item list is created and items from the input interest lists will be copied to this new interest item list. If the reference numbers of existing interest item lists are specified, then items are copied from the input interest item lists to the output interest item lists. If this parameter is missing, no interest item lists are copied.
Specified by:
setOutListId in interface InterestItemListCopyCmd
Parameters:
asaListId - the String array of OutListId

setOutListIdName

public void setOutListIdName(java.lang.String[] asaListIdName)
Specifies the names of name-value pairs to be added to the redirection URL. The values of the added name-value pairs are the reference numbers of the interest lists specified by OutListId. This is provided to make it possible to obtain the reference numbers of the interest lists when OutListId is not explicitly specified.
Specified by:
setOutListIdName in interface InterestItemListCopyCmd
Parameters:
asaListIdName - the String array of names

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
                          throws ECApplicationException
Description copied from interface: ControllerCommand
The WebController calls this method before invoking the execute method in this command to set the request properties for this command. It is the responsibility of the implementer of the ControllerCommand to extract the required input parameters from the request properties and perform parameter checking.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Following copied from interface: com.ibm.commerce.command.ControllerCommand
Parameters:
requestProperties - com.ibm.commerce.datatype.TypedProperty
Throws:
com.ibm.commerce.exception.ECException. -  

validateParameters

public void validateParameters()
                        throws ECException
Description copied from interface: ECCommand
Performs server side parameter checking. This method replaces the checkParameters() method in a previous version of the code.

Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
ECException. -