Interface ConvocationAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
ConvocationBatchAdminSession
This session creates, updates, and deletes Convocations . 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 a
Convocation , a ConvocationForm is requested using
getConvocationFormForCreate() specifying the desired record Types
or none if no record Types are needed. The returned
ConvocationForm 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 ConvocationForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each ConvocationForm corresponds
to an attempted transaction.
For updates, ConvocationForms are requested to the
Convocation Id that is to be updated using
getConvocationFormForUpdate() . Similarly, the ConvocationForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The ConvocationForm can
only be used once for a successful update and cannot be reused.
The delete operations delete Convocations . To unmap a
Convocation from the current Academy , the
ConvocationAcademyAssignmentSession should be used. These delete
operations attempt to remove the Convocation itself thus removing
it from all known Academy catalogs.
This session includes an Id aliasing mechanism to assign an
external Id to an internally assigned Id.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasConvocation(Id convocationId, Id aliasId) Adds anIdto aConvocationfor the purpose of creating compatibility.booleanTests if this user can create convocations.booleancanCreateConvocationWithRecordTypes(Type[] convocationRecordTypes) Tests if this user can create a singleConvocationusing the desired record types.booleanTests if this user can delete convocations.booleanTests if this user can manageIdaliases forConvocations.booleanTests if this user can update convocations.createConvocation(ConvocationForm convocationForm) Creates a newConvocation.voiddeleteConvocation(Id convocationId) Deletes aConvocation.Gets theAcademyassociated with this session.Gets theAcademyIdassociated with this session.getConvocationFormForCreate(Type[] convocationRecordTypes) Gets the convocation form for creating new convocations.getConvocationFormForUpdate(Id convocationId) Gets the convocation form for updating an existing convocation.voidupdateConvocation(ConvocationForm convocationForm) Updates an existing convocation.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
-
getAcademyId
Id getAcademyId()Gets theAcademyIdassociated with this session.- Returns:
- the
Academy Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getAcademy
Gets theAcademyassociated with this session.- Returns:
- the academy
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateConvocations
boolean canCreateConvocations()Tests if this user can create convocations. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aConvocationwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.- Returns:
falseifConvocationcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateConvocationWithRecordTypes
Tests if this user can create a singleConvocationusing the desired record types. WhileRecognitionManager.getConvocationRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificConvocation. Providing an empty array tests if aConvocationcan be created with no records.- Parameters:
convocationRecordTypes- array of convocation record types- Returns:
trueifConvocationcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-convocationRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getConvocationFormForCreate
ConvocationForm getConvocationFormForCreate(Type[] convocationRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the convocation form for creating new convocations. A new form should be requested for each create transaction.- Parameters:
convocationRecordTypes- array of convocation record types- Returns:
- the convocation form
- Throws:
NullArgumentException-convocationRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createConvocation
Convocation createConvocation(ConvocationForm convocationForm) throws OperationFailedException, PermissionDeniedException Creates a newConvocation.- Parameters:
convocationForm- the form for thisConvocation- Returns:
- the new
Convocation - Throws:
IllegalStateException-convocationFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-convocationFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-convocationFormdid not originate fromgetConvocationFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateConvocations
boolean canUpdateConvocations()Tests if this user can update convocations. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aConvocationwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.- Returns:
falseifConvocationmodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getConvocationFormForUpdate
ConvocationForm getConvocationFormForUpdate(Id convocationId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the convocation form for updating an existing convocation. A new convocation form should be requested for each update transaction.- Parameters:
convocationId- theIdof theConvocation- Returns:
- the convocation form
- Throws:
NotFoundException-convocationIdis not foundNullArgumentException-convocationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateConvocation
void updateConvocation(ConvocationForm convocationForm) throws OperationFailedException, PermissionDeniedException Updates an existing convocation.- Parameters:
convocationForm- the form containing the elements to be updated- Throws:
IllegalStateException- the form contains an invalid valueInvalidArgumentException-convocationFormalready used in an update transactionNullArgumentException-convocationFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-convocationFormdid not originate fromgetConvocationFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteConvocations
boolean canDeleteConvocations()Tests if this user can delete convocations. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anConvocationwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.- Returns:
falseifConvocationdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteConvocation
void deleteConvocation(Id convocationId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aConvocation.- Parameters:
convocationId- theIdof theConvocationto remove- Throws:
NotFoundException-convocationIdnot foundNullArgumentException-convocationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageConvocationAliases
boolean canManageConvocationAliases()Tests if this user can manageIdaliases forConvocations. 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:
falseifConvocationaliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasConvocation
void aliasConvocation(Id convocationId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aConvocationfor the purpose of creating compatibility. The primaryIdof theConvocationis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another convocation, it is reassigned to the given convocationId.- Parameters:
convocationId- theIdof aConvocationaliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-convocationIdnot foundNullArgumentException-convocationIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-