public class ResourceScheduler
extends java.lang.Object
| Modifier and Type | Method and Description | 
|---|---|
| java.util.List<TimeSlot> | getAvailability(java.lang.String resourceXML,
               long from,
               long to)Gets the available time slots for a datetime range for each resource referenced
 within the given resource XML record. | 
| java.util.List<TimeSlot> | getAvailability(UtilisationResource uResource,
               long from,
               long to)Gets the available time slots for a datetime range for each resource referenced
 within the given resource XML record. | 
| protected java.util.List | getCalendarEntriesForCase(java.lang.String caseID)Gets a list of all calendar entries for a case | 
| protected java.util.Set<java.lang.Long> | getCalendarEntryIDsForCase(java.lang.String caseID)Gets the set of all calendar entry ids for a case | 
| static ResourceScheduler | getInstance()Gets an instance of this ResourceScheduler object | 
| java.lang.String | getReservations(java.lang.String resourceXML,
               long from,
               long to)Gets all the utilisation plans in which a resource is involved for the specified
 period | 
| java.util.Set<UtilisationPlan> | getReservations(UtilisationResource uResource,
               long from,
               long to)Gets the set of utilisation plans in which a resource is involved for the specified
 period | 
| protected void | notifyStatusChange(CalendarEntry calEntry)Builds an appropriate data set and announces a status change for a calendar record. | 
| protected boolean | reassignEntryIfPossible(CalendarEntry entry,
                       boolean updating)Seeks another AbstractResource that meets the original UtilisationResource
 parameters and is available, and if found reassigns the calendar entry to the
 found resource. | 
| java.lang.String | saveReservations(java.lang.String planXML,
                java.lang.String agent,
                boolean checkOnly)Saves and/or updates the reservations contained in a utilisation plan | 
| UtilisationPlan | saveReservations(UtilisationPlan plan,
                java.lang.String agent,
                boolean checkOnly)Saves and/or updates the reservations contained in a utilisation plan | 
public static ResourceScheduler getInstance()
public java.lang.String saveReservations(java.lang.String planXML,
                                         java.lang.String agent,
                                         boolean checkOnly)
planXML - an XML reresentation of a utilisation planagent - the user id of the user or service that generated the plancheckOnly - if true, checks if the reservations would succeed only, makes no
 changespublic UtilisationPlan saveReservations(UtilisationPlan plan, java.lang.String agent, boolean checkOnly)
plan - the utilisation planagent - the user id of the user or service that generated the plancheckOnly - if true, checks if the reservations would succeed only, makes no
 changespublic java.lang.String getReservations(java.lang.String resourceXML,
                                        long from,
                                        long to)
resourceXML - an XML representation of a utilisation resource object,
 containing reference(s) to the resources to get plans forfrom - the start of the date/time rangeto - the end of the date/time rangepublic java.util.Set<UtilisationPlan> getReservations(UtilisationResource uResource, long from, long to)
uResource - a utilisation resource object, containing references to the
 resource(s) to get plans forfrom - the start of the date/time rangeto - the end of the date/time rangepublic java.util.List<TimeSlot> getAvailability(java.lang.String resourceXML, long from, long to)
resourceXML - an XML String equivalent of a UtilisationResource recordfrom - the start of the date/time rangeto - the end of the date/time rangepublic java.util.List<TimeSlot> getAvailability(UtilisationResource uResource, long from, long to)
uResource - a UtilisationResource record referencing resource(s)from - the start of the date/time rangeto - the end of the date/time rangeprotected boolean reassignEntryIfPossible(CalendarEntry entry, boolean updating)
entry - the CalendarEntry containing a reference to a resource that is no
 longer available, but may be replaced by another resource of the same role,
 capability or categoryupdating - true if the caller is updating an existing calendar entry, false
 if it is a new entryprotected java.util.Set<java.lang.Long> getCalendarEntryIDsForCase(java.lang.String caseID)
caseID - the id of case to get the entry ids forprotected java.util.List getCalendarEntriesForCase(java.lang.String caseID)
caseID - the id of case to get the entry ids forprotected void notifyStatusChange(CalendarEntry calEntry)
calEntry - the calendar record that has had a status changeCopyright © 2004-2014 The YAWL Foundation.