com.atlassian.greenhopper.web.rapid.view.workingdays
Class WorkingDaysHelper

java.lang.Object
  extended by com.atlassian.greenhopper.web.rapid.view.workingdays.WorkingDaysHelper

@Service
public class WorkingDaysHelper
extends java.lang.Object


Field Summary
static java.lang.String DEFAULT_REGION_KEY
          The key used for the "system default" region.
 
Constructor Summary
WorkingDaysHelper()
           
 
Method Summary
 ServiceOutcome<WorkingDaysConfig> addNonWorkingDay(com.atlassian.crowd.embedded.api.User user, WorkingDaysResource.NonWorkingDayRequest nonWorkingDayRequest)
          Add a day off
 TimeZoneEditModel buildTimeZoneEditModel(com.atlassian.crowd.embedded.api.User user, WorkingDaysConfig workingDaysConfig, boolean canEdit)
          Buidls the time zone edit model
 ServiceOutcome<WorkingDaysConfigModel> getWorkDaysConfigModel(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Build a configuration model for the working days configuration
 ServiceOutcome<WorkingDaysConfig> removeNonWorkingDay(com.atlassian.crowd.embedded.api.User user, WorkingDaysResource.NonWorkingDayRequest nonWorkingDayRequest)
          Remove a day off
 ServiceOutcome<WorkingDaysConfig> updateTimeZone(com.atlassian.crowd.embedded.api.User user, java.lang.Long rapidViewId, java.lang.String timeZoneId)
          Update the timezone for a given rapid view
 ServiceOutcome<WeekDaysModel> updateWeekDays(com.atlassian.crowd.embedded.api.User user, WeekDaysModel weekDaysModel)
          update the off days
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_REGION_KEY

public static final java.lang.String 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:
Constant Field Values
Constructor Detail

WorkingDaysHelper

public WorkingDaysHelper()
Method Detail

getWorkDaysConfigModel

public ServiceOutcome<WorkingDaysConfigModel> getWorkDaysConfigModel(com.atlassian.crowd.embedded.api.User user,
                                                                     RapidView rapidView)
Build a configuration model for the working days configuration


buildTimeZoneEditModel

public TimeZoneEditModel buildTimeZoneEditModel(com.atlassian.crowd.embedded.api.User 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.crowd.embedded.api.User user,
                                                        java.lang.Long rapidViewId,
                                                        java.lang.String timeZoneId)
Update the timezone for a given rapid view


updateWeekDays

public ServiceOutcome<WeekDaysModel> updateWeekDays(com.atlassian.crowd.embedded.api.User user,
                                                    WeekDaysModel weekDaysModel)
update the off days


addNonWorkingDay

public ServiceOutcome<WorkingDaysConfig> addNonWorkingDay(com.atlassian.crowd.embedded.api.User user,
                                                          WorkingDaysResource.NonWorkingDayRequest nonWorkingDayRequest)
Add a day off


removeNonWorkingDay

public ServiceOutcome<WorkingDaysConfig> removeNonWorkingDay(com.atlassian.crowd.embedded.api.User user,
                                                             WorkingDaysResource.NonWorkingDayRequest nonWorkingDayRequest)
Remove a day off



Copyright © 2007-2014 Atlassian. All Rights Reserved.