public interface AppointmentBatchAdminSession extends AppointmentAdminSession
This session creates, updates, and deletes Appointments
in bulk. The data for create and update is provided by the consumer via
the form object. OsidForms
are requested for each create or
update and may not be reused.
Create and update operations differ in their usage. To create an
Appointment,
an AppointmentForm
is requested
using getAppointmentFormsForCreate()
specifying the desired
position, person, record Types
or none if no record
Types
are needed. Each of the returned AppointmentForms
will indicate that it is to be used with a create operation and
can be used to examine metdata or validate data prior to creation. Once an
AppointmentForm
is submiited to a create operation, it
cannot be reused with another create operation unless the first operation
was unsuccessful. Each AppointmentForm
corresponds to an
attempted transaction.
The AppointmentForms
returned from
getAppointmentFormsForCreate()
may be linked to the originating
request through the peer Ids
of the AppointmentForm.
In the case where there may be duplicates, any
AppointmentForm
of the same peer Ids
may be used
for a create operation.
Once a batch of AppointmentForms
are submitted for
create, a CreateResponse
is returned for each
AppointmentForm,
although the ordering is not defined. Only errors
that pertain to the entire create operation are returned from
createAppointments(),
errors specific to an individual
AppointmentForm
are indicated in the corresponding
CreateResponse.
CreateResponses
may be linked to
the originating AppointmentForm
through the
AppointmentForm
Id
.
For updates, AppointmentForms
are requested to the
Appointment
Id
that is to be updated using
getAppointmentFormsForUpdate()
where the reference
Id
in the AppointmentForm
may be used to link the
request. Similarly, the AppointmentForm
has metadata about
the data that can be updated and it can perform validation before
submitting the update. The AppointmentForm
can only be used
once for a successful update and cannot be reused.
Once a batch of AppointmentForms
are submitted for
update, an UpdateResponse
is returned for each
AppointmentForm,
although the ordering is not defined. Only errors
that pertain to the entire update operation are returned from
updateAppointments(),
errors specific to an individual
AppointmentForm
are indicated in the corresponding
UpdateResponse.
UpdateResponses
may be linked to
the originating AppointmentForm
through the
AppointmentForm
Id.
The delete operations delete Appointments
in bulk. To
unmap an Appointment
from the current Realm,
the AppointmentRealmAssignmentSession
should be used. These
delete operations attempt to remove the Appointment
itself
thus removing it from all known Realm
catalogs. Bulk delete
operations return the results in DeleteResponses.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasAppointments(AliasRequestList aliasRequests)
Adds an
Id to an Appointment for the
purpose of creating compatibility. |
CreateResponseList |
createAppointments(AppointmentBatchFormList appointmentForms)
Creates a new set of
Appointments. |
DeleteResponseList |
deleteAllAppointments()
Deletes all
Appointments in this Realm . |
DeleteResponseList |
deleteAppointments(IdList appointmentIds)
Deletes appointments for the given
Ids. |
DeleteResponseList |
deleteAppointmentsForPerson(Id personId)
Deletes appointments for the given person.
|
DeleteResponseList |
deleteAppointmentsForPosition(Id positionId)
Deletes appointments for the given position.
|
DeleteResponseList |
deleteIneffectiveAppointmentsByDate(DateTime date)
Deletes appointments expired before the given date.
|
AppointmentBatchFormList |
getAppointmentFormsForCreate(AppointmentPeerList peers,
Type[] appointmentRecordTypes)
Gets the appointment forms for creating a bunch of new appointments.
|
AppointmentBatchFormList |
getAppointmentFormsForUpdate(IdList appointmentIds)
Gets the appointment forms for updating an existing set of
appointments.
|
UpdateResponseList |
updateAppointments(AppointmentBatchFormList appointmentForms)
Updates existing appointments.
|
aliasAppointment, canCreateAppointments, canCreateAppointmentWithRecordTypes, canDeleteAppointments, canManageAppointmentAliases, canUpdateAppointments, createAppointment, deleteAppointment, getAppointmentFormForCreate, getAppointmentFormForUpdate, getRealm, getRealmId, updateAppointment
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
AppointmentBatchFormList getAppointmentFormsForCreate(AppointmentPeerList peers, Type[] appointmentRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers
- the relationship peersappointmentRecordTypes
- array of appointment record types to be
included in each create operation or an empty list if noneNotFoundException
- a personId
or
positionId
is not foundNullArgumentException
- peers
or
appointmentRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createAppointments(AppointmentBatchFormList appointmentForms) throws OperationFailedException, PermissionDeniedException
Appointments.
This method returns
an error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse
.appointmentForms
- the appointment formsNullArgumentException
- appointmentForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AppointmentBatchFormList getAppointmentFormsForUpdate(IdList appointmentIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
appointmentIds
- the Ids
of the
Appointment
NotFoundException
- an appointmentId
is
not foundNullArgumentException
- appointmentIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateAppointments(AppointmentBatchFormList appointmentForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.appointmentForms
- the form containing the elements to be
updatedNullArgumentException
- appointmentForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllAppointments() throws OperationFailedException, PermissionDeniedException
Appointments
in this Realm
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAppointments(IdList appointmentIds) throws OperationFailedException, PermissionDeniedException
Ids.
appointmentIds
- the Ids
of the appointments to
deleteNullArgumentException
- appointmentIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAppointmentsForPerson(Id personId) throws OperationFailedException, PermissionDeniedException
personId
- an Id
of a personNullArgumentException
- personId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAppointmentsForPosition(Id positionId) throws OperationFailedException, PermissionDeniedException
positionId
- an Id
of a positionNullArgumentException
- positionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteIneffectiveAppointmentsByDate(DateTime date) throws OperationFailedException, PermissionDeniedException
date
- a dateNullArgumentException
- date
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasAppointments(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to an Appointment
for the
purpose of creating compatibility. The primary Id
of
the Appointment
is determined by the provider. The new
Id
is an alias to the primary Id.
If the
alias is a pointer to another appointment, it is reassigned to the
given appointment Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.