Class 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 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
      • TRACKERS

        public static final Property<java.util.Set<Tracker>> TRACKERS
        Trackers available for this project
    • 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 interface Identifiable
        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 class java.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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object