org.rapla.entities.domain
Interface Reservation

All Superinterfaces:
Classifiable, Entity, Named, Ownable, RaplaObject, Timestamp

public interface Reservation
extends Entity, RaplaObject, Classifiable, Named, Ownable, Timestamp

The Reservation interface is the central interface of Rapla. Objects implementing this interface are the courses or events to be scheduled. A Reservation consist of a group of appointments and a set of allocated resources (rooms, notebooks, ..) and persons. By default all resources and persons are allocated on every appointment. If you want to associate allocatable objects to special appointments use Restrictions.

See Also:
Classifiable, Appointment, Allocatable

Field Summary
static int MAX_RESERVATION_LENGTH
           
static Reservation[] RESERVATION_ARRAY
           
static RaplaType TYPE
           
 
Fields inherited from interface org.rapla.entities.Entity
ENTITY_ARRAY
 
Fields inherited from interface org.rapla.entities.dynamictype.Classifiable
CLASSIFIABLE_ARRAY
 
Method Summary
 void addAllocatable(Allocatable allocatable)
           
 void addAppointment(Appointment appointment)
           
 Appointment findAppointment(Appointment appointment)
          find an appointment in the reservation that equals the specified appointment.
 Allocatable[] getAllocatables()
           
 Appointment[] getAppointments()
          returns all appointments that are part off the reservation.
 Appointment[] getAppointmentsFor(Allocatable alloc)
          returns all appointments for an allocatable.
 Allocatable[] getPersons()
          returns all persons that are associated with the reservation.
 Allocatable[] getResources()
          returns all resources that are associated with the reservation.
 Allocatable[] getRestrictedAllocatables(Appointment appointment)
           
 Appointment[] getRestriction(Allocatable alloc)
           
 boolean hasAllocated(Allocatable alloc)
          returns if an the reservation has allocated the specified object.
 boolean hasAllocated(Allocatable alloc, Appointment appointment)
          returns if the allocatable is reserved on the specified appointment.
 void removeAllocatable(Allocatable allocatable)
           
 void removeAppointment(Appointment appointment)
           
 void setRestriction(Allocatable alloc, Appointment[] appointments)
          Restrict an allocation to one ore more appointments.
 
Methods inherited from interface org.rapla.entities.Entity
isIdentical, isPersistant
 
Methods inherited from interface org.rapla.entities.RaplaObject
getRaplaType
 
Methods inherited from interface org.rapla.entities.dynamictype.Classifiable
getClassification, setClassification
 
Methods inherited from interface org.rapla.entities.Named
getName
 
Methods inherited from interface org.rapla.entities.Ownable
getOwner, setOwner
 
Methods inherited from interface org.rapla.entities.Timestamp
getCreateTime, getLastChangedBy, getLastChangeTime
 

Field Detail

TYPE

static final RaplaType TYPE

MAX_RESERVATION_LENGTH

static final int MAX_RESERVATION_LENGTH
See Also:
Constant Field Values

RESERVATION_ARRAY

static final Reservation[] RESERVATION_ARRAY
Method Detail

addAppointment

void addAppointment(Appointment appointment)

removeAppointment

void removeAppointment(Appointment appointment)

getAppointments

Appointment[] getAppointments()
returns all appointments that are part off the reservation.


setRestriction

void setRestriction(Allocatable alloc,
                    Appointment[] appointments)
Restrict an allocation to one ore more appointments. By default all objects of a reservation are allocated on every appointment. Restrictions allow to model relations between allocatables and appointments. A resource or person is restricted if its connected to one or more appointments instead the whole reservation.


getRestriction

Appointment[] getRestriction(Allocatable alloc)

getAppointmentsFor

Appointment[] getAppointmentsFor(Allocatable alloc)
returns all appointments for an allocatable. This are either the restrictions, if there are any or all appointments

See Also:
getRestriction(org.rapla.entities.domain.Allocatable), getAppointments()

findAppointment

Appointment findAppointment(Appointment appointment)
find an appointment in the reservation that equals the specified appointment. This is usefull if you have the persistant version of an appointment and want to discover the editable appointment in the working copy of a reservation


addAllocatable

void addAllocatable(Allocatable allocatable)

removeAllocatable

void removeAllocatable(Allocatable allocatable)

getAllocatables

Allocatable[] getAllocatables()

getRestrictedAllocatables

Allocatable[] getRestrictedAllocatables(Appointment appointment)

hasAllocated

boolean hasAllocated(Allocatable alloc)
returns if an the reservation has allocated the specified object.


hasAllocated

boolean hasAllocated(Allocatable alloc,
                     Appointment appointment)
returns if the allocatable is reserved on the specified appointment.


getPersons

Allocatable[] getPersons()
returns all persons that are associated with the reservation. Need not necessarily to be users of the System.


getResources

Allocatable[] getResources()
returns all resources that are associated with the reservation.



Copyright © 2000-2006 Rapla Team. All Rights Reseserved.