com.ibm.commerce.attachment.commands
Class AttachmentRelationBaseDeleteCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.ControllerCommandImpl
-
- com.ibm.commerce.attachment.commands.AttachmentRelationBaseDeleteCmdImpl
-
- All Implemented Interfaces:
- AttachmentRelationBaseDeleteCmd, AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
- Direct Known Subclasses:
- CatalogAttachmentDeleteCmdImpl, CatalogEntryAttachmentDeleteCmdImpl, CatalogGroupAttachmentDeleteCmdImpl
public abstract class AttachmentRelationBaseDeleteCmdImpl extends ControllerCommandImpl implements AttachmentRelationBaseDeleteCmd
An abstract implementation for the controller command to delete an Attachment Relation for a given business object. At a minimum, a command writer has to implement its own performExecute method and set up the proper response data. The proper attachment object type ID and the attachment object ID must also be set. This command will delete an attachment relation with the specified parameters.
Parameters:- atchrelId
- atchobjtypId, objectId
- atchobjtypId, objectId, atchrlusId, atchtgtId
- Delete by the attachment relation.
- The delete by business object option is set to False
- If the attachment relation ID is not specified, then a few IDs must be presented to resolve it. This IDs include the attachment object type ID, object ID, attachment target ID, and the attachment relation usage ID. An exception will be thrown if the attachment relation ID is not found or not resolved.
- Delete the corresponding attachment relation.
- Delete the corresponding attachment relation descriptions.
- Delete all the attachment relations in a business object.
- The delete by business object option is set to True or the following parameters are set to null:
- atchrelId (the attachment relation id)
- atchrlusId (the attachment relation usage id)
- atchtgtId (the attachment target id)
- The attachment object type ID and the object ID must be specified, an exception will be thrown if any one of these parameters are missing.
- Find all the attachment relation belongs to that business object, and delete all the attachment relations found.
- For all the attachment relations deleted, delete the corresponding attachment relation descriptions.
- The delete by business object option is set to True or the following parameters are set to null:
- By default, the delete by business object is set to False so it will delete only the specified attachment relation and relation descriptions.
AttachmentRelationAccessBean
AttachmentRelationDescriptionAccessBean
DeleteAttachmentRelationCmd
AttachmentRelationHelper
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
CLASSNAME
Define the CLASSNAME.static java.lang.String
COPYRIGHT
The internal copyright field.-
Fields inherited from interface com.ibm.commerce.command.ECCommand
defaultCommandClassName
-
-
Constructor Summary
Constructors Constructor and Description AttachmentRelationBaseDeleteCmdImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Long
getAttachmentRelationId()
Gets the attachment relation ID.java.lang.Integer
getAttachmentRelationUsageId()
Gets the attachment relation usage ID used in this attachment relation.java.lang.Long
getAttachmentTargetId()
Gets the attachment target ID used in this attachment relation.java.lang.Boolean
getDeleteByBusinessObject()
Gets the option to delete all the attachment relations by business object.java.lang.String
getURL()
Gets the redirect URL.void
performExecute()
If the attachment relation ID is not given, callsaddAttachmentRelation
to create the attachment relation.void
reset()
Resets the variables used.void
setAttachmentRelationId(java.lang.Long anAttachmentRelationId)
Sets the attachment relation ID.void
setAttachmentRelationUsageId(java.lang.Integer anAttachmentRelationUsageId)
Sets the attachment relation usage ID used in this attachment relation.void
setAttachmentTargetId(java.lang.Long anAttachmentTargetId)
Sets the attachment target ID used in the attachment relation.void
setDeleteByBusinessObject(java.lang.Boolean aboolDeleteByBusinessObject)
Sets the option to delete all the attachment relations by business object.void
setRequestProperties(TypedProperty reqParms)
Sets the request properties.void
setURL(java.lang.String astrURL)
Sets the redirect URL.void
validateParameters()
Validate the parameters.-
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
-
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, 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.- See Also:
- Constant Field Values
-
CLASSNAME
public static final java.lang.String CLASSNAME
Define the CLASSNAME.- See Also:
- Constant Field Values
-
-
Method Detail
-
performExecute
public void performExecute() throws ECException
If the attachment relation ID is not given, callsaddAttachmentRelation
to create the attachment relation. CallsaddAttachmentRelationDescriptions
to create the attachment relation descriptions.- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
-
getAttachmentRelationId
public java.lang.Long getAttachmentRelationId()
Gets the attachment relation ID.- Specified by:
getAttachmentRelationId
in interfaceAttachmentRelationBaseDeleteCmd
- Returns:
- The attachment relation ID
-
getAttachmentRelationUsageId
public java.lang.Integer getAttachmentRelationUsageId()
Gets the attachment relation usage ID used in this attachment relation.- Specified by:
getAttachmentRelationUsageId
in interfaceAttachmentRelationBaseDeleteCmd
- Returns:
- The attachment relation usage ID
-
getAttachmentTargetId
public java.lang.Long getAttachmentTargetId()
Gets the attachment target ID used in this attachment relation.- Specified by:
getAttachmentTargetId
in interfaceAttachmentRelationBaseDeleteCmd
- Returns:
- The attachment target ID
-
getURL
public java.lang.String getURL()
Gets the redirect URL.- Specified by:
getURL
in interfaceAttachmentRelationBaseDeleteCmd
- Returns:
- The redirect URL
-
getDeleteByBusinessObject
public java.lang.Boolean getDeleteByBusinessObject()
Gets the option to delete all the attachment relations by business object.- True = delete all the attachment relations by the business object specified in the parameter
- False = delete by attachment relation ID or the unique index of the attachment relation
- Specified by:
getDeleteByBusinessObject
in interfaceAttachmentRelationBaseDeleteCmd
- Returns:
- The primary key of the business object
-
setAttachmentRelationId
public void setAttachmentRelationId(java.lang.Long anAttachmentRelationId)
Sets the attachment relation ID.- Specified by:
setAttachmentRelationId
in interfaceAttachmentRelationBaseDeleteCmd
- Parameters:
anAttachmentRelationId
- The attachment relation ID
-
setAttachmentRelationUsageId
public void setAttachmentRelationUsageId(java.lang.Integer anAttachmentRelationUsageId)
Sets the attachment relation usage ID used in this attachment relation.- Specified by:
setAttachmentRelationUsageId
in interfaceAttachmentRelationBaseDeleteCmd
- Parameters:
anAttachmentRelationUsageId
- The attachment relation usage
-
setAttachmentTargetId
public void setAttachmentTargetId(java.lang.Long anAttachmentTargetId)
Sets the attachment target ID used in the attachment relation.- Specified by:
setAttachmentTargetId
in interfaceAttachmentRelationBaseDeleteCmd
- Parameters:
anAttachmentTargetId
- The attachment target ID
-
setDeleteByBusinessObject
public void setDeleteByBusinessObject(java.lang.Boolean aboolDeleteByBusinessObject)
Sets the option to delete all the attachment relations by business object.- True = delete all the attachment relations by the business object specified in the parameter
- False = delete by attachment relation ID or the unique index of the attachment relation
- Specified by:
setDeleteByBusinessObject
in interfaceAttachmentRelationBaseDeleteCmd
- Parameters:
aboolDeleteByBusinessObject
- option to delete attachment relation by business object
-
setURL
public void setURL(java.lang.String astrURL)
Sets the redirect URL.- Specified by:
setURL
in interfaceAttachmentRelationBaseDeleteCmd
- Parameters:
astrURL
- The redirect URL
-
setRequestProperties
public void setRequestProperties(TypedProperty reqParms) throws ECApplicationException
Sets the request properties.- Specified by:
setRequestProperties
in interfaceControllerCommand
- Overrides:
setRequestProperties
in classControllerCommandImpl
- Parameters:
reqParms
- The request properties- Throws:
ECApplicationException
-
reset
public void reset()
Resets the variables used.- Specified by:
reset
in interfacecom.ibm.websphere.command.Command
- Overrides:
reset
in classAbstractECTargetableCommand
-
validateParameters
public void validateParameters() throws ECException
Validate the parameters.- Specified by:
validateParameters
in interfaceECCommand
- Overrides:
validateParameters
in classAbstractECTargetableCommand
- Throws:
ECException
-
-