Interface AppointmentRealmAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AppointmentRealmAssignmentSession extends 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 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignAppointmentsToRealm

      boolean canAssignAppointmentsToRealm(Id realmId)
      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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      realmId - the Id of the Realm
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - realmId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableRealmIds

      IdList getAssignableRealmIds(Id realmId) throws OperationFailedException
      Gets a list of realms including and under the given realm node in which any appointment can be assigned.
      Parameters:
      realmId - the Id of the Realm
      Returns:
      list of assignable realm Ids
      Throws:
      NullArgumentException - realmId is null
      OperationFailedException - 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 - the Id of the Realm
      appointmentId - the Id of the Appointment
      Returns:
      list of assignable realm Ids
      Throws:
      NullArgumentException - realmId or appointmentId is null
      OperationFailedException - 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 existing Appointment to a Realm .
      Parameters:
      appointmentId - the Id of the Appointment
      realmId - the Id of the Realm
      Throws:
      AlreadyExistsException - appointmentId already assigned to realmId
      NotFoundException - appointmentId or realmId not found
      NullArgumentException - appointmentId or realmId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignAppointmentFromRealm

      void unassignAppointmentFromRealm(Id appointmentId, Id realmId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an Appointment from a Realm .
      Parameters:
      appointmentId - the Id of the Appointment
      realmId - the Id of the Realm
      Throws:
      NotFoundException - appointmentId or realmId not found or appointmentId not mapped to realmId
      NullArgumentException - appointmentId or realmId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignAppointmentToRealm

      void reassignAppointmentToRealm(Id appointmentId, Id fromRealmId, Id toRealmId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves an Appointment from one Realm to another. Mappings to other Realms are unaffected.
      Parameters:
      appointmentId - the Id of the Appointment
      fromRealmId - the Id of the current Realm
      toRealmId - the Id of the destination Realm
      Throws:
      AlreadyExistsException - appointmentId already assigned to toRealmId
      NotFoundException - appointmentId, fromRealmId , or toRealmId not found or appointmentId not mapped to fromRealmId
      NullArgumentException - appointmentId, fromRealmId , or toRealmId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.