com.adobe.idp.taskmanager.dsc.client.task
Interface AttachmentInfo

All Superinterfaces:
java.io.Serializable

public interface AttachmentInfo
extends java.io.Serializable

Contains information about a file to attach to a task.

Use the setType() method to specify the type of attachment. The default value is AttachmentInfo.TYPE_ATTACHMENT.

See Also:
TaskManager.addAttachment(long, com.adobe.idp.taskmanager.dsc.client.task.AttachmentInfo, java.io.InputStream)

Field Summary
static java.lang.String ATTACH_CREATE_DATE
          Document attribute that contains the attachment creation date when a list of documents is exported from the task.
static java.lang.String ATTACH_CREATOR_ID
          Document attribute that contains the attachment creator identifier when a list of documents is exported from the task.
static java.lang.String ATTACH_DESC
          Document attribute that contains the attachment description (or note content) when a list of documents is exported from the task.
static java.lang.String ATTACH_FILENAME
          Document attribute that contains the attachment file name when a list of documents is exported from the task.
static java.lang.String ATTACH_PERM
          Document attribute that contains the attachment permissions when a list of documents is exported from the task.
static java.lang.String ATTACH_TYPE
          Document attribute that contains the attachment type when a list of documents is exported from the task.
static java.lang.String ATTACH_UPDATE_DATE
          Document attribute that contains the attachment update date when a list of documents is exported from the task.
static int PERMISSION_DELETE
          A bit mask value containing the delete permission for the attachment.
static int PERMISSION_READ
          A bit mask value containing the read permission for the attachment.
static int PERMISSION_WRITE
          A bit mask value containing the permission for writing the attachment.
static java.lang.String TYPE_ATTACHMENT
          Indicates that this attachment is of an attachment type.
static java.lang.String TYPE_NOTE
          Indicates this attachment is a note type.
 
Method Summary
 java.util.Date getCreateDate()
          Retrieves the time stamp indicating when this attachment was created.
 java.lang.String getCreatorCommonName()
          Retrieves the common name of the user who created this attachment.
 java.lang.String getCreatorId()
          Retrieves the identifier of the user who created this attachment.
 java.lang.String getDescription()
          Retrieves the description for this attachment.
 java.lang.String getFileName()
          Retrieves the file name for this attachment.
 long getId()
          Retrieves the identifier for this attachment.
 java.util.Date getLastModifiedDate()
          Retrieves the time stamp indicating when this attachment was last updated.
 int getPermissions()
          Retrieves the permissions for this attachment.
 long getSize()
          Returns the file size, in bytes, of this attachment.
 java.lang.String getType()
          Retrieves the type of the attachment.
 boolean isDeleteable()
          Determines whether this attachment can be deleted.
 boolean isNoteExtended()
          Determines whether a note attachment is longer than the contents of the description field.
 boolean isReadable()
          Determines whether this attachment is readable.
 boolean isWriteable()
          Determines whether this attachment is writeable.
 void setDescription(java.lang.String aDescription)
          Sets the description for a new attachment.
 void setFileName(java.lang.String aFileName)
          Sets the file name for this attachment.
 void setId(long aId)
          Sets the identifier for this attachment.
 void setPermissions(int aPermissions)
          Sets new permissions for this attachment.
 void setType(java.lang.String attachmentType)
          Sets the type of the attachment.
 

Field Detail

PERMISSION_READ

static final int PERMISSION_READ
A bit mask value containing the read permission for the attachment.

See Also:
Constant Field Values

PERMISSION_WRITE

static final int PERMISSION_WRITE
A bit mask value containing the permission for writing the attachment.

See Also:
Constant Field Values

PERMISSION_DELETE

static final int PERMISSION_DELETE
A bit mask value containing the delete permission for the attachment.

See Also:
Constant Field Values

ATTACH_FILENAME

static final java.lang.String ATTACH_FILENAME
Document attribute that contains the attachment file name when a list of documents is exported from the task.

Since:
7.2
See Also:
Constant Field Values

ATTACH_PERM

static final java.lang.String ATTACH_PERM
Document attribute that contains the attachment permissions when a list of documents is exported from the task.

Since:
7.2
See Also:
Constant Field Values

ATTACH_DESC

static final java.lang.String ATTACH_DESC
Document attribute that contains the attachment description (or note content) when a list of documents is exported from the task.

Since:
7.2
See Also:
Constant Field Values

ATTACH_CREATOR_ID

static final java.lang.String ATTACH_CREATOR_ID
Document attribute that contains the attachment creator identifier when a list of documents is exported from the task.

Since:
7.2
See Also:
Constant Field Values

ATTACH_CREATE_DATE

static final java.lang.String ATTACH_CREATE_DATE
Document attribute that contains the attachment creation date when a list of documents is exported from the task.

Since:
7.2
See Also:
Constant Field Values

ATTACH_UPDATE_DATE

static final java.lang.String ATTACH_UPDATE_DATE
Document attribute that contains the attachment update date when a list of documents is exported from the task.

Since:
7.2
See Also:
Constant Field Values

ATTACH_TYPE

static final java.lang.String ATTACH_TYPE
Document attribute that contains the attachment type when a list of documents is exported from the task.

Its possible values are AttachmentInfo.TYPE_ATTACHMENT and AttachmentInfo.TYPE_NOTE.

Since:
7.2
See Also:
Constant Field Values

TYPE_ATTACHMENT

static final java.lang.String TYPE_ATTACHMENT
Indicates that this attachment is of an attachment type.

Since:
8.0
See Also:
Constant Field Values

TYPE_NOTE

static final java.lang.String TYPE_NOTE
Indicates this attachment is a note type. Notes are text value attachments, and do not have content.

Since:
8.0
See Also:
Constant Field Values
Method Detail

getId

long getId()
           throws UnknownValueException
Retrieves the identifier for this attachment.

Returns:
This attachment's identifier.
Throws:
UnknownValueException - if the identifier has not been set.

setId

void setId(long aId)
Sets the identifier for this attachment.

Parameters:
aId - The identifier for this attachment.

getFileName

java.lang.String getFileName()
                             throws UnknownValueException
Retrieves the file name for this attachment.

Throws:
UnknownValueException - if the name has not been set.

setFileName

void setFileName(java.lang.String aFileName)
Sets the file name for this attachment.

Parameters:
aFileName - The file name for this attachment.

isReadable

boolean isReadable()
                   throws UnknownValueException
Determines whether this attachment is readable.

Returns:
true if this attachment can be read, false otherwise.
Throws:
UnknownValueException - if the permissions of this attachment are unknown.

isWriteable

boolean isWriteable()
                    throws UnknownValueException
Determines whether this attachment is writeable.

Returns:
true if this attachment can be updated, false otherwise.
Throws:
UnknownValueException - if the permissions of this attachment are unknown.

isDeleteable

boolean isDeleteable()
                     throws UnknownValueException
Determines whether this attachment can be deleted.

Returns:
true if this attachment can be deleted, false otherwise.
Throws:
UnknownValueException - if the permissions of this attachment are unknown.

getPermissions

int getPermissions()
                   throws UnknownValueException
Retrieves the permissions for this attachment. Permissions are a bit mask made up of the AttachmentInfo.PERMISSION_READ, AttachmentInfo.PERMISSION_WRITE, and AttachmentInfo.PERMISSION_DELETE values.

Returns:
The permissions for this object.
Throws:
UnknownValueException - if the permissions for this attachment are unknown.

setPermissions

void setPermissions(int aPermissions)
Sets new permissions for this attachment.

aPermissions is a bit mask made up of AttachmentInfo.PERMISSION_READ (001), AttachmentInfo.PERMISSION_WRITE (010), and AttachmentInfo.PERMISSION_DELETE values (100). Therefore, read and write permissions would correspond to a value of 011; read, write, and delete permissions would correspond to a value of 111.

Parameters:
aPermissions - The new permissions for this attachment.

getSize

long getSize()
             throws UnknownValueException
Returns the file size, in bytes, of this attachment.

Throws:
UnknownValueException - if the file size is not known.

getLastModifiedDate

java.util.Date getLastModifiedDate()
                                   throws UnknownValueException
Retrieves the time stamp indicating when this attachment was last updated.

Throws:
UnknownValueException - if the last modified date is not known.

getDescription

java.lang.String getDescription()
                                throws UnknownValueException
Retrieves the description for this attachment.

Returns:
The description for this attachment.
Throws:
UnknownValueException

setDescription

void setDescription(java.lang.String aDescription)
                    throws UnknownValueException
Sets the description for a new attachment. The description appears in the user interface.

Parameters:
aDescription - The description for the attachment.
Throws:
UnknownValueException

getCreatorId

java.lang.String getCreatorId()
                              throws UnknownValueException
Retrieves the identifier of the user who created this attachment. The owner of an attachment is permitted to modify an attachment or remove it, regardless of attachment permissions.

Throws:
UnknownValueException

getCreatorCommonName

java.lang.String getCreatorCommonName()
                                      throws UnknownValueException
Retrieves the common name of the user who created this attachment. The creator of an attachment is permitted to modify an attachment or remove it, regardless of attachment permissions.

Throws:
UnknownValueException

getCreateDate

java.util.Date getCreateDate()
Retrieves the time stamp indicating when this attachment was created.


getType

java.lang.String getType()
Retrieves the type of the attachment. The possible values are AttachmentInfo.TYPE_ATTACHMENT and AttachmentInfo.TYPE_NOTE.

Returns:
A String indicating the type of the attachment (attachment or note).
Since:
8.0

setType

void setType(java.lang.String attachmentType)
             throws UnknownValueException
Sets the type of the attachment. The possible values are AttachmentInfo.TYPE_ATTACHMENT and AttachmentInfo.TYPE_NOTE.

Parameters:
attachmentType - The type of attachment.
Throws:
UnknownValueException - if the type being set does not match one of the possible values.
Since:
8.0

isNoteExtended

boolean isNoteExtended()
Determines whether a note attachment is longer than the contents of the description field.

If true, only a part of the note can be viewed from the description field, and the full note contents can only be seen by returning the note contents.

Returns:
true if the note attachment of type note is longer than the description field, false otherwise.


[an error occurred while processing this directive] [an error occurred while processing this directive]