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>
AUTHOR
static Property<java.lang.String>
CONTENT_TYPE
static Property<java.lang.String>
CONTENT_URL
static Property<java.util.Date>
CREATED_ON
static Property<java.lang.Integer>
DATABASE_ID
database numeric Idstatic Property<java.lang.String>
DESCRIPTION
static Property<java.lang.String>
FILE_NAME
static Property<java.lang.Long>
FILE_SIZE
static 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 void
delete()
delete the attachment with pre-configured ID from the server.boolean
equals(java.lang.Object o)
User
getAuthor()
java.lang.String
getContentType()
java.lang.String
getContentURL()
java.util.Date
getCreatedOn()
java.lang.String
getDescription()
Description is empty by default, not NULL.java.lang.String
getFileName()
java.lang.Long
getFileSize()
java.lang.Integer
getId()
PropertyStorage
getStorage()
java.lang.String
getToken()
int
hashCode()
Attachment
setAuthor(User author)
Attachment
setContentType(java.lang.String contentType)
Attachment
setContentURL(java.lang.String contentURL)
Attachment
setCreatedOn(java.util.Date createdOn)
Attachment
setDescription(java.lang.String description)
Attachment
setFileName(java.lang.String fileName)
Attachment
setFileSize(java.lang.Long fileSize)
Attachment
setId(java.lang.Integer id)
Attachment
setToken(java.lang.String token)
void
setTransport(Transport transport)
java.lang.String
toString()
-
-
-
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:
getId
in 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getStorage
public PropertyStorage getStorage()
-
delete
public void delete() throws RedmineException
delete 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:
setTransport
in interfaceFluentStyle
-
-