Interface AppointmentRealmAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Appointments to
Bilings . An Appointment may map to multiple
Realms and removing the last reference to an Appointment is the
equivalent of deleting it. Each Realm may have its own
authorizations governing who is allowed to operate on it.
Adding a reference of an Appointment to another Realm
is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignAppointmentToRealm(Id appointmentId, Id realmId) Adds an existingAppointmentto aRealm.booleanTests if this user can alter appointment/realm mappings.booleancanAssignAppointmentsToRealm(Id realmId) Tests if this user can alter appointment/realm mappings.getAssignableRealmIds(Id realmId) Gets a list of realms including and under the given realm node in which any appointment can be assigned.getAssignableRealmIdsForAppointment(Id realmId, Id appointmentId) Gets a list of realms including and under the given realm node in which a specific appointment can be assigned.voidreassignAppointmentToRealm(Id appointmentId, Id fromRealmId, Id toRealmId) Moves anAppointmentfrom oneRealmto another.voidunassignAppointmentFromRealm(Id appointmentId, Id realmId) Removes anAppointmentfrom aRealm.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignAppointments
boolean canAssignAppointments()Tests if this user can alter appointment/realm mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignAppointmentsToRealm
Tests if this user can alter appointment/realm mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Parameters:
realmId- theIdof theRealm- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-realmIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableRealmIds
Gets a list of realms including and under the given realm node in which any appointment can be assigned.- Parameters:
realmId- theIdof theRealm- Returns:
- list of assignable realm
Ids - Throws:
NullArgumentException-realmIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableRealmIdsForAppointment
IdList getAssignableRealmIdsForAppointment(Id realmId, Id appointmentId) throws OperationFailedException Gets a list of realms including and under the given realm node in which a specific appointment can be assigned.- Parameters:
realmId- theIdof theRealmappointmentId- theIdof theAppointment- Returns:
- list of assignable realm
Ids - Throws:
NullArgumentException-realmIdorappointmentIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignAppointmentToRealm
void assignAppointmentToRealm(Id appointmentId, Id realmId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingAppointmentto aRealm.- Parameters:
appointmentId- theIdof theAppointmentrealmId- theIdof theRealm- Throws:
AlreadyExistsException-appointmentIdalready assigned torealmIdNotFoundException-appointmentIdorrealmIdnot foundNullArgumentException-appointmentIdorrealmIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignAppointmentFromRealm
void unassignAppointmentFromRealm(Id appointmentId, Id realmId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anAppointmentfrom aRealm.- Parameters:
appointmentId- theIdof theAppointmentrealmId- theIdof theRealm- Throws:
NotFoundException-appointmentIdorrealmIdnot found orappointmentIdnot mapped torealmIdNullArgumentException-appointmentIdorrealmIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignAppointmentToRealm
void reassignAppointmentToRealm(Id appointmentId, Id fromRealmId, Id toRealmId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves anAppointmentfrom oneRealmto another. Mappings to otherRealmsare unaffected.- Parameters:
appointmentId- theIdof theAppointmentfromRealmId- theIdof the currentRealmtoRealmId- theIdof the destinationRealm- Throws:
AlreadyExistsException-appointmentIdalready assigned totoRealmIdNotFoundException-appointmentId, fromRealmId, ortoRealmIdnot found orappointmentIdnot mapped tofromRealmIdNullArgumentException-appointmentId, fromRealmId, ortoRealmIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-