Package com.taskadapter.redmineapi.bean
Class Project
- java.lang.Object
-
- com.taskadapter.redmineapi.bean.Project
-
- All Implemented Interfaces:
Identifiable
,java.io.Serializable
public class Project extends java.lang.Object implements Identifiable, java.io.Serializable
Redmine's Project.- See Also:
- Serialized Form
-
-
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 IDstatic Property<java.lang.String>
DESCRIPTION
static Property<java.lang.String>
HOMEPAGE
static Property<java.lang.Boolean>
INHERIT_MEMBERS
static Property<java.lang.String>
NAME
Can contain any symbolsstatic Property<java.lang.Integer>
PARENT_DATABASE_ID
This is the *database ID*, not a String-based key.static Property<java.lang.Boolean>
PUBLIC
static Property<java.lang.String>
STRING_IDENTIFIER
String "identifier" (human-readable name without spaces and other extra stuff)static Property<java.util.Set<Tracker>>
TRACKERS
Trackers available for this projectstatic Property<java.util.Date>
UPDATED_ON
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addCustomFields(java.util.Collection<CustomField> customFields)
void
addTrackers(java.util.Collection<Tracker> trackers)
boolean
equals(java.lang.Object o)
java.util.Date
getCreatedOn()
CustomField
getCustomFieldById(int customFieldId)
java.util.Collection<CustomField>
getCustomFields()
java.lang.String
getDescription()
java.lang.String
getHomepage()
java.lang.Integer
getId()
java.lang.String
getIdentifier()
java.lang.Boolean
getInheritMembers()
java.lang.String
getName()
java.lang.Integer
getParentId()
Redmine's REST API "get project" operation does NOT return the parent project ID in redmine 1.1.2 (and maybe earlier).java.lang.Boolean
getProjectPublic()
Deprecated.PropertyStorage
getStorage()
Tracker
getTrackerByName(java.lang.String trackerName)
java.util.Collection<Tracker>
getTrackers()
java.util.Date
getUpdatedOn()
int
hashCode()
void
setCreatedOn(java.util.Date createdOn)
void
setDescription(java.lang.String description)
void
setHomepage(java.lang.String homepage)
void
setIdentifier(java.lang.String identifier)
void
setInheritMembers(java.lang.Boolean inheritMembers)
void
setName(java.lang.String name)
void
setParentId(java.lang.Integer parentId)
void
setProjectPublic(java.lang.Boolean projectPublic)
void
setUpdatedOn(java.util.Date updatedOn)
java.lang.String
toString()
-
-
-
Field Detail
-
DATABASE_ID
public static final Property<java.lang.Integer> DATABASE_ID
database ID
-
STRING_IDENTIFIER
public static final Property<java.lang.String> STRING_IDENTIFIER
String "identifier" (human-readable name without spaces and other extra stuff)
-
NAME
public static final Property<java.lang.String> NAME
Can contain any symbols
-
DESCRIPTION
public static final Property<java.lang.String> DESCRIPTION
-
HOMEPAGE
public static final Property<java.lang.String> HOMEPAGE
-
CREATED_ON
public static final Property<java.util.Date> CREATED_ON
-
UPDATED_ON
public static final Property<java.util.Date> UPDATED_ON
-
PARENT_DATABASE_ID
public static final Property<java.lang.Integer> PARENT_DATABASE_ID
This is the *database ID*, not a String-based key.
-
PUBLIC
public static final Property<java.lang.Boolean> PUBLIC
-
INHERIT_MEMBERS
public static final Property<java.lang.Boolean> INHERIT_MEMBERS
-
CUSTOM_FIELDS
public static final Property<java.util.Set<CustomField>> CUSTOM_FIELDS
-
-
Method Detail
-
getHomepage
public java.lang.String getHomepage()
-
setHomepage
public void setHomepage(java.lang.String homepage)
-
getIdentifier
public java.lang.String getIdentifier()
- Returns:
- project's string "key" (not a numeric database id!). Example: "project_ABC"
-
setIdentifier
public void setIdentifier(java.lang.String identifier)
-
getId
public java.lang.Integer getId()
- Specified by:
getId
in interfaceIdentifiable
- Returns:
- numeric database ID
-
getName
public java.lang.String getName()
- Returns:
- project name
-
setName
public void setName(java.lang.String name)
- Parameters:
name
- the project name
-
getTrackers
public java.util.Collection<Tracker> getTrackers()
- Returns:
- Trackers allowed in this project (e.g.: Bug, Feature, Support, Task, ...)
-
addTrackers
public void addTrackers(java.util.Collection<Tracker> trackers)
-
getTrackerByName
public Tracker getTrackerByName(java.lang.String trackerName)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getDescription
public java.lang.String getDescription()
-
setDescription
public void setDescription(java.lang.String description)
-
getCreatedOn
public java.util.Date getCreatedOn()
-
setCreatedOn
public void setCreatedOn(java.util.Date createdOn)
-
getUpdatedOn
public java.util.Date getUpdatedOn()
-
setUpdatedOn
public void setUpdatedOn(java.util.Date updatedOn)
-
getParentId
public java.lang.Integer getParentId()
Redmine's REST API "get project" operation does NOT return the parent project ID in redmine 1.1.2 (and maybe earlier). Which means calling getParentId() of the project loaded from Redmine server will return NULL with that redmine. This bug was fixed in redmine 1.2.1. See bug http://www.redmine.org/issues/8229- Returns:
- the parent project Id if it was set programmatically or NULL (!!!) if the project was loaded from the server.
-
setParentId
public void setParentId(java.lang.Integer parentId)
-
getProjectPublic
@Deprecated public java.lang.Boolean getProjectPublic()
Deprecated.- Returns:
- true if the project is public, false if the project is private.
Returns
null
if the project visibility was not specified or if the project was just retrieved from server. - Since:
- Redmine 2.6.0. see http://www.redmine.org/issues/17628 . this property is for writing only before Redmine 2.6.0. The value is not returned by older Redmine versions.
-
setInheritMembers
public void setInheritMembers(java.lang.Boolean inheritMembers)
-
getInheritMembers
public java.lang.Boolean getInheritMembers()
-
setProjectPublic
public void setProjectPublic(java.lang.Boolean projectPublic)
-
getCustomFields
public java.util.Collection<CustomField> getCustomFields()
-
addCustomFields
public void addCustomFields(java.util.Collection<CustomField> customFields)
-
getCustomFieldById
public CustomField getCustomFieldById(int customFieldId)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getStorage
public PropertyStorage getStorage()
-
-