public class ContractAttachmentAddCmdImpl extends com.ibm.commerce.command.ControllerCommandImpl implements ContractAttachmentAddCmd
ContractAttachmentAddCmd controller command.
| Name | Description |
|---|---|
contractId |
The contract ID. It is mandatory. |
url |
The uri for an attachment. It is mandatory. |
mimeType |
The mime type of the attachment. It is optional. |
mimeTypeEncoding |
The encoding of mime type of the attachment. It is optional. |
ContractAccessBean
TradingAttachmentRelationAccessBean
AttachmentAccessBean
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASSNAME
The full name of this class.
|
static java.lang.String |
COPYRIGHT
The IBM copyright notice field.
|
defaultCommandClassName, NAME| Constructor and Description |
|---|
ContractAttachmentAddCmdImpl()
Constructor for ContractAttachmentAddCmdImpl.
|
| 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 |
setMimeType(java.lang.String mimeType)
Sets the MIME type of the attachment.
|
void |
setMimeTypeEncoding(java.lang.String mimeTypeEncoding)
Sets the MIME type encoding of the attachment.
|
void |
setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
Retrieves input parameters from the request properties.
|
void |
setTradingId(java.lang.Long newInTradingId)
Sets the ID of the trading agreement to which the attachment will be added.
|
void |
setURI(java.lang.String newIstrURI)
Sets URI of the attachment.
|
void |
validateParameters()
Validates the contract to check if it is in right state for this process.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputPropertiesaccessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiescheckPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputPropertiesaccessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwnercheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiespublic static final java.lang.String CLASSNAME
public static final java.lang.String COPYRIGHT
public ContractAttachmentAddCmdImpl()
public com.ibm.commerce.accesscontrol.AccessVector getResources()
throws com.ibm.commerce.exception.ECException
getResources in interface com.ibm.commerce.command.ECCommandgetResources in class com.ibm.commerce.command.AbstractECTargetableCommandcom.ibm.commerce.exception.ECExceptionAbstractECTargetableCommand.getResources()public void performExecute()
throws com.ibm.commerce.exception.ECException
performExecute in interface com.ibm.commerce.command.ECCommandperformExecute in class com.ibm.commerce.command.AbstractECTargetableCommandcom.ibm.commerce.exception.ECException - Raised with message _ERR_DUPLICATED_ATTACHMENT_URL if the relationship between the trading
agreement and the specified attachment already exists.AbstractECTargetableCommand.performExecute()public void setMimeType(java.lang.String mimeType)
setMimeType in interface ContractAttachmentAddCmdmimeType - the MIME type for the attachmentpublic void setMimeTypeEncoding(java.lang.String mimeTypeEncoding)
setMimeTypeEncoding in interface ContractAttachmentAddCmdmimeTypeEncoding - the MIME type encoding of the attachmentpublic void setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
throws com.ibm.commerce.exception.ECApplicationException
setRequestProperties in interface com.ibm.commerce.command.ControllerCommandsetRequestProperties in class com.ibm.commerce.command.ControllerCommandImplaRequestProperties - An TypedProperty object contains the input parameters.
For this default implementation, contractId and url parameters are required.com.ibm.commerce.exception.ECApplicationException - Raised with message _ERR_MISSING_CMD_PARAMETER when contractId or url is missed from the URL.
Raised with message _ERR_NUMBER_FORMAT_EXCEPTION if the parameter(s) provided from the URL do not match their types.ControllerCommandImpl.setRequestProperties(TypedProperty)public void setTradingId(java.lang.Long newInTradingId)
setTradingId in interface ContractAttachmentAddCmdnewInTradingId - the ID of the trading agreementpublic void setURI(java.lang.String newIstrURI)
setURI in interface ContractAttachmentAddCmdnewIstrURI - the attachment uripublic void validateParameters()
throws com.ibm.commerce.exception.ECException
validateParameters in interface com.ibm.commerce.command.ECCommandvalidateParameters in class com.ibm.commerce.command.AbstractECTargetableCommandcom.ibm.commerce.exception.ECException - Raised with message _ERR_WRONG_CONTRACT_STATE if the contract is not in either Draft or Rejected state.
Raised with message _ERR_CONTRACT_OBJECT_NOT_FOUND if the contract cannot be found. It is based on the provided contract ID.
Raised with message _ERR_DIDNT_LOGON if the user did not logon to WebSphere Commerce.AbstractECTargetableCommand.validateParameters()