public interface ConvocationAdminSession extends OsidSession
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.
Modifier and Type | Method and Description |
---|---|
void |
addAward(Id awardId,
Id convocationId)
Adds an award to a convocation.
|
void |
aliasConvocation(Id convocationId,
Id aliasId)
Adds an
Id to a Convocation for the
purpose of creating compatibility. |
boolean |
canCreateConvocations()
Tests if this user can create convocations.
|
boolean |
canCreateConvocationWithRecordTypes(Type[] convocationRecordTypes)
Tests if this user can create a single
Convocation
using the desired record types. |
boolean |
canDeleteConvocations()
Tests if this user can delete convocations.
|
boolean |
canManageConvocationAliases()
Tests if this user can manage
Id aliases for
Convocations. |
boolean |
canManageConvocations()
Tests if this user can manage convocations.
|
boolean |
canUpdateConvocations()
Tests if this user can update convocations.
|
Convocation |
createConvocation(ConvocationForm convocationForm)
Creates a new
Convocation. |
void |
deleteConvocation(Id convocationId)
Deletes a
Convocation. |
Academy |
getAcademy()
Gets the
Academy associated with this session. |
Id |
getAcademyId()
Gets the
Academy Id associated with this
session. |
ConvocationForm |
getConvocationFormForCreate(Type[] convocationRecordTypes)
Gets the convocation form for creating new convocations.
|
ConvocationForm |
getConvocationFormForUpdate(Id convocationId)
Gets the convocation form for updating an existing convocation.
|
void |
removeAward(Id awardId,
Id convocationId)
removes an award from a convocation.
|
void |
updateConvocation(ConvocationForm convocationForm)
Updates an existing convocation.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getAcademyId()
Academy
Id
associated with this
session. Academy Id
associated with this sessionmandatory
- This method must be implemented. Academy getAcademy() throws OperationFailedException, PermissionDeniedException
Academy
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateConvocations()
Convocation
will result in a
PERMISSION_DENIED.
This is intended as a hint to an
application that may not wish to offer create operations to
unauthorized users. false
if Convocation
creation is
not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateConvocationWithRecordTypes(Type[] convocationRecordTypes)
Convocation
using the desired record types. While
RecognitionManager.getConvocationRecordTypes()
can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific Convocation.
Providing an empty array tests if a Convocation
can be
created with no records.convocationRecordTypes
- array of convocation record types true
if Convocation
creation
using the specified record Types
is supported,
false
otherwiseNullArgumentException
- convocationRecordTypes
is null
mandatory
- This method must be implemented. ConvocationForm getConvocationFormForCreate(Type[] convocationRecordTypes) throws OperationFailedException, PermissionDeniedException
convocationRecordTypes
- array of convocation record typesNullArgumentException
- convocationRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. Convocation createConvocation(ConvocationForm convocationForm) throws OperationFailedException, PermissionDeniedException
Convocation.
convocationForm
- the form for this Convocation
Convocation
IllegalStateException
- convocationForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- convocationForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- convocationForm
did not originate from getConvocationFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateConvocations()
Convocation
will result in a
PERMISSION_DENIED.
This is intended as a hint to an
application that may not wish to offer update operations to
unauthorized users. false
if Convocation
modification is not authorized, true
otherwisemandatory
- This method must be implemented. ConvocationForm getConvocationFormForUpdate(Id convocationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
convocationId
- the Id
of the Convocation
NotFoundException
- convocationId
is not
foundNullArgumentException
- convocationId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateConvocation(ConvocationForm convocationForm) throws OperationFailedException, PermissionDeniedException
convocationForm
- the form containing the elements to be updatedIllegalStateException
- the form contains an invalid
valueInvalidArgumentException
- convocationForm
already used in an update transactionNullArgumentException
- convocationForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- convocationForm
did not originate from getConvocationFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteConvocations()
Convocation
will result in a
PERMISSION_DENIED.
This is intended as a hint to an
application that may not wish to offer delete operations to
unauthorized users. false
if Convocation
deletion is
not authorized, true
otherwisemandatory
- This method must be implemented. void deleteConvocation(Id convocationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Convocation.
convocationId
- the Id
of the Convocation
to removeNotFoundException
- convocationId
not
foundNullArgumentException
- convocationId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageConvocationAliases()
Id
aliases for
Convocations.
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 Convocation
aliasing is
not authorized, true
otherwisemandatory
- This method must be implemented. void aliasConvocation(Id convocationId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a Convocation
for the
purpose of creating compatibility. The primary Id
of
the Convocation
is determined by the provider. The new
Id
performs as an alias to the primary Id.
If the alias is a pointer to another convocation, it is
reassigned to the given convocation Id.
convocationId
- the Id
of a Convocation
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- convocationId
not
foundNullArgumentException
- convocationId
or
aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageConvocations()
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 Convocation
management
is not authorized, true
otherwisemandatory
- This method must be implemented. void addAward(Id awardId, Id convocationId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
awardId
- the Id
of an Award
convocationId
- the Id
of a Convocation
AlreadyExistsException
- awardId
is
already part of convocationId
NotFoundException
- awardId
or
convocationId
not foundNullArgumentException
- awardid
or
convocationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeAward(Id awardId, Id convocationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
awardId
- the Id
of an Award
convocationId
- the Id
of a Convocation
NotFoundException
- awardId
or
convocationId
not found or awardid
not
part of convocationId
NullArgumentException
- awardid
or
convocationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.