Interface ConferralAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
ConferralBatchAdminSession
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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasConferral(Id conferralId, Id aliasId) Adds anIdto aConferralfor the purpose of creating compatibility.booleanTests if this user can create conferrals.booleancanCreateConferralWithRecordTypes(Type[] conferralRecordTypes) Tests if this user can create a singleConferralusing the desired record types.booleanTests if this user can delete conferrals.booleanTests if this user can manageIdaliases forConferralsA return of true does not guarantee successful authorization.booleanTests if this user can update conferrals.createConferral(ConferralForm conferralForm) Creates a newConferral.voiddeleteConferral(Id conferralId) Deletes aConferral.Gets theAcademyassociated with this session.Gets theAcademyIdassociated with this session.getConferralFormForCreate(Id awardId, Id resourceId, Type[] conferralRecordTypes) Gets the conferral form for creating new conferrals.getConferralFormForUpdate(Id conferralId) Gets the conferral form for updating an existing conferral.voidupdateConferral(ConferralForm conferralForm) Updates an existing conferral.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.
-
canCreateConferrals
boolean canCreateConferrals()Tests if this user can create conferrals. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aConferralwill 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:
falseifConferralcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateConferralWithRecordTypes
Tests if this user can create a singleConferralusing the desired record types. WhileRecognitionManager.getConferralRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificConferral. Providing an empty array tests if aConferralcan be created with no records.- Parameters:
conferralRecordTypes- array of conferral record types- Returns:
trueifConferralcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-conferralRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getConferralFormForCreate
ConferralForm getConferralFormForCreate(Id awardId, Id resourceId, Type[] conferralRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the conferral form for creating new conferrals. A new form should be requested for each create transaction.- Parameters:
awardId- theIdfor the awardresourceId- theIdfor the recipientconferralRecordTypes- array of conferral record types- Returns:
- the conferral form
- Throws:
NotFoundException-awardIdorresourceIdis not foundNullArgumentException-awardId, resourceId, orconferralRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createConferral
Conferral createConferral(ConferralForm conferralForm) throws OperationFailedException, PermissionDeniedException Creates a newConferral.- Parameters:
conferralForm- the form for thisConferral- Returns:
- the new
Conferral - Throws:
IllegalStateException-conferralFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-conferralFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-conferralFormdid not originate fromgetConferralFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateConferrals
boolean canUpdateConferrals()Tests if this user can update conferrals. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aConferralwill 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:
falseifConferralmodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getConferralFormForUpdate
ConferralForm getConferralFormForUpdate(Id conferralId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the conferral form for updating an existing conferral. A new conferral form should be requested for each update transaction.- Parameters:
conferralId- theIdof theConferral- Returns:
- the conferral form
- Throws:
NotFoundException-conferralIdis not foundNullArgumentException-conferralIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateConferral
void updateConferral(ConferralForm conferralForm) throws OperationFailedException, PermissionDeniedException Updates an existing conferral.- Parameters:
conferralForm- the form containing the elements to be updated- Throws:
IllegalStateException-conferralFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-conferralFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-conferralFormdid not originate fromgetConferralFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteConferrals
boolean canDeleteConferrals()Tests if this user can delete conferrals. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anConferralwill 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:
falseifConferraldeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteConferral
void deleteConferral(Id conferralId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aConferral.- Parameters:
conferralId- theIdof theConferralto remove- Throws:
NotFoundException-conferralIdnot foundNullArgumentException-conferralIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageConferralAliases
boolean canManageConferralAliases()Tests if this user can manageIdaliases forConferralsA 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:
falseifConferralaliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasConferral
void aliasConferral(Id conferralId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aConferralfor the purpose of creating compatibility. The primaryIdof theConferralis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another conferral, it is reassigned to the given conferralId.- Parameters:
conferralId- theIdof aConferralaliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-conferralIdnot foundNullArgumentException-conferralIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-