public class Attachment extends Object implements Serializable, GlobalIdentifiable, Propertyable
An attachment refers to a file in the repository connector.
Modifier and Type | Class and Description |
---|---|
static class |
Attachment.Factory
Constructs new instances of
Attachment . |
Constructor and Description |
---|
Attachment() |
Modifier and Type | Method and Description |
---|---|
String |
attributesToString()
Builds a string showing the current attribute values
|
boolean |
equals(Object object)
Returns
true if the argument is an Attachment instance and all identifiers for
this entity equal the identifiers of the argument entity. |
String |
getContentIdentifier()
The content identifier describes the resource for a repository uniquely.
|
String |
getContentType()
The content type of the attachment.
|
GlobalId |
getGlobalId() |
Long |
getId() |
String |
getName()
The (file) name of the attachment
|
Note |
getNote() |
Set<AttachmentProperty> |
getProperties()
Properties
|
String |
getRepositoryIdentifier()
The repository identifier describes the repository the content to this resource is stored at.
|
Long |
getSize()
The size of the attachment in bytes.
|
AttachmentStatus |
getStatus()
The status of the attachment
|
Timestamp |
getUploadDate()
The date, the attachment was uploaded.
|
User |
getUploader() |
int |
hashCode()
Returns a hash code based on this entity's identifiers.
|
void |
setContentIdentifier(String contentIdentifier) |
void |
setContentType(String contentType) |
void |
setGlobalId(GlobalId globalId) |
void |
setId(Long id) |
void |
setName(String name) |
void |
setNote(Note note) |
void |
setProperties(Set<AttachmentProperty> properties) |
void |
setRepositoryIdentifier(String repositoryIdentifier) |
void |
setSize(Long size) |
void |
setStatus(AttachmentStatus status) |
void |
setUploadDate(Timestamp uploadDate) |
void |
setUploader(User uploader) |
public String attributesToString()
public boolean equals(Object object)
true
if the argument is an Attachment instance and all identifiers for
this entity equal the identifiers of the argument entity. Returns false
otherwise.public String getContentIdentifier()
The content identifier describes the resource for a repository uniquely. If the repository identifier is null the content identifier is an URL and the content identifier and uri will be equal
public String getContentType()
The content type of the attachment. It can be null in case the value has not been set yet. It must then be determined by the meta data.
public GlobalId getGlobalId()
getGlobalId
in interface GlobalIdentifiable
public Long getId()
public String getName()
The (file) name of the attachment
public Note getNote()
public Set<AttachmentProperty> getProperties()
Propertyable
Properties
getProperties
in interface Propertyable
public String getRepositoryIdentifier()
The repository identifier describes the repository the content to this resource is stored at. If it is NONE the repository is the world wide web
public Long getSize()
The size of the attachment in bytes. It is -1 if the size could not be determined.
public AttachmentStatus getStatus()
The status of the attachment
public Timestamp getUploadDate()
The date, the attachment was uploaded.
public User getUploader()
public int hashCode()
public void setContentIdentifier(String contentIdentifier)
public void setContentType(String contentType)
public void setGlobalId(GlobalId globalId)
setGlobalId
in interface GlobalIdentifiable
public void setId(Long id)
public void setName(String name)
public void setNote(Note note)
public void setProperties(Set<AttachmentProperty> properties)
public void setRepositoryIdentifier(String repositoryIdentifier)
public void setSize(Long size)
public void setStatus(AttachmentStatus status)
public void setUploadDate(Timestamp uploadDate)
public void setUploader(User uploader)
Copyright © 2019 Communote team. All rights reserved.