public class Attachment extends Entity
ASSET_STATE_VALUE, ASSET_VALUE, CHANGE_DATE_UTC, CONTENT_TYPE_VALUE, CONTENT_VALUE, CREATE_DATE_UTC, DELETE_OPERATION, DESCRIPTION_VALUE, FILENAME_VALUE, NAME_VALUE
Modifier and Type | Method and Description |
---|---|
boolean |
canDelete() |
void |
delete()
Deletes the attachment.
|
BaseAsset |
getAsset() |
String |
getContentType() |
String |
getContentURL() |
String |
getDescription() |
String |
getFilename() |
String |
getName() |
IListValueProperty |
getType() |
String |
getURL() |
void |
readFrom(InputStream input)
Read the attachment's content from the input stream.
|
void |
setAsset(BaseAsset asset) |
void |
setContentType(String contentType) |
void |
setDescription(String description) |
void |
setFilename(String filename) |
void |
setName(String name) |
void |
writeTo(OutputStream output)
Write this attachment's content to the output stream.
|
equals, get, getChangeComment, getChangeDate, getChangedBy, getCreateComment, getCreateDate, getCreatedBy, getID, getInstance, hashCode, save, save, toString
public String getURL()
public String getContentURL()
public BaseAsset getAsset()
public void setAsset(BaseAsset asset)
asset
- this attachment is related to.public String getDescription()
public void setDescription(String description)
description
- of this attachment.public String getContentType()
public void setContentType(String contentType)
contentType
- of this attachment.public String getFilename()
public void setFilename(String filename)
filename
- Filename of this attachment.public String getName()
public void setName(String name)
name
- Name of this attachment.public IListValueProperty getType()
public void writeTo(OutputStream output) throws ApplicationUnavailableException
output
- Stream to write the content to.ApplicationUnavailableException
- if coping fails.public void readFrom(InputStream input) throws ApplicationUnavailableException, AttachmentLengthExceededException
input
- Stream to read the content from.ApplicationUnavailableException
- if appears any problem with
connection to service.AttachmentLengthExceededException
- if attachment is too long.public boolean canDelete()
public void delete()
UnsupportedOperationException
- The item is an invalid state for
the Operation.Copyright © 2013 Version One, Inc.. All rights reserved.