Interface ValueLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, ValueRetrievalSession
This session is used to retrieve configuration values. Several views of the configuration data are defined:
- federated: parameters defined in configurations that are a parent of this configuration in the configuration hierarchy are included
- isolated: parameters are contained to within this configuration
- conditional: values are filtered that do not pass any defined conditions, whether or not they are explciity passed into the lookup methods of this session
- unconditional: values are filtered only for the conditions that are explicity passed as parameters. Any conditions defined for the value that do not require explicit data for retrieval are ignored.
- active value view: All value lookup methods return active values.
- any status value view: Values of any active or inactive status are returned from methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performValuelookups.Gets theConfigurationassociated with this session.Gets theConfigurationIdassociated with this session.Gets theValuespecified by itsId.Gets all the values in this configuration.getValuesByGenusType(Type valueGenusType) Gets aValueListcorresponding to the given value genusTypewhich does not include values of genus types derived from the specifiedType.getValuesByIds(IdList valueIds) Gets aValueListcorresponding to the givenIdList.getValuesByParameter(Id parameterId) Gets all theValuesfor the given parameterId.getValuesByParentGenusType(Type valueGenusType) Gets aValueListcorresponding to the given value genusTypeand include any additional values with genus types derived from the specifiedType.getValuesByRecordType(Type valueRecordType) Gets aValueListcorresponding to the given value recordTypewhich does not include values of record types derived from the specifiedType.voidOnly active values are returned by methods in this session.voidAll active and inactive values are returned by methods in this session.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 theValuereturns 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.Methods inherited from interface ValueRetrievalSession
canRetrieveValues, getApplicableValueByParameter, getApplicableValueByParameterOnCondition, getApplicableValuesByParameter, getApplicableValuesByParameterOnCondition, getApplicableValuesByParameters, getApplicableValuesByParametersOnCondition, getValueConditionModifier and TypeMethodDescriptionbooleanTests if this user can performValueretrievals.getApplicableValueByParameter(Id parameterId) Gets an applicableValuefor the given parameterId.getApplicableValueByParameterOnCondition(Id parameterId, ValueCondition valueCondition) Gets an applicable value in this configuration based on a condition.getApplicableValuesByParameter(Id parameterId) Gets all the applicableValuesfor the given parameterId.getApplicableValuesByParameterOnCondition(Id parameterId, ValueCondition valueCondition) Gets all the applicable values for a parameter based on a condition.getApplicableValuesByParameters(IdList parameterIds) Gets the applicableValuesfor the given parameterIds.getApplicableValuesByParametersOnCondition(IdList parameterIds, ValueCondition valueCondition) Gets the applicable values for parameters based on a condition.getValueCondition(Id parameterId) Gets a value condition for the given parameter.
-
Method Details
-
getConfigurationId
Id getConfigurationId()Gets theConfigurationIdassociated with this session.- Specified by:
getConfigurationIdin interfaceValueRetrievalSession- Returns:
- the
ConfigurationIdassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getConfiguration
Gets theConfigurationassociated with this session.- Specified by:
getConfigurationin interfaceValueRetrievalSession- Returns:
- the
Configurationassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupValues
boolean canLookupValues()Tests if this user can performValuelookups. 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.
-
useComparativeValueView
void useComparativeValueView()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.
-
usePlenaryValueView
void usePlenaryValueView()A complete view of theValuereturns 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.
-
useFederatedConfigurationView
void useFederatedConfigurationView()Federates the view for methods in this session. A federated view will include values from parent configurations in the configuration hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedConfigurationView
void useIsolatedConfigurationView()Isolates the view for methods in this session. An isolated view restricts lookups to this configuration only.- Compliance:
mandatory- This method is must be implemented.
-
useActiveValueView
void useActiveValueView()Only active values are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyStatusValueView
void useAnyStatusValueView()All active and inactive values are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getValue
Value getValue(Id valueId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theValuespecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedValuemay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aValueand retained for compatibility. In active mode, values are returned that are currently active. In any status mode, active and inactive values are returned.- Parameters:
valueId- theIdof theValueto retrieve- Returns:
- the returned
Value - Throws:
NotFoundException- noValuefound with the givenIdNullArgumentException-valueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getValuesByIds
ValueList getValuesByIds(IdList valueIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aValueListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the values 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, inaccessibleValuesmay be omitted from the list and may present the elements in any order including returning a unique set. In active mode, values are returned that are currently active. In any status mode, active and inactive values are returned.- Parameters:
valueIds- the list ofIdsto retrieve- Returns:
- the returned
Valuelist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-valueIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getValuesByGenusType
ValueList getValuesByGenusType(Type valueGenusType) throws OperationFailedException, PermissionDeniedException Gets aValueListcorresponding to the given value genusTypewhich does not include values of genus types derived from the specifiedType. In plenary mode, the returned list contains all known values or an error results. Otherwise, the returned list may contain only those values that are accessible through this session. In active mode, values are returned that are currently active. In any status mode, active and inactive values are returned.- Parameters:
valueGenusType- a value genus type- Returns:
- the returned
Value list - Throws:
NullArgumentException-valueGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getValuesByParentGenusType
ValueList getValuesByParentGenusType(Type valueGenusType) throws OperationFailedException, PermissionDeniedException Gets aValueListcorresponding to the given value genusTypeand include any additional values with genus types derived from the specifiedType. In plenary mode, the returned list contains all known values or an error results. Otherwise, the returned list may contain only those values that are accessible through this session. In active mode, values are returned that are currently active. In any status mode, active and inactive values are returned.- Parameters:
valueGenusType- a value genus type- Returns:
- the returned
Value list - Throws:
NullArgumentException-valueGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getValuesByRecordType
ValueList getValuesByRecordType(Type valueRecordType) throws OperationFailedException, PermissionDeniedException Gets aValueListcorresponding to the given value recordTypewhich does not include values of record types derived from the specifiedType. In plenary mode, the returned list contains all known values or an error results. Otherwise, the returned list may contain only those values that are accessible through this session. In active mode, values are returned that are currently active. In any status mode, active and inactive values are returned.- Parameters:
valueRecordType- a value type- Returns:
- the returned
Valuelist - Throws:
NullArgumentException-valueRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getValuesByParameter
ValueList getValuesByParameter(Id parameterId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets all theValuesfor the given parameterId. In plenary mode, all values are returned in the order requested or an error results. In comparative mode, inaccessible values may be omitted or the values reordered. In active mode, values are returned that are currently active. In any status mode, active and inactive values are returned.- Parameters:
parameterId- theIdof theParameterto retrieve- Returns:
- the value list
- Throws:
NotFoundException- theparameterIdnot foundNullArgumentException- theparameterIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getValues
Gets all the values in this configuration. In plenary mode, all values are returned or an error results. In comparative mode, inaccessible values may be omitted. In plenary mode, the returned list contains all known values or an error results. Otherwise, the returned list may contain only those values that are accessible through this session. In active mode, values are returned that are currently active. In any status mode, active and inactive values are returned.- Returns:
- the value list
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-