Interface ValueRetrievalSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
ValueLookupSession
This session is used to retrieve active and applicable configuration values through evaluation of active and pertinent values based on the context or conditional input.
-
Method Summary
Modifier 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.Gets theConfigurationassociated with this session.Gets theConfigurationIdassociated with this session.getValueCondition(Id parameterId) Gets a value condition for the given parameter.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
-
getConfigurationId
Id getConfigurationId()Gets theConfigurationIdassociated with this session.- Returns:
- the
ConfigurationIdassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getConfiguration
Gets theConfigurationassociated with this session.- Returns:
- the
Configurationassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRetrieveValues
boolean canRetrieveValues()Tests if this user can performValueretrievals. 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.
-
getApplicableValueByParameter
Value getApplicableValueByParameter(Id parameterId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets an applicableValuefor the given parameterId. If more than one value exists for the given parameter, the most preferred value is returned. This method can be used as a convenience when only one value is expected.getValuesByParameters()should be used for getting all the active values.- Parameters:
parameterId- theIdof theParameterto retrieve- Returns:
- the value
- Throws:
NotFoundException- theparameterIdnot found or no value availableNullArgumentException- theparameterIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getApplicableValuesByParameter
ValueList getApplicableValuesByParameter(Id parameterId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets all the applicableValuesfor the given parameterId.- 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.
-
getApplicableValuesByParameters
ValueList getApplicableValuesByParameters(IdList parameterIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the applicableValuesfor the given parameterIds.- Parameters:
parameterIds- theIdof theParameterto retrieve- Returns:
- the value list
- Throws:
NotFoundException- a parameterIdis not foundNullArgumentException-parameterIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getValueCondition
Gets a value condition for the given parameter.- Parameters:
parameterId- theIdof aParameter- Returns:
- a value condition
- Throws:
NullArgumentException-parameterIdisnull- Compliance:
mandatory- This method must be implemented.
-
getApplicableValueByParameterOnCondition
Value getApplicableValueByParameterOnCondition(Id parameterId, ValueCondition valueCondition) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets an applicable value in this configuration based on a condition. If multiple values are available the most preferred one is returned. The condition specified is applied to any or all parameters in this configuration as applicable.- Parameters:
parameterId- theIdof aParametervalueCondition- the condition- Returns:
- the value
- Throws:
NotFoundException- parameterIdis not foundNullArgumentException-parameterIdorvalueConditionisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-valueConditiondid not originate fromgetValueCondition()- Compliance:
mandatory- This method must be implemented.
-
getApplicableValuesByParameterOnCondition
ValueList getApplicableValuesByParameterOnCondition(Id parameterId, ValueCondition valueCondition) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets all the applicable values for a parameter based on a condition.- Parameters:
parameterId- theIdof aParametervalueCondition- the condition- Returns:
- the value list
- Throws:
NotFoundException- parameterIdis not foundNullArgumentException-parameterIdorvalueConditionisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-valueConditiondid not originate fromgetValueCondition()- Compliance:
mandatory- This method must be implemented.
-
getApplicableValuesByParametersOnCondition
ValueList getApplicableValuesByParametersOnCondition(IdList parameterIds, ValueCondition valueCondition) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the applicable values for parameters based on a condition. The specified condition is applied to any or all of the parameters as applicable.- Parameters:
parameterIds- theIdof aParametervalueCondition- the condition- Returns:
- the value list
- Throws:
NotFoundException- a parameterIdis not foundNullArgumentException-parameterIdsorvalueConditionisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-valueCondition did not originate from getValueCondition()- Compliance:
mandatory- This method must be implemented.
-