Interface ConfigurationLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Configurations .
The Configuration represents a collection of parameter values.
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 set or is an error condition
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. For
example, a browsing application may only need to examine the
Configurations it can access, without breaking execution. However, an
assessment may only be useful if all Configurations referenced by
it are available, and a test-taking applicationmay sacrifice some
interoperability for the sake of precision.
Configurations may have an additional interface indicated by their
respective types. The interface extension is accessed via the
Configuration . The returns may not be cast directly from the returns in
the lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performConfigurationlookups.getConfiguration(Id configurationId) Gets theConfigurationspecified by itsId.Gets allConfigurations.getConfigurationsByGenusType(Type configurationGenusType) Gets anConfigurationListcorresponding to the given configuration genusTypewhich does not include configuration types derived from the specifiedType.getConfigurationsByIds(IdList configurationIds) Gets aConfigurationListcorresponding to the givenIdList.getConfigurationsByParentGenusType(Type configurationGenusType) Gets anConfigurationListcorresponding to the given configuration genusTypeand include any additional configurations with genus types derived from the specifiedType.getConfigurationsByProvider(Id resourceId) Gets aConfigurationListfrom the given provider.getConfigurationsByRecordType(Type configurationRecordType) Gets aConfigurationListcontaining the given configuration 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.voidA complete view of theConfigurationreturns 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
-
canLookupConfigurations
boolean canLookupConfigurations()Tests if this user can performConfigurationlookups. 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 opt not to offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeConfigurationView
void useComparativeConfigurationView()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.
-
usePlenaryConfigurationView
void usePlenaryConfigurationView()A complete view of theConfigurationreturns 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.
-
getConfiguration
Configuration getConfiguration(Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theConfigurationspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedConfigurationmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aConfigurationand retained for compatibility.- Parameters:
configurationId- theIdof theConfigurationto retrieve- Returns:
- the
Configuration - Throws:
NotFoundException- noConfigurationfound with the givenIdNullArgumentException-configurationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getConfigurationsByIds
ConfigurationList getConfigurationsByIds(IdList configurationIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aConfigurationListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the configurations 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, inaccessibleConfigurationsmay be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
configurationIds- the list ofIdsto retrieve- Returns:
- the returned
Configurationlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-configurationIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getConfigurationsByGenusType
ConfigurationList getConfigurationsByGenusType(Type configurationGenusType) throws OperationFailedException, PermissionDeniedException Gets anConfigurationListcorresponding to the given configuration genusTypewhich does not include configuration types derived from the specifiedType. In plenary mode, the returned list contains all known configurations or an error results. Otherwise, the returned list may contain only those configurations that are accessible through this session.- Parameters:
configurationGenusType- a configuration genus type- Returns:
- the returned
Configurationlist - Throws:
NullArgumentException-configurationGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getConfigurationsByParentGenusType
ConfigurationList getConfigurationsByParentGenusType(Type configurationGenusType) throws OperationFailedException, PermissionDeniedException Gets anConfigurationListcorresponding to the given configuration genusTypeand include any additional configurations with genus types derived from the specifiedType. In plenary mode, the returned list contains all known configurations or an error results. Otherwise, the returned list may contain only those configurations that are accessible through this session.- Parameters:
configurationGenusType- a configuration genus type- Returns:
- the returned
Configurationlist - Throws:
NullArgumentException-configurationGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getConfigurationsByRecordType
ConfigurationList getConfigurationsByRecordType(Type configurationRecordType) throws OperationFailedException, PermissionDeniedException Gets aConfigurationListcontaining the given configuration recordType. In plenary mode, the returned list contains all known configurations or an error results. Otherwise, the returned list may contain only those configurations that are accessible through this session.- Parameters:
configurationRecordType- a configuration record type- Returns:
- the returned
Configurationlist - Throws:
NullArgumentException-configurationRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getConfigurationsByProvider
ConfigurationList getConfigurationsByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets aConfigurationListfrom the given provider. In plenary mode, the returned list contains all known configurations or an error results. Otherwise, the returned list may contain only those configurations that are accessible through this session.- Parameters:
resourceId- a resourceId- Returns:
- the returned
Configurationlist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getConfigurations
Gets allConfigurations. In plenary mode, the returned list contains all known configurations or an error results. Otherwise, the returned list may contain only those configurations that are accessible through this session.- Returns:
- a list of
Configurations - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-