Package com.taskadapter.redmineapi.bean
Class Version
- java.lang.Object
-
- com.taskadapter.redmineapi.bean.Version
-
- All Implemented Interfaces:
FluentStyle
,Identifiable
public class Version extends java.lang.Object implements Identifiable, FluentStyle
Redmine's project versionREMARK: currently this is only used with Issues, so only id and name are filled
-
-
Field Summary
Fields Modifier and Type Field Description static Property<java.util.Date>
CREATED_ON
static Property<java.util.Set<CustomField>>
CUSTOM_FIELDS
static Property<java.lang.Integer>
DATABASE_ID
database numeric Idstatic Property<java.lang.String>
DESCRIPTION
static Property<java.util.Date>
DUE_DATE
static Property<java.lang.String>
NAME
static Property<java.lang.Integer>
PROJECT_ID
static Property<java.lang.String>
PROJECT_NAME
static Property<java.lang.String>
SHARING
static java.lang.String
SHARING_DESCENDANTS
static java.lang.String
SHARING_HIERARCHY
static java.lang.String
SHARING_NONE
static java.lang.String
SHARING_SYSTEM
static java.lang.String
SHARING_TREE
static Property<java.lang.String>
STATUS
static java.lang.String
STATUS_CLOSED
static java.lang.String
STATUS_LOCKED
static java.lang.String
STATUS_OPEN
static Property<java.util.Date>
UPDATED_ON
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Version
addCustomFields(java.util.Collection<CustomField> customFields)
Version
create()
void
delete()
boolean
equals(java.lang.Object o)
Version objects are considered to be equal if their IDs are not null and equal.java.util.Date
getCreatedOn()
CustomField
getCustomFieldById(int customFieldId)
java.util.Collection<CustomField>
getCustomFields()
java.lang.String
getDescription()
java.util.Date
getDueDate()
java.lang.Integer
getId()
java.lang.String
getName()
java.lang.Integer
getProjectId()
java.lang.String
getProjectName()
java.lang.String
getSharing()
java.lang.String
getStatus()
PropertyStorage
getStorage()
java.util.Date
getUpdatedOn()
int
hashCode()
Version
setCreatedOn(java.util.Date createdOn)
Version
setDescription(java.lang.String description)
Version
setDueDate(java.util.Date dueDate)
Version
setId(java.lang.Integer id)
Version
setName(java.lang.String name)
Version
setProjectId(java.lang.Integer projectId)
Version
setProjectName(java.lang.String name)
Version
setSharing(java.lang.String sharing)
Version
setStatus(java.lang.String status)
void
setTransport(Transport transport)
void
setUpdatedOn(java.util.Date updatedOn)
java.lang.String
toString()
void
update()
update this object on the server
-
-
-
Field Detail
-
STATUS_OPEN
public static final java.lang.String STATUS_OPEN
- See Also:
- Constant Field Values
-
STATUS_LOCKED
public static final java.lang.String STATUS_LOCKED
- See Also:
- Constant Field Values
-
STATUS_CLOSED
public static final java.lang.String STATUS_CLOSED
- See Also:
- Constant Field Values
-
SHARING_NONE
public static final java.lang.String SHARING_NONE
- See Also:
- Constant Field Values
-
SHARING_DESCENDANTS
public static final java.lang.String SHARING_DESCENDANTS
- See Also:
- Constant Field Values
-
SHARING_HIERARCHY
public static final java.lang.String SHARING_HIERARCHY
- See Also:
- Constant Field Values
-
SHARING_TREE
public static final java.lang.String SHARING_TREE
- See Also:
- Constant Field Values
-
SHARING_SYSTEM
public static final java.lang.String SHARING_SYSTEM
- See Also:
- Constant Field Values
-
DATABASE_ID
public static final Property<java.lang.Integer> DATABASE_ID
database numeric Id
-
PROJECT_ID
public static final Property<java.lang.Integer> PROJECT_ID
-
PROJECT_NAME
public static final Property<java.lang.String> PROJECT_NAME
-
NAME
public static final Property<java.lang.String> NAME
-
DESCRIPTION
public static final Property<java.lang.String> DESCRIPTION
-
STATUS
public static final Property<java.lang.String> STATUS
-
SHARING
public static final Property<java.lang.String> SHARING
-
DUE_DATE
public static final Property<java.util.Date> DUE_DATE
-
CREATED_ON
public static final Property<java.util.Date> CREATED_ON
-
UPDATED_ON
public static final Property<java.util.Date> UPDATED_ON
-
CUSTOM_FIELDS
public static final Property<java.util.Set<CustomField>> CUSTOM_FIELDS
-
-
Constructor Detail
-
Version
public Version()
-
Version
public Version(Transport transport, int projectId, java.lang.String name)
-
-
Method Detail
-
setId
public Version setId(java.lang.Integer id)
-
equals
public boolean equals(java.lang.Object o)
Version objects are considered to be equal if their IDs are not null and equal.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getCreatedOn
public java.util.Date getCreatedOn()
-
getDescription
public java.lang.String getDescription()
-
getDueDate
public java.util.Date getDueDate()
-
getId
public java.lang.Integer getId()
- Specified by:
getId
in interfaceIdentifiable
-
getProjectId
public java.lang.Integer getProjectId()
-
setProjectId
public Version setProjectId(java.lang.Integer projectId)
-
getProjectName
public java.lang.String getProjectName()
-
setProjectName
public Version setProjectName(java.lang.String name)
-
getName
public java.lang.String getName()
-
getSharing
public java.lang.String getSharing()
-
getStatus
public java.lang.String getStatus()
-
getUpdatedOn
public java.util.Date getUpdatedOn()
-
setCreatedOn
public Version setCreatedOn(java.util.Date createdOn)
-
setDescription
public Version setDescription(java.lang.String description)
-
setDueDate
public Version setDueDate(java.util.Date dueDate)
-
setName
public Version setName(java.lang.String name)
-
setSharing
public Version setSharing(java.lang.String sharing)
-
setStatus
public Version setStatus(java.lang.String status)
-
setUpdatedOn
public void setUpdatedOn(java.util.Date updatedOn)
-
getCustomFields
public java.util.Collection<CustomField> getCustomFields()
-
addCustomFields
public Version addCustomFields(java.util.Collection<CustomField> customFields)
-
getCustomFieldById
public CustomField getCustomFieldById(int customFieldId)
- Returns:
- the field with the given ID or NULL if the field is not found.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getStorage
public PropertyStorage getStorage()
-
create
public Version create() throws RedmineException
- Returns:
- the new
Version
created by Redmine - Throws:
java.lang.IllegalArgumentException
- thrown in case the version does not contain a project.RedmineAuthenticationException
- thrown in case something went wrong while trying to loginRedmineException
- thrown in case something went wrong in RedmineNotFoundException
- thrown in case an object can not be found
-
update
public void update() throws RedmineException
update this object on the server- Throws:
RedmineException
-
delete
public void delete() throws RedmineException
- Throws:
RedmineAuthenticationException
- thrown in case something went wrong while trying to loginRedmineException
- thrown in case something went wrong in RedmineNotFoundException
- thrown in case an object can not be found
-
setTransport
public void setTransport(Transport transport)
- Specified by:
setTransport
in interfaceFluentStyle
-
-