Interface IPlan

All Superinterfaces:
IAdaptable, IChangeListener, IHasCustomValues, IHasValues, ILocatedObject, IPObject, IUniqueObject

public interface IPlan extends IUniqueObject, ILocatedObject
Since:
3.8.0
  • Field Details

  • Method Details

    • getName

      @Nullable String getName()
    • setName

      void setName(@Nullable String value)
    • getLabel

      @NotNull String getLabel()
      Returns label for the plan which is name or id.

      Never returns empty string or throws exception even when the Plan is unresolvable or the current user cannot read the name.
    • getDescription

      @Nullable Text getDescription()
    • setDescription

      void setDescription(@Nullable Text value)
    • getHomePageContent

      @Nullable Text getHomePageContent()
      Since:
      3.9.1
    • setHomePageContent

      void setHomePageContent(@Nullable Text value)
      Since:
      3.9.1
    • getRecords

      @NotNull List<IPlanRecord> getRecords()
    • addRecord

      @NotNull IPlanRecord addRecord(@NotNull IWorkItem item)
      If the record for given Work Item already exists than it is returned instead of creating a new one
    • removeRecord

      void removeRecord(@NotNull IWorkItem item)
      Removes all records for the given item (Normally only one record for each item is supported in Plan)
    • removeUnresolvableItems

      void removeUnresolvableItems()
      Removes records for unresolvable items.
    • getItems

      @NotNull LinkedHashSet<IWorkItem> getItems()
      The returned set does not contain null values.
    • getOrderedItems

      @NotNull List<IWorkItem> getOrderedItems()
      Returns child items from persisted object in the order that respects getPrioritizationField()
    • getResolvableItems

      @NotNull LinkedHashSet<IWorkItem> getResolvableItems()
      Returns items from the plan that are still exist. The iterator never returns null value. The result is computed using database which is faster, but ignores not saved changes in the Plan object.
    • getParent

      @Nullable IPlan getParent()
    • setParent

      void setParent(@Nullable IPlan value)
    • getStartDate

      @Nullable DateOnly getStartDate()
    • setStartDate

      void setStartDate(@Nullable DateOnly value)
    • getDueDate

      @Nullable DateOnly getDueDate()
    • setDueDate

      void setDueDate(@Nullable DateOnly value)
    • getStatus

      @Nullable IStatusOpt getStatus()
    • setStatus

      void setStatus(@Nullable IStatusOpt value)
    • getStartedOn

      @Nullable Date getStartedOn()
    • setStartedOn

      void setStartedOn(@Nullable Date value)
    • getFinishedOn

      @Nullable Date getFinishedOn()
    • setFinishedOn

      void setFinishedOn(@Nullable Date value)
    • getAllowedTypes

      @NotNull List<ITypeOpt> getAllowedTypes()
    • getPrioritizationField

      @Nullable String getPrioritizationField()
    • setPrioritizationField

      void setPrioritizationField(@Nullable String value)
    • getCalculationType

      @Nullable IEnumOption getCalculationType()
    • setCalculationType

      void setCalculationType(@Nullable IEnumOption value)
    • getEstimationField

      @Nullable String getEstimationField()
    • setEstimationField

      void setEstimationField(@Nullable String value)
    • getDefaultEstimate

      @Nullable Float getDefaultEstimate()
    • setDefaultEstimate

      void setDefaultEstimate(@Nullable Float value)
    • getCapacity

      @Nullable Float getCapacity()
    • setCapacity

      void setCapacity(@Nullable Float value)
    • getPreviousTimeSpent

      @Nullable DurationTime getPreviousTimeSpent()
    • setPreviousTimeSpent

      void setPreviousTimeSpent(@Nullable DurationTime value)
    • isTemplate

      boolean isTemplate()
    • setIsTemplate

      void setIsTemplate(boolean value)
    • getTemplate

      @Nullable IPlan getTemplate()
    • isUseReportFromTemplate

      boolean isUseReportFromTemplate()
      true indicates that Plan's Report (KEY_HOMEPAGECONTENT) from this Plan should be ignored and instead it should be read from the template (KEY_TEMPLATE). It is supported only for Rich Page Plans.
      Since:
      3.9.2
    • setUseReportFromTemplate

      void setUseReportFromTemplate(boolean value)
      Since:
      3.9.2
      See Also:
    • copyFromTemplate

      void copyFromTemplate(@NotNull IPlan template)
      Copies field values and wiki page with attachments from plan template (if the template is wiki based). If this plan is a template then copies all fields, otherwise copies fields in FIELDS_FROM_TEMPLATE (with exception of KEY_HOMEPAGECONTENT which is not copied when KEY_USE_REPORT_FROM_TEMPLATE is set to true) and sets the KEY_TEMPLATE field to the plan template.
      Parameters:
      template - the plan template
      Throws:
      IllegalArgumentException - if parameter template is not a template
    • getSortOrder

      @Nullable Integer getSortOrder()
    • setSortOrder

      void setSortOrder(@Nullable Integer value)
    • getColor

      @Nullable String getColor()
    • setColor

      void setColor(@Nullable String value)
    • getDecorationColor

      @NotNull String getDecorationColor()
      Returns the decoration color for this plan either directly from color field, or from color field of the template of this plan.
    • wasStarted

      boolean wasStarted()
      Returns true if plan status is different from initial (default) status, false otherwise.
      Returns:
      whether plan status is different from initial status
    • isFinished

      boolean isFinished()
      Returns true if plan is finished.
    • getAuthor

      @Nullable IUser getAuthor()
    • getCreated

      @Nullable Date getCreated()
    • getUpdated

      @Nullable Date getUpdated()
    • delete

      void delete()
    • getStatistics

      @NotNull IPlanStatistics getStatistics()
    • getPlannedEstimateForItem

      @Nullable Float getPlannedEstimateForItem(@NotNull IWorkItem item)
      Returns the planned estimate value for the given Work Item in this Plan - it is based on value of some field of the given work item depending on the configuration of this Plan. Default estimate value is returned when the given Work Item field is empty. Returned null value means that the given Work Item is not allowed in this Plan because of it's type and project span depending on the configuration of this Plan (headings are never allowed).
    • areValuesInHours

      boolean areValuesInHours()
      Returns true when this Plan is configured in such way that the getPlannedEstimateForItem(IWorkItem) method returns the values which are in hours.
    • getChildren

      @NotNull List<IPlan> getChildren()
      Returns children plans sorted the same way as in the UI - see DEFAULT_SORT
    • getCurrentDate

      @NotNull Date getCurrentDate()
      Returns 'now' if plan is from HEAD or time when plan's revision (or baseline revision) was created.
    • getIdealProgressFactor

      float getIdealProgressFactor(@NotNull Date date)
      Return ideal progress factor for the plan. Value is 0 at plan's start and is 1 at plan's end.
      Parameters:
      date - current date
    • getWikiContent

      @Nullable Text getWikiContent()
      Returns the wiki content of the plan
    • setWikiContent

      void setWikiContent(@Nullable Text content)
      Sets the wiki content of the plan
      Parameters:
      content - the wiki content to be set to the plan
    • getFinishedPlan

      @Nullable IPlan getFinishedPlan()
      Gets an IPlan state from the revision in which plan was finished
    • getProjectSpan

      @NotNull List<IProject> getProjectSpan()
      Returns project span of the plan. Project span defines from which project(s) Work Items can be planned. If returned project span is empty, then only Work Items from the project of this plan can be planned.
      Since:
      3.9.0
    • isRichPagePlan

      boolean isRichPagePlan()
      Returns:
      true if this Plan's report is Rich Page based. Always returns true if isUseReportFromTemplate() is true.
      Since:
      3.9.2