Interface IPlanningManager


public interface IPlanningManager
  • Field Details

  • Method Details

    • getDefaultWorkingCalendar

      IWorkingCalendar getDefaultWorkingCalendar()
      Returns default working calendar, that is global calendar with id DEFAULT_CALENDAR_ID.
      Returns:
      working calendar or null
    • getWorkingCalendarForUser

      IWorkingCalendar getWorkingCalendarForUser(String userId, boolean considerBase)
      Returns working calendar for given user.
      Parameters:
      userId - user id
      considerBase - read return base(global) calendar if there is no user calendar defined.
      Returns:
      working calendar or null
    • saveWorkingCalendar

      void saveWorkingCalendar(String userId, IWorkingCalendar calendar) throws Exception
      Saves calendar for given user. If the user is null, calendar is saved as global.
      Parameters:
      userId - user name
      calendar - working calendar
      Throws:
      Exception
    • getOneDayLength

      long getOneDayLength()
    • startUpdate

      void startUpdate()
    • isUpdateRunning

      boolean isUpdateRunning()
    • getCurrentUpdateJob

      IJob getCurrentUpdateJob()
      Returns non-null if and only if isUpdateRunning() returns true.
      Returns:
      not-yet-finished job or null
      Since:
      3.2.1
    • getPercentualProjectAssignment

      Integer getPercentualProjectAssignment(String userId, String projectId)
    • setPercentualProjectAssignment

      void setPercentualProjectAssignment(String userId, String projectId, Integer percent)
    • getPercentualProjectAssignments

      Map getPercentualProjectAssignments(String userId)
      Parameters:
      userId -
      Returns:
      Map<String, Integer> of projectId to percent (never returns null)
    • savePercentualProjectAssignments

      void savePercentualProjectAssignments(String userId, Map assignments)
      Parameters:
      userId -
      assignments - Map<String, Integer> of projectId to percent
    • getPlan

      @NotNull IPlan getPlan(@NotNull String projectId, @NotNull String id, @Nullable String revision)
      Returns Plan or Plan template from specified project with specified ID.
      Parameters:
      projectId - - ID of the project
      id - - Plan or Plan template ID
      revision - - revision of plan or plan template. If null then head.
      Returns:
      never returns null, but the returned Plan or Plan template might be unresolvable.
      Since:
      3.8.0
    • createPlan

      @NotNull IPlan createPlan(@NotNull String projectId, @NotNull String id)
      Creates a new (unpersisted) plan in given project with the given id. The plan will be persisted when its IPObject.save() method is called.

      Note: If new Plan is created then Plan template should be copied into new plan by IPlan.copyFromTemplate(IPlan)

      Parameters:
      projectId - - ID of the project
      id - - Plan or Plan template ID
      Returns:
      new (unpersisted) plan
      Since:
      3.8.0
    • searchPlans

      @NotNull List<IPlan> searchPlans(@Nullable String query, @Nullable String sort, int resultsLimit)
      Searches for Plans matching the query
      Parameters:
      query - - Lucene query
      sort - - sort order e.g. IPlan.DEFAULT_SORT
      resultsLimit - - the maximum number of records to be returned, -1 for no limit
      Returns:
      a IPObjectList containing the result of the query
      Since:
      3.8.0
      See Also:
    • enableEasyPlanningInProject

      @NotNull List<String> enableEasyPlanningInProject(@NotNull String projectId)
      Copies default configurations for Plans to the project.
      Parameters:
      projectId - - ID of the project
      Returns:
      list of report messages. Each subprocess generates report message (successful or error).
      Since:
      3.8.0
    • searchPlanTemplates

      @NotNull List<IPlan> searchPlanTemplates(@Nullable String query, @Nullable String sort, int resultsLimit)
      Searches for Plan templates matching the query
      Parameters:
      query - - Lucene query
      sort - - sort order - e.g. "created"
      resultsLimit - - the maximum number of records to be returned, -1 for no limit
      Returns:
      a IPObjectList containing the result of the query
      Since:
      3.8.0
      See Also: