Package mks.ci.server.engine
Class LocalTriggerManager.ScriptAttachmentBean
- java.lang.Object
-
- mks.frame.triggers.ScriptExposableBaseBean
-
- mks.frame.triggers.beans.ScriptBaseBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptIMBaseBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptIdentifiedBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptAttachmentBean
-
- All Implemented Interfaces:
mks.frame.triggers.ScriptExposableBean
- Enclosing class:
- LocalTriggerManager
public static class LocalTriggerManager.ScriptAttachmentBean extends LocalTriggerManager.ScriptIdentifiedBean implements mks.frame.triggers.ScriptExposableBean
A bean for an attachment to an issue. A list of the attachment beans is obtained from the issue bean, via theget(Added|Removed)AttachmentBeans
method. At this point, the contents of the attachment is assumed to not be populated. The contents are only retrieved if thegetContent
method is invoked.
-
-
Constructor Summary
Constructors Constructor Description ScriptAttachmentBean(int userId, mks.ci.server.engine.AbstractAttachment a, int aID, java.sql.Connection c)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Date
getAddedDate()
Return the added date of the attachmentbyte[]
getContent()
Deprecated.UsegetContent(OutputStream out)
insteadvoid
getContent(java.io.OutputStream out)
Write the contents of the attachment to the specified output stream.int
getContentSize()
Return the number of bytes in the attachment.java.lang.String
getContentType()
Return the type of the attachment in mime format; e.g.java.lang.String
getCreatedBy()
Return the created user of the attachmentjava.lang.String
getExposedName()
Returns the name of this bean that is exposed to the scripting language.java.lang.String
getName()
Return the name of the attachment, i.e. the filename it was loaded from.java.lang.String
getSummary()
Return the summary for the attachmentjava.lang.String
toString()
Returns a summary of this object.-
Methods inherited from class mks.ci.server.engine.LocalTriggerManager.ScriptIdentifiedBean
getCreatedDate, getCreatedUser, getInternalID, getModifiedDate, getModifiedUser
-
Methods inherited from class mks.ci.server.engine.LocalTriggerManager.ScriptIMBaseBean
getCurrentDatabaseTime, getCurrentDatabaseTime, getCurrentUser, getServerBean, getUserID, isParallelProcessingEnabled
-
Methods inherited from class mks.frame.triggers.beans.ScriptBaseBean
getEnvironmentBean, setEnvironmentBean
-
-
-
-
Method Detail
-
getExposedName
public java.lang.String getExposedName()
Returns the name of this bean that is exposed to the scripting language.- Specified by:
getExposedName
in interfacemks.frame.triggers.ScriptExposableBean
- Specified by:
getExposedName
in classScriptBaseBean
- Returns:
- the bean name:
imAttachmentBean
.
-
getContentSize
public int getContentSize()
Return the number of bytes in the attachment.
-
getContent
@Deprecated public byte[] getContent() throws mks.frame.triggers.TriggerException
Deprecated.UsegetContent(OutputStream out)
insteadReturn the full contents of the attachment in a byte array. Issue attachments have been made larger and this routine may result in an out of memory error.- Returns:
- the attachment contents as a byte array
- Throws:
mks.frame.triggers.TriggerException
-
getContent
public void getContent(java.io.OutputStream out) throws mks.frame.triggers.TriggerException
Write the contents of the attachment to the specified output stream.- Parameters:
out
- The output stream where the contents of the attachment will be written to- Throws:
mks.frame.triggers.TriggerException
-
getContentType
public java.lang.String getContentType()
Return the type of the attachment in mime format; e.g. a text file will be text/plain, and a binary file will be application/octet-stream
-
getName
public java.lang.String getName()
Return the name of the attachment, i.e. the filename it was loaded from.
-
toString
public java.lang.String toString()
Returns a summary of this object.- Overrides:
toString
in classjava.lang.Object
-
getSummary
public java.lang.String getSummary()
Return the summary for the attachment
-
getCreatedBy
public java.lang.String getCreatedBy()
Return the created user of the attachment
-
getAddedDate
public java.util.Date getAddedDate()
Return the added date of the attachment
-
-