7.0 Action Request System Java API

com.remedy.arsys.api
Class AttachmentInfo

java.lang.Object
  extended bycom.remedy.arsys.api.AttachmentInfo
All Implemented Interfaces:
java.lang.Cloneable

public class AttachmentInfo
extends java.lang.Object
implements java.lang.Cloneable

The AttachmentInfo class is used to get/set the information about attachment fields. This class represents the attachment, or binary large object (blob), stored for the attachment field with the indicated ID on the specified server. The data is returned/set either in a buffer or a file, depending on the type of location.


Field Summary
static int AR_LOC_BUFFER
          AR_LOC_BUFFER specifies that the contents of the blob should be returned/set in a data buffer.
static int AR_LOC_FILENAME
          AR_LOC_FILENAME specifies that the contents of the blob should be returned/set in a file.
 
Constructor Summary
AttachmentInfo(java.lang.String name, long nOrigSize, long nCompSize, byte[] loc)
           
AttachmentInfo(java.lang.String name, long nOrigSize, long nCompSize, java.lang.String loc)
           
 
Method Summary
 java.lang.Object clone()
          Clone implementation that returns an Object with data cloned from self.
 long getCompressedSize()
          Returns compressed size of attachment.
 int getLocationType()
          Returns the location type that indicates whether the contents are passed as a file (AR_LOC_FILENAME) or as a buffer (AR_LOC_BUFFER).
 java.lang.String getName()
          Returns name of the attachment.
 long getOriginalSize()
          Returns the original size of attachment.
 java.lang.Object getValue()
          Returns value of attachment.
 java.lang.String getValueFileName()
           
 void setCompressedSize(long nCompSize)
          Sets the compressed size of attachment.
 void setName(java.lang.String name)
          Sets the name of the attachment.
 void setOriginalSize(long nOrigSize)
          Sets the original size of attachment.
 void setValue(byte[] bytes)
          Sets the buffer (byte[]) in which the content is returned.
 void setValue(java.lang.String strFileName)
          Sets the name of the file in which the attachment is written.
 java.lang.String toString()
          Returns a string description of the object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AR_LOC_FILENAME

public static final int AR_LOC_FILENAME
AR_LOC_FILENAME specifies that the contents of the blob should be returned/set in a file.

See Also:
Constant Field Values

AR_LOC_BUFFER

public static final int AR_LOC_BUFFER
AR_LOC_BUFFER specifies that the contents of the blob should be returned/set in a data buffer.

See Also:
Constant Field Values
Constructor Detail

AttachmentInfo

public AttachmentInfo(java.lang.String name,
                      long nOrigSize,
                      long nCompSize,
                      byte[] loc)

AttachmentInfo

public AttachmentInfo(java.lang.String name,
                      long nOrigSize,
                      long nCompSize,
                      java.lang.String loc)
Method Detail

getName

public java.lang.String getName()
Returns name of the attachment.


setName

public void setName(java.lang.String name)
Sets the name of the attachment.


getOriginalSize

public long getOriginalSize()
Returns the original size of attachment.


setOriginalSize

public void setOriginalSize(long nOrigSize)
Sets the original size of attachment.


getCompressedSize

public long getCompressedSize()
Returns compressed size of attachment.


setCompressedSize

public void setCompressedSize(long nCompSize)
Sets the compressed size of attachment.


getLocationType

public int getLocationType()
Returns the location type that indicates whether the contents are passed as a file (AR_LOC_FILENAME) or as a buffer (AR_LOC_BUFFER).


getValue

public java.lang.Object getValue()
Returns value of attachment.


setValue

public void setValue(byte[] bytes)
Sets the buffer (byte[]) in which the content is returned.


setValue

public void setValue(java.lang.String strFileName)
Sets the name of the file in which the attachment is written.


getValueFileName

public java.lang.String getValueFileName()

toString

public java.lang.String toString()
Returns a string description of the object.


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone implementation that returns an Object with data cloned from self.

Throws:
java.lang.CloneNotSupportedException

7.0 Action Request System Java API