public interface AgendaAdminSession extends OsidSession
This session creates, updates, and deletes Agendas.
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
Agenda,
an AgendaForm
is requested using
getAgendaFormForCreate()
specifying the desired record
Types
or none if no record Types
are needed.
The returned AgendaForm
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 the AgendaForm
is submiited to
a create operation, it cannot be reused with another create operation
unless the first operation was unsuccessful. Each AgendaForm
corresponds to an attempted transaction.
For updates, AgendaForms
are requested to the
Agenda
Id
that is to be updated using
getAgendaFormForUpdate().
Similarly, the AgendaForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The AgendaForm
can
only be used once for a successful update and cannot be reused.
The delete operations delete Agendas.
To unmap an
Agenda
from the current Engine,
the
AgendaEngineAssignmentSession
should be used. These delete
operations attempt to remove the Agenda
itself thus
removing it from all known Engine
catalogs.
This session includes an Id
aliasing mechanism to
assign an external Id
to an internally assigned Id.
Modifier and Type | Method and Description |
---|---|
void |
aliasAgenda(Id agendaId,
Id aliasId)
Adds an
Id to an Agenda for the purpose
of creating compatibility. |
boolean |
canCreateAgendas()
Tests if this user can create
Agendas. |
boolean |
canCreateAgendaWithRecordTypes(Type[] agendaRecordTypes)
Tests if this user can create a single
Agenda using the
desired record types. |
boolean |
canDeleteAgendas()
Tests if this user can delete
Agendas. |
boolean |
canManageAgendaAliases()
Tests if this user can manage
Id aliases for
Agendas. |
boolean |
canUpdateAgendas()
Tests if this user can update
Agendas. |
Agenda |
createAgenda(AgendaForm agendaForm)
Creates a new
Agenda. |
void |
deleteAgenda(Id agendaId)
Deletes an
Agenda. |
AgendaForm |
getAgendaFormForCreate(Type[] agendaRecordTypes)
Gets the agenda form for creating new agendas.
|
AgendaForm |
getAgendaFormForUpdate(Id agendaId)
Gets the agenda form for updating an existing agenda.
|
Engine |
getEngine()
Gets the
Engine associated with this session. |
Id |
getEngineId()
Gets the
Engine Id associated with this
session. |
void |
updateAgenda(AgendaForm agendaForm)
Updates an existing agenda.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getEngineId()
Engine
Id
associated with this
session. Engine Id
associated with this sessionmandatory
- This method must be implemented. Engine getEngine() throws OperationFailedException, PermissionDeniedException
Engine
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateAgendas()
Agendas.
A return of true
does not guarantee successful authorization. A return of false
indicates that it is known creating an Agenda
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer create operations to
an unauthorized user. false
if Agenda
creation is not
authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateAgendaWithRecordTypes(Type[] agendaRecordTypes)
Agenda
using the
desired record types. While
RulesCheckManager.getAgendaRecordTypes()
can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific Agenda.
Providing
an empty array tests if an Agenda
can be created with
no records.agendaRecordTypes
- array of agenda record types true
if Agenda
creation using
the specified record Types
is supported,
false
otherwiseNullArgumentException
- agendaRecordTypes
is null
mandatory
- This method must be implemented. AgendaForm getAgendaFormForCreate(Type[] agendaRecordTypes) throws OperationFailedException, PermissionDeniedException
agendaRecordTypes
- array of agenda record typesNullArgumentException
- agendaRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. Agenda createAgenda(AgendaForm agendaForm) throws OperationFailedException, PermissionDeniedException
Agenda.
agendaForm
- the form for this Agenda
Agenda
IllegalStateException
- agendaForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- agendaForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- agendaForm
did
not originate from getAgendaFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateAgendas()
Agendas.
A return of true
does not guarantee successful authorization. A return of false
indicates that it is known updating an Agenda
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer update operations to
an unauthorized user. false
if Agenda
modification is
not authorized, true
otherwisemandatory
- This method must be implemented. AgendaForm getAgendaFormForUpdate(Id agendaId) throws NotFoundException, OperationFailedException
agendaId
- the Id
of the Agenda
NotFoundException
- agendaId
is not
foundNullArgumentException
- agendaId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void updateAgenda(AgendaForm agendaForm) throws OperationFailedException, PermissionDeniedException
agendaForm
- the form containing the elements to be updatedIllegalStateException
- agendaForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- agendaForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- agendaForm
did
not originate from getAgendaFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteAgendas()
Agendas.
A return of true
does not guarantee successful authorization. A return of false
indicates that it is known deleting an Agenda
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer delete operations to
an unauthorized user. false
if Agenda
deletion is not
authorized, true
otherwisemandatory
- This method must be implemented. void deleteAgenda(Id agendaId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Agenda.
agendaId
- the Id
of the Agenda
to
removeNotFoundException
- agendaId
not foundNullArgumentException
- agendaId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageAgendaAliases()
Id
aliases for
Agendas.
A return of true does not guarantee successful
authorization. A return of false indicates that it is known changing
an alias will result in a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false
if Agenda
aliasing is not
authorized, true
otherwisemandatory
- This method must be implemented. void aliasAgenda(Id agendaId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to an Agenda
for the purpose
of creating compatibility. The primary Id
of the
Agenda
is determined by the provider. The new Id
performs as an alias to the primary Id.
If the
alias is a pointer to another agenda, it is reassigned to the given
agenda Id.
agendaId
- the Id
of an Agenda
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- agendaId
not foundNullArgumentException
- agendaId
or
aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.