|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--kiurubeans.KiuruReservation
This class encapsulates actual making of reservations and getting information about already made reservations.
| Field Summary | |
static int |
REQUEST_STATE_CANCELLED
Reservation was made and then cancelled |
static int |
REQUEST_STATE_CONFIRMED
Reservation is made and confirmed. |
static int |
REQUEST_STATE_PROCESSING
Reservation is being processed. |
static int |
REQUEST_STATE_REMOVED
Somebody removed reservation. |
static int |
REQUEST_STATE_REQUEST
Reservation request |
| Constructor Summary | |
KiuruReservation()
Default constructor |
|
| Method Summary | |
static java.util.ArrayList |
acceptReservationRequests(java.lang.String[] reservations)
Changes states of specified reservation requests into reservations |
static void |
addPersonToReservation(int personID,
int reservationID)
Adds person as a contact person into a reservation |
static boolean |
assignPersonsToReservation(int cPerson,
int resMaker,
java.lang.Integer[] reservations)
Assigns persons to a reservation |
static boolean |
checkUsersReservationRights(int reservationId,
User user)
Checks if given user has access to modify reservation (or anything administrial) |
static int[] |
getEventAndEventGroupId(int reservationId)
Returns EventID and EventGroupID of given reservation in int array. |
static int[] |
getEventAndEventGroupId(java.lang.String reservationId)
Returns EventID and EventGroupID of given reservation in int array. |
static int |
getEventId(int reservationId)
Returns eventid of given reservation |
static int |
getEventId(java.lang.String reservationId)
Returns eventid of given reservation |
static int |
getReservationPerson(int reservationId)
Returns contact person of given reservation |
static int |
getReservationPerson(java.lang.String reservationId)
Returns contact person of given reservation |
static java.lang.String |
getReservationState(int eventId,
int spaceId)
Returns state for current reservation, or empty string if there is no reservation. |
static boolean |
isReservationOk(int eventId)
Determines if there is reservation for given event. |
static boolean |
isReservationOk(int eventId,
int spaceId)
Determines if given event is reserved (+confirmed) at given space. |
static boolean |
isReserved(int spaceId,
int eventId)
Checks if given space is reserved or free. |
static java.lang.Integer[] |
makeReservation(int spaceId,
java.lang.Integer[] eventIds,
int organisationId,
int payOrganisationId,
int requestState,
java.lang.String reservationInfo,
User user)
Makes reservations to given space for given event |
static int |
makeReservation(int spaceId,
int eventId,
int organisationId,
int requestState,
java.lang.String reservationInfo,
User user)
Makes reservation to given space for given event |
static int |
makeReservation(int spaceId,
int eventId,
int organisationId,
java.lang.String reservationInfo,
User user)
Makes reservation to given space for given event |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int REQUEST_STATE_REQUEST
public static final int REQUEST_STATE_PROCESSING
public static final int REQUEST_STATE_CONFIRMED
public static final int REQUEST_STATE_CANCELLED
public static final int REQUEST_STATE_REMOVED
| Constructor Detail |
public KiuruReservation()
| Method Detail |
public static boolean assignPersonsToReservation(int cPerson,
int resMaker,
java.lang.Integer[] reservations)
cPerson - personID of the contact person for the reservationresMaker - personID of the person who actually made the reservationreservations - Array of Integers containing reservationIDs.
true if no exceptions were thrown.
public static boolean isReserved(int spaceId,
int eventId)
throws java.lang.Exception
spaceId - Id of spaceeventId - Time interval to be checked
java.lang.Exception - If something went wrong in query
public static int makeReservation(int spaceId,
int eventId,
int organisationId,
int requestState,
java.lang.String reservationInfo,
User user)
throws java.lang.Exception
spaceId - Space that is going to be reserved.eventId - Event that is going to be held.organisationId - Organisation that is arranging the event.requestState - If the reservation is final or proposition.reservationInfo - Additional infouser - Who is making the reservation
java.lang.Exception - If something went wrong in database update
public static int makeReservation(int spaceId,
int eventId,
int organisationId,
java.lang.String reservationInfo,
User user)
throws java.lang.Exception
spaceId - Space that is going to be reserved.eventId - Event that is going to be held.organisationId - Organisation that is arranging the event.reservationInfo - Additional infouser - Who is making the reservation
java.lang.Exception - If something went wrong in database update
public static java.lang.Integer[] makeReservation(int spaceId,
java.lang.Integer[] eventIds,
int organisationId,
int payOrganisationId,
int requestState,
java.lang.String reservationInfo,
User user)
throws java.lang.Exception
spaceId - Space that is going to be reserved.eventIds - Events that are going to be held.organisationId - Organisation that is arranging the event.reservationInfo - Additional infouser - Who is making the reservationrequestState - If the reservation is final or proposition.payOrganisationId - Organisation that is paying the event.
java.lang.Exception - If something went wrong in database update
public static void addPersonToReservation(int personID,
int reservationID)
throws java.lang.Exception
personID - Id of the contact personreservationID - Id of the reservation
java.lang.Exception - If something went wrong during database update
public static java.lang.String getReservationState(int eventId,
int spaceId)
spaceId - Id of space where reservation is made toeventId - Id of the event that deals with reservation
public static boolean isReservationOk(int eventId,
int spaceId)
eventId - Id of event that is checkedspaceId - Id of space where event should occur.
public static boolean isReservationOk(int eventId)
eventId - Id of given event
public static int getReservationPerson(java.lang.String reservationId)
throws java.lang.Exception
reservationId - Id of reservation as String
java.lang.Exception - If something went wrong in database query
public static int getReservationPerson(int reservationId)
throws java.lang.Exception
reservationId - ReservationId
java.lang.Exception - If something went wrong in database querypublic static int getEventId(java.lang.String reservationId)
reservationId - Id of the given reservation
public static int getEventId(int reservationId)
reservationId - Id of the given reservation
public static int[] getEventAndEventGroupId(java.lang.String reservationId)
throws java.lang.Exception
reservationId - Id of reservation as String
java.lang.Exception - If something went wrong in database query
public static int[] getEventAndEventGroupId(int reservationId)
throws java.lang.Exception
reservationId - Id of reservation
java.lang.Exception - If something went wrong in database query
public static boolean checkUsersReservationRights(int reservationId,
User user)
reservationId - Id of reservation to be checkeduser - User who tries to modify reservation
public static java.util.ArrayList acceptReservationRequests(java.lang.String[] reservations)
reservations - Array of Strings containing reservationIDs we are accepting.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||