public class ParticipantAddCmdImpl extends com.ibm.commerce.command.ControllerCommandImpl implements ParticipantAddCmd
ParticipantAddCmd
controller command.
Name | Description |
---|---|
Info |
A string of information for the participant. Mandatory. |
MemberId |
The member ID of the participant. Mandatory. |
RequestProperties |
The request properties. MemberId and role are required parameters. optional parameters are info, id, tcId. In the case to add a participant to an account/contract, the account/contract ID has to be provided through the parameter id. In the case to add participant to a term and condition of a contract. The ID of the term and condition has to be provided through the parameter tcId. If the parameters are set by setter methods, the request properties is optional. |
Role |
The type of the participant role. Mandatory. |
TcId |
The term condition ID. Mandatory. |
TradingId |
The trading agreement ID. Optional. |
Name | Description |
---|---|
Resources |
The access vector accessed by this command.The default implementation returns the AccountAccessBean for adding participant to an account
and ContractAccessBean for contract. |
ContractAccessBean
AccountAccessBean
TradingAgreementAccessBean
ParticipantAccessBean
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The name of this class.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
ParticipantAddCmdImpl()
Constructor for ParticipantAddCmdImpl.
|
Modifier and Type | Method and Description |
---|---|
com.ibm.commerce.accesscontrol.AccessVector |
getResources()
Gets the access vector accessed by this command.
|
void |
performExecute()
Executes the business logic of this command implementation.
|
void |
setInfo(java.lang.String info)
Sets information of the participant
|
void |
setMemberId(java.lang.Long memberId)
Sets member ID of the participant.
|
void |
setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
Retrieves input parameters from the request properties.
|
void |
setRole(java.lang.String role)
Sets the role type of the participant.
|
void |
setTcId(java.lang.Long tcId)
Sets ID of the term and condition to which the participant will be added
|
void |
setTradingId(java.lang.Long tradingId)
Sets ID of the trading agreement to which the participant will be added
|
void |
validateParameters()
Checks the input parameters.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String CLASSNAME
public static final java.lang.String COPYRIGHT
public ParticipantAddCmdImpl()
public com.ibm.commerce.accesscontrol.AccessVector getResources() throws com.ibm.commerce.exception.ECException
getResources
in interface com.ibm.commerce.command.ECCommand
getResources
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
AbstractECTargetableCommand.getResources()
public void performExecute() throws com.ibm.commerce.exception.ECException
performExecute
in interface com.ibm.commerce.command.ECCommand
performExecute
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
AbstractECTargetableCommand.performExecute()
public void setInfo(java.lang.String info)
setInfo
in interface ParticipantAddCmd
info
- a string of information for the participantpublic void setMemberId(java.lang.Long memberId)
setMemberId
in interface ParticipantAddCmd
memberId
- the member ID of the participantpublic void setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties) throws com.ibm.commerce.exception.ECApplicationException
setRequestProperties
in interface com.ibm.commerce.command.ControllerCommand
setRequestProperties
in class com.ibm.commerce.command.ControllerCommandImpl
aRequestProperties
- An TypedProperty object contains the input parameters.
For this default implementation, memberId and role are required parameters.
optional parameters are info, id, tcId. In the case to add a participant to an account/contract,
the account/contract ID has to be provided through the parameter id. In the case to add
participant to a term and condition of a contract. The ID of the term and condition has to be provided through
the parameter tcId.com.ibm.commerce.exception.ECApplicationException
- Raised with message _ERR_MISSING_CMD_PARAMETER if one of the three required parameters are missing.
Raised with message _ERR_NUMBER_FORMAT_EXCEPTION if the provided id, tcId cannot
be converted to Long object.ControllerCommandImpl.setRequestProperties(TypedProperty)
public void setRole(java.lang.String role)
setRole
in interface ParticipantAddCmd
role
- the type of the participant rolepublic void setTcId(java.lang.Long tcId)
setTcId
in interface ParticipantAddCmd
tcId
- term condition IDpublic void setTradingId(java.lang.Long tradingId)
setTradingId
in interface ParticipantAddCmd
tradingId
- the trading agreement IDpublic void validateParameters() throws com.ibm.commerce.exception.ECException
validateParameters
in interface com.ibm.commerce.command.ECCommand
validateParameters
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
- Raised with message _ERR_PARTICIPANT_ADD_TARGET_ID if both the id and tcId parameters are
missing or provided at the same time for this command.
Raised with message _ERR_PARTICIPANT_ROLE_TYPE_DO_NOT_EXIST if the role type provided
is not a supported role type.
Raised with message _ERR_ACCOUNT_TC_PARTICIPANT whenever trying to add a participant to a
Business Account terms and conditions.
Raised with message _ERR_WRONG_CONTRACT_STATE if the contract do not in Draft or Rejected state. When adding
a participant to a contract or a contract terms and conditions, it will do it.AbstractECTargetableCommand.validateParameters()