Package com.polarion.alm.tracker
Interface IPlanningManager
public interface IPlanningManager
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreatePlan
(String projectId, String id) Creates a new (unpersisted) plan in given project with the given id.enableEasyPlanningInProject
(String projectId) Copies default configurations for Plans to the project.Returns non-null if and only ifisUpdateRunning()
returnstrue
.Returns default working calendar, that is global calendar with idDEFAULT_CALENDAR_ID
.long
getPercentualProjectAssignment
(String userId, String projectId) Returns Plan or Plan template from specified project with specified ID.getWorkingCalendarForUser
(String userId, boolean considerBase) Returns working calendar for given user.boolean
void
savePercentualProjectAssignments
(String userId, Map assignments) void
saveWorkingCalendar
(String userId, IWorkingCalendar calendar) Saves calendar for given user.searchPlans
(String query, String sort, int resultsLimit) Searches for Plans matching the querysearchPlanTemplates
(String query, String sort, int resultsLimit) Searches for Plan templates matching the queryvoid
setPercentualProjectAssignment
(String userId, String projectId, Integer percent) void
-
Field Details
-
DEFAULT_CALENDAR_ID
- See Also:
-
ONE_HOUR_MILLIS
static final long ONE_HOUR_MILLIS- See Also:
-
UPDATEPLAN_CALC_ID
Deprecated.updateplan calculation should not be used- See Also:
-
-
Method Details
-
getDefaultWorkingCalendar
IWorkingCalendar getDefaultWorkingCalendar()Returns default working calendar, that is global calendar with idDEFAULT_CALENDAR_ID
.- Returns:
- working calendar or
null
-
getWorkingCalendarForUser
Returns working calendar for given user.- Parameters:
userId
- user idconsiderBase
- read return base(global) calendar if there is no user calendar defined.- Returns:
- working calendar or
null
-
saveWorkingCalendar
Saves calendar for given user. If the user is null, calendar is saved as global.- Parameters:
userId
- user namecalendar
- working calendar- Throws:
Exception
-
getOneDayLength
long getOneDayLength() -
startUpdate
void startUpdate() -
isUpdateRunning
boolean isUpdateRunning() -
getCurrentUpdateJob
IJob getCurrentUpdateJob()Returns non-null if and only ifisUpdateRunning()
returnstrue
.- Returns:
- not-yet-finished job or
null
- Since:
- 3.2.1
-
getPercentualProjectAssignment
-
setPercentualProjectAssignment
-
getPercentualProjectAssignments
- Parameters:
userId
-- Returns:
- Map<String, Integer> of projectId to percent (never returns null)
-
savePercentualProjectAssignments
- Parameters:
userId
-assignments
- Map<String, Integer> of projectId to percent
-
getPlan
Returns Plan or Plan template from specified project with specified ID.- Parameters:
projectId
- - ID of the projectid
- - Plan or Plan template IDrevision
- - revision of plan or plan template. Ifnull
then head.- Returns:
- never returns
null
, but the returned Plan or Plan template might be unresolvable. - Since:
- 3.8.0
-
createPlan
Creates a new (unpersisted) plan in given project with the given id. The plan will be persisted when itsIPObject.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 projectid
- - Plan or Plan template ID- Returns:
- new (unpersisted) plan
- Since:
- 3.8.0
-
searchPlans
Searches for Plans matching the query- Parameters:
query
- - Lucene querysort
- - the format is same as forIIndexSearch.sort(String)
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
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 querysort
- - the format is same as forIIndexSearch.sort(String)
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:
-