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_ONstatic Property<java.util.Set<CustomField>>CUSTOM_FIELDSstatic Property<java.lang.Integer>DATABASE_IDdatabase numeric Idstatic Property<java.lang.String>DESCRIPTIONstatic Property<java.util.Date>DUE_DATEstatic Property<java.lang.String>NAMEstatic Property<java.lang.Integer>PROJECT_IDstatic Property<java.lang.String>PROJECT_NAMEstatic Property<java.lang.String>SHARINGstatic java.lang.StringSHARING_DESCENDANTSstatic java.lang.StringSHARING_HIERARCHYstatic java.lang.StringSHARING_NONEstatic java.lang.StringSHARING_SYSTEMstatic java.lang.StringSHARING_TREEstatic Property<java.lang.String>STATUSstatic java.lang.StringSTATUS_CLOSEDstatic java.lang.StringSTATUS_LOCKEDstatic java.lang.StringSTATUS_OPENstatic Property<java.util.Date>UPDATED_ON
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VersionaddCustomFields(java.util.Collection<CustomField> customFields)Versioncreate()voiddelete()booleanequals(java.lang.Object o)Version objects are considered to be equal if their IDs are not null and equal.java.util.DategetCreatedOn()CustomFieldgetCustomFieldById(int customFieldId)java.util.Collection<CustomField>getCustomFields()java.lang.StringgetDescription()java.util.DategetDueDate()java.lang.IntegergetId()java.lang.StringgetName()java.lang.IntegergetProjectId()java.lang.StringgetProjectName()java.lang.StringgetSharing()java.lang.StringgetStatus()PropertyStoragegetStorage()java.util.DategetUpdatedOn()inthashCode()VersionsetCreatedOn(java.util.Date createdOn)VersionsetDescription(java.lang.String description)VersionsetDueDate(java.util.Date dueDate)VersionsetId(java.lang.Integer id)VersionsetName(java.lang.String name)VersionsetProjectId(java.lang.Integer projectId)VersionsetProjectName(java.lang.String name)VersionsetSharing(java.lang.String sharing)VersionsetStatus(java.lang.String status)voidsetTransport(Transport transport)voidsetUpdatedOn(java.util.Date updatedOn)java.lang.StringtoString()voidupdate()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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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:
getIdin 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:
toStringin classjava.lang.Object
-
getStorage
public PropertyStorage getStorage()
-
create
public Version create() throws RedmineException
- Returns:
- the new
Versioncreated 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 RedmineExceptionupdate 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:
setTransportin interfaceFluentStyle
-
-