Package com.taskadapter.redmineapi.bean
Class Attachment
- java.lang.Object
-
- com.taskadapter.redmineapi.bean.Attachment
-
- All Implemented Interfaces:
FluentStyle,Identifiable
public class Attachment extends java.lang.Object implements Identifiable, FluentStyle
File Attachment for a Redmine issue
-
-
Field Summary
Fields Modifier and Type Field Description static Property<User>AUTHORstatic Property<java.lang.String>CONTENT_TYPEstatic Property<java.lang.String>CONTENT_URLstatic Property<java.util.Date>CREATED_ONstatic Property<java.lang.Integer>DATABASE_IDdatabase numeric Idstatic Property<java.lang.String>DESCRIPTIONstatic Property<java.lang.String>FILE_NAMEstatic Property<java.lang.Long>FILE_SIZEstatic Property<java.lang.String>TOKEN
-
Constructor Summary
Constructors Constructor Description Attachment(Transport transport)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()delete the attachment with pre-configured ID from the server.booleanequals(java.lang.Object o)UsergetAuthor()java.lang.StringgetContentType()java.lang.StringgetContentURL()java.util.DategetCreatedOn()java.lang.StringgetDescription()Description is empty by default, not NULL.java.lang.StringgetFileName()java.lang.LonggetFileSize()java.lang.IntegergetId()PropertyStoragegetStorage()java.lang.StringgetToken()inthashCode()AttachmentsetAuthor(User author)AttachmentsetContentType(java.lang.String contentType)AttachmentsetContentURL(java.lang.String contentURL)AttachmentsetCreatedOn(java.util.Date createdOn)AttachmentsetDescription(java.lang.String description)AttachmentsetFileName(java.lang.String fileName)AttachmentsetFileSize(java.lang.Long fileSize)AttachmentsetId(java.lang.Integer id)AttachmentsetToken(java.lang.String token)voidsetTransport(Transport transport)java.lang.StringtoString()
-
-
-
Field Detail
-
DATABASE_ID
public static final Property<java.lang.Integer> DATABASE_ID
database numeric Id
-
FILE_NAME
public static final Property<java.lang.String> FILE_NAME
-
FILE_SIZE
public static final Property<java.lang.Long> FILE_SIZE
-
CONTENT_TYPE
public static final Property<java.lang.String> CONTENT_TYPE
-
CONTENT_URL
public static final Property<java.lang.String> CONTENT_URL
-
DESCRIPTION
public static final Property<java.lang.String> DESCRIPTION
-
CREATED_ON
public static final Property<java.util.Date> CREATED_ON
-
TOKEN
public static final Property<java.lang.String> TOKEN
-
-
Constructor Detail
-
Attachment
public Attachment(Transport transport)
-
-
Method Detail
-
setId
public Attachment setId(java.lang.Integer id)
-
getId
public java.lang.Integer getId()
- Specified by:
getIdin interfaceIdentifiable- Returns:
- id. NULL for attachments not added to Redmine yet.
-
getContentType
public java.lang.String getContentType()
-
setContentType
public Attachment setContentType(java.lang.String contentType)
-
getContentURL
public java.lang.String getContentURL()
-
setContentURL
public Attachment setContentURL(java.lang.String contentURL)
-
getDescription
public java.lang.String getDescription()
Description is empty by default, not NULL.
-
setDescription
public Attachment setDescription(java.lang.String description)
-
getCreatedOn
public java.util.Date getCreatedOn()
-
setCreatedOn
public Attachment setCreatedOn(java.util.Date createdOn)
-
getAuthor
public User getAuthor()
-
setAuthor
public Attachment setAuthor(User author)
-
getFileName
public java.lang.String getFileName()
-
setFileName
public Attachment setFileName(java.lang.String fileName)
-
getFileSize
public java.lang.Long getFileSize()
-
setFileSize
public Attachment setFileSize(java.lang.Long fileSize)
-
getToken
public java.lang.String getToken()
-
setToken
public Attachment setToken(java.lang.String token)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getStorage
public PropertyStorage getStorage()
-
delete
public void delete() throws RedmineExceptiondelete the attachment with pre-configured ID from the server.
see http://www.redmine.org/issues/14828- Throws:
RedmineException- Since:
- Redmine 3.3.0
-
setTransport
public void setTransport(Transport transport)
- Specified by:
setTransportin interfaceFluentStyle
-
-