Class WorkingDaysHelper
java.lang.Object
com.atlassian.greenhopper.web.rapid.view.workingdays.WorkingDaysHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The key used for the "system default" region. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNonWorkingDay
(com.atlassian.jira.user.ApplicationUser user, WorkingDaysResource.NonWorkingDayRequest nonWorkingDayRequest) Add a day offbuildTimeZoneEditModel
(com.atlassian.jira.user.ApplicationUser user, WorkingDaysConfig workingDaysConfig, boolean canEdit) Buidls the time zone edit modelgetWorkDaysConfigModel
(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView) Build a configuration model for the working days configurationremoveNonWorkingDay
(com.atlassian.jira.user.ApplicationUser user, WorkingDaysResource.NonWorkingDayRequest nonWorkingDayRequest) Remove a day offupdateTimeZone
(com.atlassian.jira.user.ApplicationUser user, Long rapidViewId, String timeZoneId) Update the timezone for a given rapid viewupdateWeekDays
(com.atlassian.jira.user.ApplicationUser user, WeekDaysModel weekDaysModel) update the off days
-
Field Details
-
DEFAULT_REGION_KEY
The key used for the "system default" region. We add a fake region + a fake timezone for the system default to allow the client side to handle this option like any other region/timezone option.- See Also:
-
-
Constructor Details
-
WorkingDaysHelper
public WorkingDaysHelper()
-
-
Method Details
-
getWorkDaysConfigModel
public ServiceOutcome<WorkingDaysConfigModel> getWorkDaysConfigModel(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView) Build a configuration model for the working days configuration -
buildTimeZoneEditModel
public TimeZoneEditModel buildTimeZoneEditModel(com.atlassian.jira.user.ApplicationUser user, WorkingDaysConfig workingDaysConfig, boolean canEdit) Buidls the time zone edit model- Parameters:
canEdit
- if the user can't edit we don't have to return the complete timezone edit data
-
updateTimeZone
public ServiceOutcome<WorkingDaysConfig> updateTimeZone(com.atlassian.jira.user.ApplicationUser user, Long rapidViewId, String timeZoneId) Update the timezone for a given rapid view -
updateWeekDays
public ServiceOutcome<WeekDaysModel> updateWeekDays(com.atlassian.jira.user.ApplicationUser user, WeekDaysModel weekDaysModel) update the off days -
addNonWorkingDay
public ServiceOutcome<WorkingDaysConfig> addNonWorkingDay(com.atlassian.jira.user.ApplicationUser user, WorkingDaysResource.NonWorkingDayRequest nonWorkingDayRequest) Add a day off -
removeNonWorkingDay
public ServiceOutcome<WorkingDaysConfig> removeNonWorkingDay(com.atlassian.jira.user.ApplicationUser user, WorkingDaysResource.NonWorkingDayRequest nonWorkingDayRequest) Remove a day off
-