Milestone

public class Milestone

Milestones represent windows of time in which certain criteria, treatments, courses, etc. should be fulfilled before moving on to the next milestone. Each milestone contains windows in which alerts will be raised.

Constructors

Milestone

public Milestone()

Creates Milestone.

Milestone

public Milestone(String name, Period earliest, Period due, Period late, Period max)

Creates Milestone with the name attribute set to name. The earliest, due, late and max attributes are used to create milestoneWindows.

Parameters:
  • name – the name of the milestone
  • earliest – the duration of the earliest window
  • due – the duration of the due window
  • late – the duration of the late window
  • max – the duration of the max window

Methods

addAlert

public void addAlert(WindowName windowName, Alert... alertList)

getAlerts

public List<Alert> getAlerts()

Returns all the alerts from all milestone windows.

Returns:the list of the alerts

getData

public Map<String, String> getData()

getMaximumDuration

public Period getMaximumDuration()

Returns the maximum duration of the milestone.

Returns:the maximum milestone duration.

getMilestoneWindow

public MilestoneWindow getMilestoneWindow(WindowName windowName)

getMilestoneWindows

public List<MilestoneWindow> getMilestoneWindows()

getName

public String getName()

getSchedule

public Schedule getSchedule()

getWindowDuration

public Period getWindowDuration(WindowName windowName)

Returns the duration of the milestone window with the given name.

Parameters:
  • windowName – the name of the milestone window
Returns:

the the duration of the time window

getWindowEnd

public Period getWindowEnd(WindowName windowName)

Returns the period required to end the milestone window with the given name.

Parameters:
  • windowName – the name of the milestone window
Returns:

the period required to end the milestone window

getWindowStart

public Period getWindowStart(WindowName windowName)

Returns the period required to start the milestone window with the given name.

Parameters:
  • windowName – the name of the milestone window
Returns:

the period required to start the milestone window

setData

public void setData(Map<String, String> data)

setSchedule

public void setSchedule(Schedule schedule)

windowElapsed

public boolean windowElapsed(WindowName windowName, DateTime milestoneStartDateTime)

Returns true when the milestone window with the given name elapsed, false otherwise.

Parameters:
  • windowName – tne name of the milestone window
  • milestoneStartDateTime – the milestone start date and time
Returns:

true when the milestone window elapsed, otherwise false