Interface AwardLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Awards . The
Award represents a collection of conferrals.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete view or is an error condition
- isolated academy view: All award methods in this session operate,
retrieve and pertain to awards defined explicitly in the current
academy. Using an isolated view is useful for managing awards with the
AwardAdminSession. - federated academy view: All award lookup methods in this session operate, retrieve and pertain to all awards defined in this academy and any other academies implicitly available in this academy through academy inheritence.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performAwardlookups.Gets theAcademyassociated with this session.Gets theAcademyIdassociated with this session.Gets theAwardspecified by itsId.Gets allAwards.getAwardsByGenusType(Type awardGenusType) Gets anAwardListcorresponding to the given award genusTypewhich does not include awards of genus types derived from the specifiedType.getAwardsByIds(IdList awardIds) Gets anAwardListcorresponding to the givenIdList.getAwardsByParentGenusType(Type awardGenusType) Gets anAwardListcorresponding to the given award genusTypeand include any additional awards with genus types derived from the specifiedType.getAwardsByRecordType(Type awardRecordType) Gets anAwardListcontaining the given award recordType.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theAwardreturns is desired.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.
-
canLookupAwards
boolean canLookupAwards()Tests if this user can performAwardlookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may not offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeAwardView
void useComparativeAwardView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryAwardView
void usePlenaryAwardView()A complete view of theAwardreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedAcademyView
void useFederatedAcademyView()Federates the view for methods in this session. A federated view will include awards in academies which are children of this academy in the academy hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedAcademyView
void useIsolatedAcademyView()Isolates the view for methods in this session. An isolated view restricts retrievals to this academy only.- Compliance:
mandatory- This method is must be implemented.
-
getAward
Award getAward(Id awardId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theAwardspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedAwardmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anAwardand retained for compatibility.- Parameters:
awardId-Idof theAward- Returns:
- the award
- Throws:
NotFoundException-awardIdnot foundNullArgumentException-awardIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getAwardsByIds
AwardList getAwardsByIds(IdList awardIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anAwardListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the awards specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleAwardsmay be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
awardIds- the list ofIdsto retrieve- Returns:
- the returned
Awardlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-awardIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAwardsByGenusType
AwardList getAwardsByGenusType(Type awardGenusType) throws OperationFailedException, PermissionDeniedException Gets anAwardListcorresponding to the given award genusTypewhich does not include awards of genus types derived from the specifiedType. In plenary mode, the returned list contains all known awards or an error results. Otherwise, the returned list may contain only those awards that are accessible through this session.- Parameters:
awardGenusType- an award genus type- Returns:
- the returned
Awardlist - Throws:
NullArgumentException-awardGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAwardsByParentGenusType
AwardList getAwardsByParentGenusType(Type awardGenusType) throws OperationFailedException, PermissionDeniedException Gets anAwardListcorresponding to the given award genusTypeand include any additional awards with genus types derived from the specifiedType. In plenary mode, the returned list contains all known awards or an error results. Otherwise, the returned list may contain only those awards that are accessible through this session.- Parameters:
awardGenusType- an award genus type- Returns:
- the returned
Awardlist - Throws:
NullArgumentException-awardGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAwardsByRecordType
AwardList getAwardsByRecordType(Type awardRecordType) throws OperationFailedException, PermissionDeniedException Gets anAwardListcontaining the given award recordType. In plenary mode, the returned list contains all known awards or an error results. Otherwise, the returned list may contain only those awards that are accessible through this session.- Parameters:
awardRecordType- an award record type- Returns:
- the returned
Awardlist - Throws:
NullArgumentException-awardRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAwards
Gets allAwards. In plenary mode, the returned list contains all known awards or an error results. Otherwise, the returned list may contain only those awards that are accessible through this session.- Returns:
- a list of
Awards - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-