com.ibm.commerce.command
Interface CopyAttachmentCmd

All Superinterfaces:
TaskCommand
All Known Implementing Classes:
CopyAttachmentCmdImpl

public interface CopyAttachmentCmd
extends TaskCommand

The CopyAttachmentCmd will make a copy of the attachment object as specified by the org_attachmentobj_id . A new attachment Object will be created and the new attachment object_id will be returned It will be a field by field copy including timecreated and timeupated as well as the markfordelete field , reserved field will be copied from the orginal attachment object to the new attachment object. If the attachmentURL is the same as the org_attachment_id in the attachment table the content of the attachment is stored in BLOB, it will be copied into the new attachment table as BLOB as well. If the attachmentURL is not the same as attachment_id, the attachment is stored on the file system as specified in the attachmentURL.. We will open up the file as specified in AttachmentURL in orginal attachment object, generate a new unqiue file name , then copy the file content to the new file.. The new filename will be the attachmenturl of the new attachment object. Note that when the attachment Object is deleted during DBClean, if the attachment is stored on the file system,a log of the attachmenturl will be generated. It is up to the user to go to the filesystem to delete the file.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field
static java.lang.String defaultCommandClassName
          default class name
static java.lang.String NAME
          name
 
Method Summary
 java.lang.Long getAttachmentId()
          Gets the attachmentobj_id of the attachment object in database table that is a duplication of the original attachment
 java.lang.Long getOrg_attachmentobj_id()
          Gets the org_attachmentobj_id of the attachment object in database table to be copied
 boolean performAccessCheck()
          Performs access control check to control who can view the attachment This method should be written by component that uses CopyAttachmentCmd
 void setOrg_attachmentobj_id(java.lang.Long org_attachmentobj_id)           Sets the org_attachmentobj_id of the attachment object in database table to be copied
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field
See Also:
Constant Field Values

defaultCommandClassName

public static final java.lang.String defaultCommandClassName
default class name
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
name
See Also:
Constant Field Values
Method Detail

getAttachmentId

public java.lang.Long getAttachmentId()
Gets the attachmentobj_id of the attachment object in database table that is a duplication of the original attachment
Returns:
String attachmentobj_id

getOrg_attachmentobj_id

public java.lang.Long getOrg_attachmentobj_id()
Gets the org_attachmentobj_id of the attachment object in database table to be copied
Returns:
String org_attachmentobj_id

setOrg_attachmentobj_id

public void setOrg_attachmentobj_id(java.lang.Long org_attachmentobj_id)
Sets the org_attachmentobj_id of the attachment object in database table to be copied

performAccessCheck

public boolean performAccessCheck()
Performs access control check to control who can view the attachment This method should be written by component that uses CopyAttachmentCmd