Class InferenceContextDelegate

java.lang.Object
com.aquima.interactions.profile.wrapper.ProfileDelegate
com.aquima.interactions.rule.inference.InferenceContextDelegate
All Implemented Interfaces:
IEventChannel, IProfile, IProfileLifecycle, InferenceContext, Serializable
Direct Known Subclasses:
ComposerContext, DependentValueContext, InstanceContext, InstanceStackContext, PortalProfile, UsedValuesInferenceContext

public abstract class InferenceContextDelegate extends ProfileDelegate implements InferenceContext
Simple delegate class for inference contexts.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • InferenceContextDelegate

      protected InferenceContextDelegate(InferenceContext parent)
  • Method Details

    • getActiveInstance

      Description copied from interface: InferenceContext
      This method returns the active instance for the specified type. When no active instance can be found for the specified type, the type is assumed to be a singleton instance. When this method is invoked for a non singleton type without any active instance, the call to the getSingletonInstance will fail due to a CreateInstanceException.
      Specified by:
      getActiveInstance in interface InferenceContext
      Parameters:
      entityName - The entity type for which the active instance is requested.
      Returns:
      The instance that is active for the specified type.
      Throws:
      UnknownInstanceException - This exception type is raised when no active instance could be found for the specified type.
      UnknownEntityException - This exception type is raised when the entity type is unknown.
      CreateInstanceException - This type of exception may be raised when a singleton instance could not be created for the specified type.
    • getInferenceDetails

      public IInferenceDetails getInferenceDetails(ValueReference attributeReference) throws AppException
      Description copied from interface: InferenceContext
      This method may be used to request detailed inference information for a specific attribute. The details object contains information like which rule inferenced the value, and what other values were used by the rule engine to determine the current result.
      Specified by:
      getInferenceDetails in interface InferenceContext
      Parameters:
      attributeReference - The reference to the attribute whose inference information is requested.
      Returns:
      Object containing detailed information about the value related to the inference process.
      Throws:
      AppException - This exception is thrown when the inference details could not be retrieved.