public abstract class AttachmentRelationBaseUpdateCmdImpl extends ControllerCommandImpl implements AttachmentRelationBaseUpdateCmd
AttachmentRelationBaseUpdateCmd
is a base command for the business object attachment relationship URL and controller command that:
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.
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.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:
AttachmentRelationDescriptionDataBean
AttachmentRelationAccessBean
AttachmentRelationDescriptionAccessBean
AttachmentRelationDescriptionDataBean
AddAttachmentRelationCmd
UpdateAttachmentRelationCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
Define the CLASSNAME.
|
static java.lang.String |
COPYRIGHT
The internal copyright field.
|
defaultCommandClassName
Constructor and Description |
---|
AttachmentRelationBaseUpdateCmdImpl() |
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 of
AttachmentRelationDescriptionDataBean |
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, calls
addAttachmentRelation 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 of
AttachmentRelationDescriptionDataBean 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.
|
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, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
fulfills, getOwner
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public java.lang.Long getAttachmentObjectId()
getAttachmentObjectId
in interface AttachmentRelationBaseUpdateCmd
public java.lang.Integer getAttachmentObjectTypeId()
public java.lang.Long getAttachmentRelationId()
getAttachmentRelationId
in interface AttachmentRelationBaseUpdateCmd
public java.lang.Long getAttachmentTargetId()
getAttachmentTargetId
in interface AttachmentRelationBaseUpdateCmd
public java.lang.Integer getAttachmentRelationUsageId()
getAttachmentRelationUsageId
in interface AttachmentRelationBaseUpdateCmd
public java.lang.Double getSequence()
getSequence
in interface AttachmentRelationBaseUpdateCmd
public java.util.Vector getAttachmentRelationDescriptions()
AttachmentRelationDescriptionDataBean
getAttachmentRelationDescriptions
in interface AttachmentRelationBaseUpdateCmd
AttachmentRelationDescriptionDataBean
public java.lang.String getURL()
getURL
in interface AttachmentRelationBaseUpdateCmd
public void performExecute() throws ECException
addAttachmentRelation
to create the attachment relation.
Calls addAttachmentRelationDescriptions
to create the attachment relation descriptions.performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand
public void setCreateMissing(java.lang.Boolean aboolCreateMissing)
setCreateMissing
in interface AttachmentRelationBaseUpdateCmd
aboolCreateMissing
- The create missing flagpublic void setAttachmentObjectId(java.lang.Long anAttachmentObjectId)
setAttachmentObjectId
in interface AttachmentRelationBaseUpdateCmd
anAttachmentObjectId
- The object IDpublic void setAttachmentObjectTypeId(java.lang.Integer anAttachmentObjectTypeId)
anObjectTypeId
- The Attachment Object Type IDpublic void setAttachmentRelationId(java.lang.Long anAttachmentRelationId)
setAttachmentRelationId
in interface AttachmentRelationBaseUpdateCmd
anAttachmentRelationId
- The attachment relation IDpublic void setAttachmentTargetId(java.lang.Long anAttachmentTargetId)
setAttachmentTargetId
in interface AttachmentRelationBaseUpdateCmd
anAttachmentTargetId
- The attachment target IDpublic void setAttachmentRelationUsageId(java.lang.Integer anAttachmentRelationUsageId)
setAttachmentRelationUsageId
in interface AttachmentRelationBaseUpdateCmd
anAttachmentRelationUsageId
- The attachment relation usage IDpublic void setSequence(java.lang.Double adSequence)
setSequence
in interface AttachmentRelationBaseUpdateCmd
adSequence
- The sequence numberpublic void setAttachmentRelationDescriptions(java.util.Vector avAttachmentRelationDescriptionDataBeans)
AttachmentRelationDescriptionDataBean
to be created as the description for the attachment relation.setAttachmentRelationDescriptions
in interface AttachmentRelationBaseUpdateCmd
avAttachmentRelationDescriptionDataBeans
- The list of AttachmentRelationDescriptionDataBean
public void setURL(java.lang.String astrURL)
setURL
in interface AttachmentRelationBaseUpdateCmd
astrURL
- The redirect URLpublic void setRequestProperties(TypedProperty reqParms) throws ECApplicationException
setRequestProperties
in interface ControllerCommand
setRequestProperties
in class ControllerCommandImpl
reqParms
- The request propertiesECApplicationException