Fuego Process API

fuego.papi
Interface Attachment

All Superinterfaces:
AttachmentInterface

public interface Attachment
extends AttachmentInterface


Field Summary
static int DESCRIPT_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
 fuego.lang.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
 fuego.lang.Time getEditionTime()
          Returns the time of marking for edition of this attachment.
 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
 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
 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)
          This method saves the given file in the given directory
 

Field Detail

FILENAME_LENGTH

public static final int FILENAME_LENGTH
See Also:
Constant Field Values

DESCRIPT_LENGTH

public static final int DESCRIPT_LENGTH
See Also:
Constant Field Values

REMARK_LENGTH

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

getContentSize

public 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

public String getContentType()
Returns the attachment content type

Specified by:
getContentType in interface AttachmentInterface
Returns:

getCreationTime

public fuego.lang.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

public 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

public String getDescription()
The description of this attachment

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

getEditionTime

public fuego.lang.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

public String getFileExtension()
The extension of the attachment file

Returns:
String The extension of the attachment file

isFileModified

public 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

public String getFileName()
The name of the attachment file

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

getId

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

Specified by:
getId in interface AttachmentInterface
Returns:
attachmentId

getIn

public int getIn()
The identificator number of this attachment

Returns:
int Identificator number of this attachment

getInstanceId

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

Returns:
String Identificator of the instance

getInstanceIn

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

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

getLocaleSize

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

Returns:
The locale formatted size of the attachment

isLocked

public boolean isLocked()
If the process is locked or not

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

isLockedByParticipant

public 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

public 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

public String getName()
The name of this attachment

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

getOsInfo

public String getOsInfo()
Deprecated.  

Returns information about the operating system

Returns:
remarks associated to this attachment

getProcessIn

public 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

public 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

public 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

public int getVersion()
The version of this attachment

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

existsFile

public 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

public void saveAs(String attachmentsDirectory,
                   File file)
            throws FileNotFoundException,
                   SecurityException,
                   IOException
This method saves the given file in the given directory

Throws:
FileNotFoundException
SecurityException
IOException

Fuego Process API

© Copyright 1996/2003 Fuego Inc. All Rights Reserved