Class AttachmentRelationBaseUpdateCmdImpl
- 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.AttachmentRelationBaseUpdateCmdImpl
-
- All Implemented Interfaces:
- AttachmentRelationBaseUpdateCmd, 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:
- CatalogAttachmentUpdateCmdImpl, CatalogEntryAttachmentUpdateCmdImpl, CatalogGroupAttachmentUpdateCmdImpl
public abstract class AttachmentRelationBaseUpdateCmdImpl extends ControllerCommandImpl implements AttachmentRelationBaseUpdateCmd
TheAttachmentRelationBaseUpdateCmd
is a base command for the business object attachment relationship URL and controller command that:- Updates a new attachment relation for the specified object.
- Update the descriptions for the attachment relation.
If the attachment relation ID is specified, then the attachment relation will be updated. If the command is called as URL. Only one description can be created or updated. Otherwise, multiple descriptions can be updated by setting the vector of
AttachmentRelationDescriptionDataBean
.When updating the attachment relation, the command will change the parameters set by the command. However, the behaviour in updating the attachment relation description is different. The behaviour depends on whether the command was called as a URL or as a command.
- When creating the vector of
AttachmentRelationDescriptionDataBean
, the attachment relation ID from the databean will not be used. The attachment relation ID will be obtained from the command itself. Either user specified the attachment relation ID or it is obtained from the attachment relation just created by the command. Ensure that the name, short description, and long description are set in the databean even if they are not changed. The command will take the name and descriptions as they are and update the attachment relation description. - However, when the command is executed as a URL, it will only update the parameters set by the caller. If the name is set but the long description is not set, then only the name will be updated. The long description will remain unchanged.
By default, the option to create the missing attachment relation and its descriptions is set to True. If the option is set to false and the attachment relation or any of its descriptions is not found, an exception will be thrown. Parameters:
- Object ID
- Attachment Relation ID
- Attachment Target ID
- Attachment Relation Usage ID
- Sequence
- Relation Name
- Relation Description Language ID
- Relation Short Description
- Relation Long Description
- Vector of
AttachmentRelationDescriptionDataBean
AttachmentRelationAccessBean
AttachmentRelationDescriptionAccessBean
AttachmentRelationDescriptionDataBean
AddAttachmentRelationCmd
,
UpdateAttachmentRelationCmd
,
- 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 AttachmentRelationBaseUpdateCmdImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Long
getAttachmentObjectId()
Gets the Attachment Object ID.java.lang.Integer
getAttachmentObjectTypeId()
Gets the Attachment Object Type ID.java.util.Vector
getAttachmentRelationDescriptions()
Gets the vector ofAttachmentRelationDescriptionDataBean
java.lang.Long
getAttachmentRelationId()
Gets the attachment relation ID for the object.java.lang.Integer
getAttachmentRelationUsageId()
Gets the attachment relation usage ID in the attachment relation.java.lang.Long
getAttachmentTargetId()
Gets the attachment target ID in the attachment relation.java.lang.Double
getSequence()
Gets the sequence used in the attachment relation.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
setAttachmentObjectId(java.lang.Long anAttachmentObjectId)
Sets the Object ID.void
setAttachmentObjectTypeId(java.lang.Integer anAttachmentObjectTypeId)
Sets the Attachment Object Type ID.void
setAttachmentRelationDescriptions(java.util.Vector avAttachmentRelationDescriptionDataBeans)
Sets the vector ofAttachmentRelationDescriptionDataBean
to be created as the description for the attachment relation.void
setAttachmentRelationId(java.lang.Long anAttachmentRelationId)
Sets the attachment relation ID.void
setAttachmentRelationUsageId(java.lang.Integer anAttachmentRelationUsageId)
Sets the attachment relation usage ID.void
setAttachmentTargetId(java.lang.Long anAttachmentTargetId)
Sets the attachment target ID.void
setCreateMissing(java.lang.Boolean aboolCreateMissing)
Sets the option the create missing attachment relation and attachment relation descriptions.void
setRequestProperties(TypedProperty reqParms)
Sets the request properties.void
setSequence(java.lang.Double adSequence)
Sets the sequence in the attachment relation.void
setURL(java.lang.String astrURL)
Sets the redirect URL.-
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, validateParameters
-
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, validateParameters
-
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
-
getAttachmentObjectId
public java.lang.Long getAttachmentObjectId()
Gets the Attachment Object ID.- Specified by:
getAttachmentObjectId
in interfaceAttachmentRelationBaseUpdateCmd
- Returns:
- The Attachment Object ID
-
getAttachmentObjectTypeId
public java.lang.Integer getAttachmentObjectTypeId()
Gets the Attachment Object Type ID.- Returns:
- The Attachment Object Type ID
-
getAttachmentRelationId
public java.lang.Long getAttachmentRelationId()
Gets the attachment relation ID for the object.- Specified by:
getAttachmentRelationId
in interfaceAttachmentRelationBaseUpdateCmd
- Returns:
- The attachment relation ID
-
getAttachmentTargetId
public java.lang.Long getAttachmentTargetId()
Gets the attachment target ID in the attachment relation.- Specified by:
getAttachmentTargetId
in interfaceAttachmentRelationBaseUpdateCmd
- Returns:
- The attachment target ID
-
getAttachmentRelationUsageId
public java.lang.Integer getAttachmentRelationUsageId()
Gets the attachment relation usage ID in the attachment relation.- Specified by:
getAttachmentRelationUsageId
in interfaceAttachmentRelationBaseUpdateCmd
- Returns:
- The attachment relation usage ID
-
getSequence
public java.lang.Double getSequence()
Gets the sequence used in the attachment relation.- Specified by:
getSequence
in interfaceAttachmentRelationBaseUpdateCmd
- Returns:
- The sequence
-
getAttachmentRelationDescriptions
public java.util.Vector getAttachmentRelationDescriptions()
Gets the vector ofAttachmentRelationDescriptionDataBean
- Specified by:
getAttachmentRelationDescriptions
in interfaceAttachmentRelationBaseUpdateCmd
- Returns:
- The vector of
AttachmentRelationDescriptionDataBean
-
getURL
public java.lang.String getURL()
Gets the redirect URL.- Specified by:
getURL
in interfaceAttachmentRelationBaseUpdateCmd
- Returns:
- String The redirect URL
-
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
-
reset
public void reset()
Resets the variables used.- Specified by:
reset
in interfacecom.ibm.websphere.command.Command
- Overrides:
reset
in classAbstractECTargetableCommand
-
setCreateMissing
public void setCreateMissing(java.lang.Boolean aboolCreateMissing)
Sets the option the create missing attachment relation and attachment relation descriptions.- True - create the missing attachment relation and descriptions.
- False - throw exception if the attachment relation or descriptions do not exists
- Specified by:
setCreateMissing
in interfaceAttachmentRelationBaseUpdateCmd
- Parameters:
aboolCreateMissing
- The create missing flag
-
setAttachmentObjectId
public void setAttachmentObjectId(java.lang.Long anAttachmentObjectId)
Sets the Object ID.- Specified by:
setAttachmentObjectId
in interfaceAttachmentRelationBaseUpdateCmd
- Parameters:
anAttachmentObjectId
- The object ID
-
setAttachmentObjectTypeId
public void setAttachmentObjectTypeId(java.lang.Integer anAttachmentObjectTypeId)
Sets the Attachment Object Type ID.- Parameters:
anObjectTypeId
- The Attachment Object Type ID
-
setAttachmentRelationId
public void setAttachmentRelationId(java.lang.Long anAttachmentRelationId)
Sets the attachment relation ID.- Specified by:
setAttachmentRelationId
in interfaceAttachmentRelationBaseUpdateCmd
- Parameters:
anAttachmentRelationId
- The attachment relation ID
-
setAttachmentTargetId
public void setAttachmentTargetId(java.lang.Long anAttachmentTargetId)
Sets the attachment target ID.- Specified by:
setAttachmentTargetId
in interfaceAttachmentRelationBaseUpdateCmd
- Parameters:
anAttachmentTargetId
- The attachment target ID
-
setAttachmentRelationUsageId
public void setAttachmentRelationUsageId(java.lang.Integer anAttachmentRelationUsageId)
Sets the attachment relation usage ID.- Specified by:
setAttachmentRelationUsageId
in interfaceAttachmentRelationBaseUpdateCmd
- Parameters:
anAttachmentRelationUsageId
- The attachment relation usage ID
-
setSequence
public void setSequence(java.lang.Double adSequence)
Sets the sequence in the attachment relation.- Specified by:
setSequence
in interfaceAttachmentRelationBaseUpdateCmd
- Parameters:
adSequence
- The sequence number
-
setAttachmentRelationDescriptions
public void setAttachmentRelationDescriptions(java.util.Vector avAttachmentRelationDescriptionDataBeans)
Sets the vector ofAttachmentRelationDescriptionDataBean
to be created as the description for the attachment relation.- Specified by:
setAttachmentRelationDescriptions
in interfaceAttachmentRelationBaseUpdateCmd
- Parameters:
avAttachmentRelationDescriptionDataBeans
- The list ofAttachmentRelationDescriptionDataBean
-
setURL
public void setURL(java.lang.String astrURL)
Sets the redirect URL.- Specified by:
setURL
in interfaceAttachmentRelationBaseUpdateCmd
- 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
-
-