org.rapla.facade
Interface QueryModule

All Known Subinterfaces:
ClientFacade

public interface QueryModule

Methods for quering the various entities of the backend

Version:
CVS $Revision: 1.59 $ $Date: 2006/01/25 22:48:37 $

Method Summary
 boolean canExchangeAllocatables(Reservation reservation)
          returns if the user is allowed to exchange the allocatables of this reservation.
 Allocatable[] getAllocatableBindings(Appointment appointment)
          returns all allocatables, that are already allocated by different parallel reservations at the time-slices, that are described by the appointment
 Allocatable[] getAllocatables()
          returns all readable allocatables, same as getAllocatables(null)
 Allocatable[] getAllocatables(ClassificationFilter[] filters)
          returns all allocatables that match the passed ClassificationFilter.
 Conflict[] getConflicts(Date startDate)
          returns all existing conflicts that are visible for the user conflicts, since the passed Date.
 Conflict[] getConflicts(Reservation reservation)
          returns all existing conflicts with the reservation
 DynamicType getDynamicType(String elementKey)
          returns the DynamicType with the passed elementKey
 DynamicType[] getDynamicTypes(String classificationType)
          returns all DynamicTypes matching the specified classification possible keys are reservation, person and resource.
 PeriodModel getPeriodModel()
          returns an Interface for accessing the periods
 Period[] getPeriods()
          returns all available periods
 Preferences getPreferences()
          returns the preferences for the login user
 Preferences getPreferences(User user)
          returns the preferences for the passed user, must be admin todo this.
 Reservation[] getReservations(Allocatable[] allocatables, Date start, Date end)
          returns all reservations that have allocated at least one Resource or Person that is part of the allocatables array.
 Reservation[] getReservations(User user, Date start, Date end, ClassificationFilter[] filters)
          returns the reservations of the specified user in the specified interval
 Category getSuperCategory()
          returns The root category.
 User getUser(String username)
          returns the user with the specified username
 Category getUserGroupsCategory()
          returns The category that contains the all user-groups of rapla
 User[] getUsers()
          returns all users
 boolean hasPermissionToAllocate(Appointment appointment, Allocatable allocatable)
          returns if the user has the permissions to change/create an allocation on the passed appointment.
 Date today()
          returns the current date in GMT+0 Timezone.
 

Method Detail

getDynamicTypes

DynamicType[] getDynamicTypes(String classificationType)
                              throws RaplaException
returns all DynamicTypes matching the specified classification possible keys are reservation, person and resource.

Throws:
RaplaException
See Also:
DynamicTypeAnnotations

getDynamicType

DynamicType getDynamicType(String elementKey)
                           throws RaplaException
returns the DynamicType with the passed elementKey

Throws:
RaplaException

getSuperCategory

Category getSuperCategory()
returns The root category.


getUserGroupsCategory

Category getUserGroupsCategory()
                               throws RaplaException
returns The category that contains the all user-groups of rapla

Throws:
RaplaException

getUsers

User[] getUsers()
                throws RaplaException
returns all users

Throws:
RaplaException

getUser

User getUser(String username)
             throws RaplaException
returns the user with the specified username

Throws:
RaplaException

getAllocatables

Allocatable[] getAllocatables(ClassificationFilter[] filters)
                              throws RaplaException
returns all allocatables that match the passed ClassificationFilter. If null all readable allocatables are returned

Throws:
RaplaException

getAllocatables

Allocatable[] getAllocatables()
                              throws RaplaException
returns all readable allocatables, same as getAllocatables(null)

Throws:
RaplaException

getReservations

Reservation[] getReservations(User user,
                              Date start,
                              Date end,
                              ClassificationFilter[] filters)
                              throws RaplaException
returns the reservations of the specified user in the specified interval

Parameters:
user - A user-object or null for all users
start - only reservations beginning after the start-date will be returned (can be null).
end - only reservations beginning before the end-date will be returned (can be null).
filters - you can specify classificationfilters or null for all reservations .
Throws:
RaplaException

getReservations

Reservation[] getReservations(Allocatable[] allocatables,
                              Date start,
                              Date end)
                              throws RaplaException
returns all reservations that have allocated at least one Resource or Person that is part of the allocatables array.

Parameters:
allocatables - only reservations that allocate at least on element of this array will be returned.
start - only reservations beginning after the start-date will be returned (can be null).
end - only reservations beginning before the end-date will be returned (can be null).
Throws:
RaplaException

getPeriods

Period[] getPeriods()
                    throws RaplaException
returns all available periods

Throws:
RaplaException

getPeriodModel

PeriodModel getPeriodModel()
                           throws RaplaException
returns an Interface for accessing the periods

Throws:
RaplaException

today

Date today()
returns the current date in GMT+0 Timezone. If rapla operates in multi-user mode, the date should be calculated from the server date.


getAllocatableBindings

Allocatable[] getAllocatableBindings(Appointment appointment)
                                     throws RaplaException
returns all allocatables, that are already allocated by different parallel reservations at the time-slices, that are described by the appointment

Throws:
RaplaException

getConflicts

Conflict[] getConflicts(Reservation reservation)
                        throws RaplaException
returns all existing conflicts with the reservation

Throws:
RaplaException

getConflicts

Conflict[] getConflicts(Date startDate)
                        throws RaplaException
returns all existing conflicts that are visible for the user conflicts, since the passed Date. If startDate is null all conflicts are shown.

Throws:
RaplaException

hasPermissionToAllocate

boolean hasPermissionToAllocate(Appointment appointment,
                                Allocatable allocatable)
returns if the user has the permissions to change/create an allocation on the passed appointment. Changes of an existing appointment that are in an permisable timeframe are allowed. Example: The extension of an exisiting appointment, doesn't affect allocations in the past and should not create a conflict with the permissions.


getPreferences

Preferences getPreferences(User user)
                           throws RaplaException
returns the preferences for the passed user, must be admin todo this.

Throws:
RaplaException

getPreferences

Preferences getPreferences()
                           throws RaplaException
returns the preferences for the login user

Throws:
RaplaException

canExchangeAllocatables

boolean canExchangeAllocatables(Reservation reservation)
returns if the user is allowed to exchange the allocatables of this reservation. A user can do it if he has at least admin privileges for one allocatable. He can only exchange or remove or insert allocatables he has admin privileges on. The User cannot change appointments.



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