ALBPM Process API

fuego.papi
Interface Attachment

All Superinterfaces:
AttachmentInterface

public interface Attachment
extends AttachmentInterface

This interface represent a file attached to the instance


Field Summary
static int DESCRIPT_LENGTH
           
static int EXTERNALID_LENGTH
           
static int FILENAME_LENGTH
           
static int REMARK_LENGTH
           
 
Method Summary
 boolean existsFile(String directory)
          This methods returns true if the attachment has already been checked out in the specified directory
 long getContentSize()
          The size of the content of this attachment
 String getContentType()
          Returns the attachment content type
 Time getCreationTime()
          Returns the time of creation of this particular version of the attachment.
 String getCreatorName()
          Returns the creator of this particular version of the attachment.
 String getDescription()
          The description of this attachment
 Time getEditionTime()
          Returns the time of marking for edition of this attachment.
 String getExternalDownloadUrl()
          Url link to external download link.
 String getExternalId()
          Indicates external id, necessary when the attachment is not stored in the engine DB, but on a different repository.
 String getExternalUrl()
          Url link to external description information.
 String getFileExtension()
          The extension of the attachment file
 String getFileName()
          The name of the attachment file
 String getId()
          This methid returns the attachment id.
 int getIn()
          The identificator number of this attachment
 String getInstanceId()
          Returns the instance identificator from the specific attachment
 int getInstanceIn()
          The identificator number of the instance where is this attached
 Locale getLocale()
          The locale in which the document has been written.
 String getLocaleSize(Locale locale)
          Returns the locale formatted size of the attachment.
 String getLockerName()
          Returns the current locker's name of this attachment.
 String getName()
          The name of this attachment
 String getOsInfo()
          Deprecated.  
 int getProcessIn()
          This method returns the identificatior number of the process which belongs this attachment
 String getRemarks()
          Returns remarks or observations for this particular version of the attachment
 AttachmentStorageType getStorageType()
          The storage repository type where the attachment is stored.
 Object getVar(String variableId)
          Returns the value of any variable by id.
 int getVersion()
          The version of this attachment
 boolean isFileModified(String directory)
          This methods returns true if the attachment has already been checked out in the specified directory
 boolean isLocked()
          If the process is locked or not
 boolean isLockedByParticipant(String participantId)
          If this attachment is locked by the given participant
 void saveAs(String attachmentsDirectory, File file)
          Saves the given file copying it from the specified directory.
 

Field Detail

DESCRIPT_LENGTH

static final int DESCRIPT_LENGTH
See Also:
Constant Field Values

EXTERNALID_LENGTH

static final int EXTERNALID_LENGTH
See Also:
Constant Field Values

FILENAME_LENGTH

static final int FILENAME_LENGTH
See Also:
Constant Field Values

REMARK_LENGTH

static final int REMARK_LENGTH
See Also:
Constant Field Values
Method Detail

getContentSize

long getContentSize()
The size of the content of this attachment

Specified by:
getContentSize in interface AttachmentInterface
Returns:
long The size of the content of this attachment

getContentType

String getContentType()
Returns the attachment content type

Specified by:
getContentType in interface AttachmentInterface
Returns:

getCreationTime

Time getCreationTime()
Returns the time of creation of this particular version of the attachment.

Specified by:
getCreationTime in interface AttachmentInterface
Returns:
the attachment's creation time

getCreatorName

String getCreatorName()
Returns the creator of this particular version of the attachment.

Specified by:
getCreatorName in interface AttachmentInterface
Returns:
the attachment's creator name

getDescription

String getDescription()
The description of this attachment

Specified by:
getDescription in interface AttachmentInterface
Returns:
the attachment's description

getEditionTime

Time getEditionTime()
Returns the time of marking for edition of this attachment.

Specified by:
getEditionTime in interface AttachmentInterface
Returns:
the attachment's edition time or null if it is not locked

getFileExtension

String getFileExtension()
The extension of the attachment file

Returns:
String The extension of the attachment file

isFileModified

boolean isFileModified(String directory)
This methods returns true if the attachment has already been checked out in the specified directory

Parameters:
directory - to check
Returns:
boolean True if the file in the given directory has been modified, otherwise false

getFileName

String getFileName()
The name of the attachment file

Returns:
the filename that will be used to save or load the attachment from disk

getId

String getId()
This methid returns the attachment id. attachmentId = "InstanceId/AttachmentIn/Version"

Specified by:
getId in interface AttachmentInterface
Returns:
attachmentId

getIn

int getIn()
The identificator number of this attachment

Returns:
int Identificator number of this attachment

getInstanceId

String getInstanceId()
Returns the instance identificator from the specific attachment

Returns:
String Identificator of the instance

getInstanceIn

int getInstanceIn()
The identificator number of the instance where is this attached

Returns:
int Identificator number of the instance where this is attached

getLocaleSize

String getLocaleSize(Locale locale)
Returns the locale formatted size of the attachment.

Returns:
The locale formatted size of the attachment

isLocked

boolean isLocked()
If the process is locked or not

Returns:
a boolean value of true if the attachment is currently locked

isLockedByParticipant

boolean isLockedByParticipant(String participantId)
If this attachment is locked by the given participant

Parameters:
participantId -
Returns:
a boolean value of true if the attachment is currently locked by the user passed as parameter

getLockerName

String getLockerName()
Returns the current locker's name of this attachment.

Specified by:
getLockerName in interface AttachmentInterface
Returns:
the attachment's locker name or an empty string if it is not locked

getName

String getName()
The name of this attachment

Specified by:
getName in interface AttachmentInterface
Returns:
the attachment's name

getOsInfo

@Deprecated
String getOsInfo()
Deprecated. 

Returns information about the operating system

Returns:
remarks associated to this attachment

getProcessIn

int getProcessIn()
This method returns the identificatior number of the process which belongs this attachment

Returns:
int Identificator number of the process of this attachment

getRemarks

String getRemarks()
Returns remarks or observations for this particular version of the attachment

Specified by:
getRemarks in interface AttachmentInterface
Returns:
remarks associated to this attachment

getVar

Object getVar(String variableId)
              throws InvalidVariableIdException
Returns the value of any variable by id. Remember that the type of the variable is specified in the VarDefinition object.

Parameters:
variableId - The id of the variable whose value is required
Returns:
Object The value of the variable identificated by the id argument
Throws:
InvalidVariableIdException

getVersion

int getVersion()
The version of this attachment

Specified by:
getVersion in interface AttachmentInterface
Returns:
the version number of the attachment

getExternalUrl

String getExternalUrl()
Url link to external description information.


getExternalDownloadUrl

String getExternalDownloadUrl()
Url link to external download link.


getExternalId

String getExternalId()
Indicates external id, necessary when the attachment is not stored in the engine DB, but on a different repository.


getStorageType

AttachmentStorageType getStorageType()
The storage repository type where the attachment is stored.


getLocale

Locale getLocale()
The locale in which the document has been written. Null if it does not make sense for this attachment.


existsFile

boolean existsFile(String directory)
                   throws IOException
This methods returns true if the attachment has already been checked out in the specified directory

Parameters:
directory - to check
Returns:
boolean True if exists the file in the given directory, otherwise false
Throws:
IOException

saveAs

void saveAs(String attachmentsDirectory,
            File file)
            throws FileNotFoundException,
                   SecurityException,
                   IOException
Saves the given file copying it from the specified directory.
If the attachment has been checked out into the attachmentsDirectory, it will
be copied to the specified file.
If the attachment has not been checked out, an exception will be thrown.

It is recommended to invoke existsFile(String) and verify that the attachment
has been checked out before trying to save it.

Parameters:
attachmentsDirectory - The directory where the attachment has been checked out.
file - The file where the attachment is to be copied.
Throws:
FileNotFoundException - If the attachment has not been checked out.
SecurityException
IOException

ALBPM Process API

© Copyright 1996/2005 Fuego Inc. All Rights Reserved