public interface ConferralAdminSession extends OsidSession
This session creates, updates, and deletes Conferrals.
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
Conferral,
a ConferralForm
is requested using
getConferralFormForCreate()
specifying the desired peers
and record Types
or none if no record Types
are needed. The returned ConferralForm
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 ConferralForm
is submiited to a create operation, it cannot be reused with
another create operation unless the first operation was unsuccessful. Each
ConferralForm
corresponds to an attempted transaction.
For updates, ConferralForms
are requested to the
Conferral
Id
that is to be updated using
geConferralFormForUpdate().
Similarly, the ConferralForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The ConferralForm
can only be used once for a successful update and cannot be reused.
The delete operations delete Conferrals.
To unmap a
Conferral
from the current Academy,
the
ConferralAcademyAssignmentSession
should be used. These
delete operations attempt to remove the Conferral
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 |
aliasConferral(Id conferralId,
Id aliasId)
Adds an
Id to a Conferral for the
purpose of creating compatibility. |
boolean |
canCreateConferrals()
Tests if this user can create conferrals.
|
boolean |
canCreateConferralWithRecordTypes(Type[] conferralRecordTypes)
Tests if this user can create a single
Conferral using
the desired record types. |
boolean |
canDeleteConferrals()
Tests if this user can delete conferrals.
|
boolean |
canManageConferralAliases()
Tests if this user can manage
Id aliases for
Comnents. |
boolean |
canUpdateConferrals()
Tests if this user can update conferrals.
|
Conferral |
createConferral(ConferralForm conferralForm)
Creates a new
Conferral. |
void |
deleteConferral(Id conferralId)
Deletes a
Conferral. |
Academy |
getAcademy()
Gets the
Academy associated with this session. |
Id |
getAcademyId()
Gets the
Academy Id associated with this
session. |
ConferralForm |
getConferralFormForCreate(Id awardId,
Id resourceId,
Type[] conferralRecordTypes)
Gets the conferral form for creating new conferrals.
|
ConferralForm |
getConferralFormForUpdate(Id conferralId)
Gets the conferral form for updating an existing conferral.
|
void |
updateConferral(ConferralForm conferralForm)
Updates an existing conferral.
|
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 canCreateConferrals()
Conferral
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 Conferral
creation is
not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateConferralWithRecordTypes(Type[] conferralRecordTypes)
Conferral
using
the desired record types. While
RecognitionManager.getConferralRecordTypes()
can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific Conferral.
Providing an empty array tests if a Conferral
can be
created with no records.conferralRecordTypes
- array of conferral record types true
if Conferral
creation using
the specified record Types
is supported,
false
otherwiseNullArgumentException
- conferralRecordTypes
is null
mandatory
- This method must be implemented. ConferralForm getConferralFormForCreate(Id awardId, Id resourceId, Type[] conferralRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
awardId
- the Id
for the awardresourceId
- the Id
for the recipientconferralRecordTypes
- array of conferral record typesNotFoundException
- awardId
or
resourceId
is not foundNullArgumentException
- awardId, resourceId,
or conferralRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. Conferral createConferral(ConferralForm conferralForm) throws OperationFailedException, PermissionDeniedException
Conferral.
conferralForm
- the form for this Conferral
Conferral
IllegalStateException
- conferralForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- conferralForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- conferralForm
did
not originate from getConferralFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateConferrals()
Conferral
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 Conferral
modification
is not authorized, true
otherwisemandatory
- This method must be implemented. ConferralForm getConferralFormForUpdate(Id conferralId) throws NotFoundException, OperationFailedException, PermissionDeniedException
conferralId
- the Id
of the Conferral
NotFoundException
- conferralId
is not
foundNullArgumentException
- conferralId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateConferral(ConferralForm conferralForm) throws OperationFailedException, PermissionDeniedException
conferralForm
- the form containing the elements to be updatedIllegalStateException
- conferralForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- conferralForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- conferralForm
did
not originate from getConferralFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteConferrals()
Conferral
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 Conferral
deletion is
not authorized, true
otherwisemandatory
- This method must be implemented. void deleteConferral(Id conferralId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Conferral.
conferralId
- the Id
of the Conferral
to removeNotFoundException
- conferralId
not
foundNullArgumentException
- conferralId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageConferralAliases()
Id
aliases for
Comnents.
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 Conferral
aliasing is
not authorized, true
otherwisemandatory
- This method must be implemented. void aliasConferral(Id conferralId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a Conferral
for the
purpose of creating compatibility. The primary Id
of
the Conferral
is determined by the provider. The new
Id
performs as an alias to the primary Id.
If the alias is a pointer to another conferral, it is
reassigned to the given conferral Id.
conferralId
- the Id
of a Conferral
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- conferralId
not
foundNullArgumentException
- conferralId
or
aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.