Interface AgendaAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasAgenda(Id agendaId, Id aliasId) Adds anIdto anAgendafor the purpose of creating compatibility.booleanTests if this user can createAgendas.booleancanCreateAgendaWithRecordTypes(Type[] agendaRecordTypes) Tests if this user can create a singleAgendausing the desired record types.booleanTests if this user can deleteAgendas.booleanTests if this user can manageIdaliases forAgendas.booleanTests if this user can updateAgendas.createAgenda(AgendaForm agendaForm) Creates a newAgenda.voiddeleteAgenda(Id agendaId) Deletes anAgenda.getAgendaFormForCreate(Type[] agendaRecordTypes) Gets the agenda form for creating new agendas.getAgendaFormForUpdate(Id agendaId) Gets the agenda form for updating an existing agenda.Gets theEngineassociated with this session.Gets theEngineIdassociated with this session.voidupdateAgenda(AgendaForm agendaForm) Updates an existing agenda.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
-
getEngineId
Id getEngineId()Gets theEngineIdassociated with this session.- Returns:
- the
Engine Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getEngine
Gets theEngineassociated with this session.- Returns:
- the engine
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateAgendas
boolean canCreateAgendas()Tests if this user can createAgendas. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anAgendawill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifAgendacreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateAgendaWithRecordTypes
Tests if this user can create a singleAgendausing the desired record types. WhileRulesCheckManager.getAgendaRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAgenda. Providing an empty array tests if anAgendacan be created with no records.- Parameters:
agendaRecordTypes- array of agenda record types- Returns:
trueifAgendacreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-agendaRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getAgendaFormForCreate
AgendaForm getAgendaFormForCreate(Type[] agendaRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the agenda form for creating new agendas. A new form should be requested for each create transaction.- Parameters:
agendaRecordTypes- array of agenda record types- Returns:
- the agenda form
- Throws:
NullArgumentException-agendaRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createAgenda
Agenda createAgenda(AgendaForm agendaForm) throws OperationFailedException, PermissionDeniedException Creates a newAgenda.- Parameters:
agendaForm- the form for thisAgenda- Returns:
- the new
Agenda - Throws:
IllegalStateException-agendaFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-agendaFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-agendaFormdid not originate fromgetAgendaFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateAgendas
boolean canUpdateAgendas()Tests if this user can updateAgendas. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAgendawill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifAgendamodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getAgendaFormForUpdate
Gets the agenda form for updating an existing agenda. A new agenda form should be requested for each update transaction.- Parameters:
agendaId- theIdof theAgenda- Returns:
- the agenda form
- Throws:
NotFoundException-agendaIdis not foundNullArgumentException-agendaIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
updateAgenda
Updates an existing agenda.- Parameters:
agendaForm- the form containing the elements to be updated- Throws:
IllegalStateException-agendaFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-agendaFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-agendaFormdid not originate fromgetAgendaFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteAgendas
boolean canDeleteAgendas()Tests if this user can deleteAgendas. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAgendawill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifAgendadeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteAgenda
void deleteAgenda(Id agendaId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anAgenda.- Parameters:
agendaId- theIdof theAgendato remove- Throws:
NotFoundException-agendaIdnot foundNullArgumentException-agendaIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageAgendaAliases
boolean canManageAgendaAliases()Tests if this user can manageIdaliases forAgendas. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifAgendaaliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasAgenda
void aliasAgenda(Id agendaId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anAgendafor the purpose of creating compatibility. The primaryIdof theAgendais determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another agenda, it is reassigned to the given agendaId.- Parameters:
agendaId- theIdof anAgendaaliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-agendaIdnot foundNullArgumentException-agendaIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-