Interface DocumentContext


  • public interface DocumentContext
    The document context allows LibCSS to interact with the calling implementation. LibCSS tries to minimize the assumptions made on the internal of external systems by providing a minimized set of interfaces which allow LibCSS to retrieve all required information without imposing a specific implementation on the caller.
    Author:
    : Thomas Morgner
    • Method Detail

      • getResourceManager

        org.pentaho.reporting.libraries.resourceloader.ResourceManager getResourceManager()
        Returns the resource manager that is used to load externally referenced resources. Such resources can be either images, drawable or other stylesheets. In some cases, this might even reference whole documents.

        The implementation should indicate which document types can be loaded using the getSupportedResourceTypes() method.

        Returns:
        the resource manager.
        See Also:
        getSupportedResourceTypes()
      • getContextKey

        org.pentaho.reporting.libraries.resourceloader.ResourceKey getContextKey()
        Returns the context key provides the base-key for resolving relative URLs. Usually it is the key that was used to parse the document. Without this key, it would be impossible to resolve non-absolute URLs/paths into a usable URL or path.
        Returns:
        the context key
        See Also:
        ResourceManager.deriveKey(ResourceKey, String)
      • getStyleKeyRegistry

        StyleKeyRegistry getStyleKeyRegistry()
        Returns the style-key registry that holds all known stylekeys that might be encountered during the parsing. As this library might be used in several CSS-enabled systems at the same time (ie. Charting, Classic-Report-Engine, anything else) the library uses this mechanism to separate the stylesheet sets of each application from each other.
        Returns:
        the stylekey registry to use.
      • getSupportedResourceTypes

        Class[] getSupportedResourceTypes()
        Returns the list of supported resource types that can be loaded as external resources.
        Returns:
        the supported resource types.
        See Also:
        ResourceManager.create(ResourceKey, ResourceKey, Class[])