Interface ExecutionContext

    • Field Detail

      • DOCUMENT_URI

        static final URI DOCUMENT_URI
        Sometimes the document being transformed/analysed has a URI associated with it. This can be bound to the execution context under this key.
    • Method Detail

      • setDocumentSource

        void setDocumentSource​(URI docSource)
        Sets the document source URI of this ExecutionContext.
        Parameters:
        docSource - the document URI
      • getDocumentSource

        URI getDocumentSource()
        Gets the document source URI of this ExecutionContext.

        If the document source URI is not set for the context, implementations should return the DOCUMENT_URI constant.

        Returns:
        the document URI.
      • getTargetProfiles

        ProfileSet getTargetProfiles()
        Gets the set of profiles at which this execution context is targeted.

        Basically, the set of profiles for which this execution context is to perform transformation/analysis.

        Returns:
        the target ProfileSet.
      • getContentDeliveryRuntime

        ContentDeliveryRuntime getContentDeliveryRuntime()
        Get the content delivery configuration for the profile set at which this context is targeted.
        Returns:
        ContentDeliveryConfig instance.
      • setContentEncoding

        void setContentEncoding​(String contentEncoding)
                         throws IllegalArgumentException
        Set the content encoding to be used when parsing content on this context.
        Parameters:
        contentEncoding - Character encoding to be used when parsing content. Null defaults to "UTF-8".
        Throws:
        IllegalArgumentException - Invalid encoding.
      • getContentEncoding

        String getContentEncoding()
        Get the content encoding to be used when parsing content on this context.
        Returns:
        Character encoding to be used when parsing content. Defaults to "UTF-8".
      • setTerminationError

        void setTerminationError​(Throwable terminationError)
        Set the error/exception that caused the filter operation associated with this ExecutionContext to terminate.
        Parameters:
        terminationError - The termination Error/Exception.
      • getTerminationError

        Throwable getTerminationError()
        Set the error/exception that caused the filter operation associated with this ExecutionContext to terminate.
        Returns:
        The Error/Exception that caused the associated filter operation to terminate (if it did terminate), otherwise null.
      • getConfigParameter

        String getConfigParameter​(String name)
        Get a global configuration parameter associated with this execution context.

        For more fine grained control, see the ParameterAccessor class.

        Parameters:
        name - The name of the parameter.
        Returns:
        The parameter value, or null if the parameter is not configured.
      • getConfigParameter

        String getConfigParameter​(String name,
                                  String defaultVal)
        Get a global configuration parameter associated with this execution context.

        For more fine grained control, see the ParameterAccessor class.

        Parameters:
        name - The name of the parameter.
        defaultVal - The default value to be returned if the configuration parameter is not set.
        Returns:
        The parameter value, or "defaultVal" if the parameter is not configured.
      • getBeanContext

        BeanContext getBeanContext()
        Gets the BeanContext for this ExecutionContext.
        Returns:
        the BeanContext
      • setBeanContext

        void setBeanContext​(BeanContext beanContext)
        Sets the BeanContext for this ExecutionContext.
        Parameters:
        beanContext - the BeanContext