com.atlassian.greenhopper.service.team
Class NonWorkingDaysServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.team.NonWorkingDaysServiceImpl
All Implemented Interfaces:
NonWorkingDaysService

@Service(value="gh-nonWorkingDaysService")
public class NonWorkingDaysServiceImpl
extends java.lang.Object
implements NonWorkingDaysService

Encapsulates some code previously located in the actions. Do not use except for working days editing


Field Summary
 
Fields inherited from interface com.atlassian.greenhopper.service.team.NonWorkingDaysService
SERVICE
 
Constructor Summary
NonWorkingDaysServiceImpl()
           
 
Method Summary
 ErrorCollection addNonWorkingDay(com.opensymphony.user.User user, Backlog backlog, org.joda.time.DateMidnight date)
          Add a non working day to the backlog (in fact it adds it to the project, but the date needs to be inside the range of the backlog).
 java.util.Set<org.joda.time.DateMidnight> getNonWorkingDays(com.opensymphony.user.User user, Backlog backlog)
          Get all non working days for a given backlog.
 java.util.Set<org.joda.time.DateMidnight> getNonWorkingDays(com.opensymphony.user.User user, Backlog backlog, ProjectConfiguration configuration)
           
 java.util.Set<org.joda.time.DateMidnight> getProjectDefinedNonWorkingDays(com.opensymphony.user.User user, Backlog backlog, ProjectConfiguration configuration)
          Returns the non working days that are defined against the project (as opposed to the general configuration).
 ErrorCollection removeNonWorkingDay(com.opensymphony.user.User user, Backlog backlog, org.joda.time.DateMidnight date)
          Remove a non working day from the backlog (in fact it removes it from the project, but the date needs to be inside the range of the backlog).
 boolean supportsNonWorkingDays(Backlog backlog)
          Returns whether the backlog supports non working days.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonWorkingDaysServiceImpl

public NonWorkingDaysServiceImpl()
Method Detail

getNonWorkingDays

public java.util.Set<org.joda.time.DateMidnight> getNonWorkingDays(com.opensymphony.user.User user,
                                                                   Backlog backlog)
Description copied from interface: NonWorkingDaysService
Get all non working days for a given backlog. Only dates inside the date range set by the backlog are returned

Specified by:
getNonWorkingDays in interface NonWorkingDaysService

getNonWorkingDays

public java.util.Set<org.joda.time.DateMidnight> getNonWorkingDays(com.opensymphony.user.User user,
                                                                   Backlog backlog,
                                                                   ProjectConfiguration configuration)
Specified by:
getNonWorkingDays in interface NonWorkingDaysService

getProjectDefinedNonWorkingDays

public java.util.Set<org.joda.time.DateMidnight> getProjectDefinedNonWorkingDays(com.opensymphony.user.User user,
                                                                                 Backlog backlog,
                                                                                 ProjectConfiguration configuration)
Description copied from interface: NonWorkingDaysService
Returns the non working days that are defined against the project (as opposed to the general configuration).

Specified by:
getProjectDefinedNonWorkingDays in interface NonWorkingDaysService

supportsNonWorkingDays

public boolean supportsNonWorkingDays(Backlog backlog)
Description copied from interface: NonWorkingDaysService
Returns whether the backlog supports non working days. In old code this was called "isReleasable", which is misleading.

Specified by:
supportsNonWorkingDays in interface NonWorkingDaysService

addNonWorkingDay

public ErrorCollection addNonWorkingDay(com.opensymphony.user.User user,
                                        Backlog backlog,
                                        org.joda.time.DateMidnight date)
Add a non working day to the backlog (in fact it adds it to the project, but the date needs to be inside the range of the backlog).

Specified by:
addNonWorkingDay in interface NonWorkingDaysService

removeNonWorkingDay

public ErrorCollection removeNonWorkingDay(com.opensymphony.user.User user,
                                           Backlog backlog,
                                           org.joda.time.DateMidnight date)
Remove a non working day from the backlog (in fact it removes it from the project, but the date needs to be inside the range of the backlog).

Specified by:
removeNonWorkingDay in interface NonWorkingDaysService


Copyright © 2007-2011 Atlassian. All Rights Reserved.