Package org.gitana.platform.client.attachment

# Interface Attachable

All Known Subinterfaces:
  `Archive`, `Association`, `AssociationDefinition`, `BaseNode`, `ChildAssociation`, `CopiedFromAssociation`, `CreatedAssociation`, `Definition`, `DeletedAssociation`, `DomainGroup`, `DomainPrincipal`, `DomainUser`, `FeatureDefinition`, `Form`, `Group`, `HasBehaviorAssociation`, `HasFormAssociation`, `HasLockAssociation`, `HasMountAssociation`, `HasTranslationAssociation`, `LinkedAssociation`, `Node`, `NodeList`, `OwnedAssociation`, `Person`, `Project`, `Rule`, `Stack`, `TypeDefinition`, `UpdatedAssociation`

All Known Implementing Classes:
  `AbstractDefinitionImpl`, `AbstractDomainPrincipalImpl`, `ArchiveImpl`, `AssociationDefinitionImpl`, `AssociationImpl`, `BaseNodeImpl`, `ChildAssociationImpl`, `CopiedFromAssociationImpl`, `CreatedAssociationImpl`, `DeletedAssociationImpl`, `DomainGroupImpl`, `DomainUserImpl`, `FeatureDefinitionImpl`, `FormImpl`, `GroupImpl`, `HasBehaviorAssociationImpl`, `HasFormAssociationImpl`, `HasLockAssociationImpl`, `HasMountAssociationImpl`, `HasTranslationAssociationImpl`, `LinkedAssociationImpl`, `NodeImpl`, `NodeListImpl`, `OwnedAssociationImpl`, `PersonImpl`, `ProjectImpl`, `RuleImpl`, `StackImpl`, `TypeDefinitionImpl`, `UpdatedAssociationImpl`

public interface Attachable

Author:
  uzi

## Method Summary

Modifier and Type
Method
Description
`void`
`deleteAttachment()`
Deletes the default attachment.
`void`
`deleteAttachment(String attachmentId)`
Deletes an attachment.
`byte[]`
`downloadAttachment()`
Downloads the default attachment.
`byte[]`
`downloadAttachment(String attachmentId)`
Downloads an attachment.
`String`
`getDownloadUri(String attachmentId)`
Acquires the download URI for the attachment
`org.gitana.platform.support.ResultMap<Attachment>`
`listAttachments()`
`void`
`uploadAttachment(byte[] bytes, String contentType)`
Uploads the default attachment.
`void`
`uploadAttachment(String attachmentId, byte[] bytes, String contentType)`
Uploads an attachment.
`void`
`uploadAttachment(String attachmentId, byte[] bytes, String contentType, String fileName)`
Uploads an attachment.
`void`
`uploadAttachments(Map<String,String> params, org.gitana.http.HttpPayload... payloads)`
Uploads a group of attachments.
`void`
`uploadAttachments(org.gitana.http.HttpPayload... payloads)`
Uploads a group of attachments.

## Method Details

### uploadAttachment

void uploadAttachment(byte[] bytes, String contentType)
Uploads the default attachment.

Parameters:
  `bytes` -
  `contentType` -

### uploadAttachment

void uploadAttachment(String attachmentId, byte[] bytes, String contentType)
Uploads an attachment.

Parameters:
  `attachmentId` -
  `bytes` -
  `contentType` -

### uploadAttachment

void uploadAttachment(String attachmentId, byte[] bytes, String contentType, String fileName)
Uploads an attachment.

Parameters:
  `attachmentId` -
  `bytes` -
  `contentType` -
  `fileName` -
  `attachmentId` -

### uploadAttachments

void uploadAttachments(org.gitana.http.HttpPayload... payloads)
Uploads a group of attachments.

Parameters:
  `payloads` -

### uploadAttachments

void uploadAttachments(Map<String,String> params, org.gitana.http.HttpPayload... payloads)
Uploads a group of attachments.

Parameters:
  `payloads` -

### downloadAttachment

byte[] downloadAttachment()
Downloads the default attachment.

Returns:
  attachment

### downloadAttachment

byte[] downloadAttachment(String attachmentId)
Downloads an attachment.

Parameters:
  `attachmentId` -
Returns:
  attachment

### listAttachments

org.gitana.platform.support.ResultMap<Attachment> listAttachments()

Returns:
  map of attachments

### getDownloadUri

String getDownloadUri(String attachmentId)
Acquires the download URI for the attachment

Parameters:
  `attachmentId` -
Returns:
  uri

### deleteAttachment

void deleteAttachment()
Deletes the default attachment.

### deleteAttachment

void deleteAttachment(String attachmentId)
Deletes an attachment.

Parameters:
  `attachmentId` -