Class CalendarBucketService
java.lang.Object
overit.geocallapp.wfm.roughplanning.bl.bucket.BucketService
overit.geocallapp.wfm.roughplanning.bl.bucket.CalendarBucketService
- Direct Known Subclasses:
CalendarDailyBucketService,CalendarMonthlyBucketService,CalendarWeeklyBucketService
The CalendarBucketService is the extension of
BucketService
using a calendar approach- Since:
- 19.0
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCalendarBucketService(Long roughPlanning, TimeUnit timeUnit, Long timeSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleancanBucketBeCreated(Date startBucketDate, Date endDate) It establishes whether a bucket can be createdcreateBuckets(Date startDate, Date endDate) It creates buckets in respect of the input dates and time unit and size which management is delegated to the class implementing the particular serviceprotected abstract DategetEndBucketDate(Date startBucketDate) Returns an end date for the bucket creationprotected abstract DategetInitialStartBucketDate(Date startDate) Returns an initial date for the bucket creationMethods inherited from class overit.geocallapp.wfm.roughplanning.bl.bucket.BucketService
getRoughPlanning, getTimeSize, getTimeUnit
-
Constructor Details
-
CalendarBucketService
-
-
Method Details
-
createBuckets
public Collection<BORoughPlanningBucket> createBuckets(Date startDate, Date endDate) throws DAValidateException It creates buckets in respect of the input dates and time unit and size which management is delegated to the class implementing the particular service- Specified by:
createBucketsin classBucketService- Parameters:
startDate- start date to create buckets fromendDate- end date to create buckets to- Returns:
- a collection of
BORoughPlanningBucket - Throws:
DAValidateException
-
canBucketBeCreated
It establishes whether a bucket can be created- Parameters:
startBucketDate- starting bucket dateendDate- upper limit end date to establish that a bucket can be created- Returns:
- a boolean
-
getEndBucketDate
Returns an end date for the bucket creation- Parameters:
startBucketDate- starting bucket date- Returns:
- a date
-
getInitialStartBucketDate
Returns an initial date for the bucket creation- Parameters:
startDate- the lower limit for buckets creation- Returns:
- a date
-