Class CachedXsltTransformationService

java.lang.Object
net.finmath.smartcontracts.representablestate.cache.CachedXsltTransformationService

public final class CachedXsltTransformationService extends Object
Opt-in cache boundary for a block-pinned render and its XSLT post-processing.

The XSLT specification is part of the key. Inline and same-chain Web3 stylesheets are tied to the rendered snapshot. HTTP(S) stylesheet URLs may be mutable; their freshness is therefore bounded by cache expiry rather than treated as permanent.

  • Constructor Details

    • CachedXsltTransformationService

      public CachedXsltTransformationService(CachedRenderingService renderingService, XsltPostProcessor postProcessor, ExternalXsltResourceLoader externalResourceLoader, RendererCacheOptions options)
      Creates a cached render-and-transform facade.

      This convenience overload does not perform a final transformation snapshot verification. Use the five-argument constructor when the caller does not verify canonicality externally.

      Parameters:
      renderingService - Cached renderer using the same snapshot identity.
      postProcessor - Secure XSLT post-processor.
      externalResourceLoader - Policy-controlled stylesheet loader.
      options - Cache enablement, bounds, and expiry.
    • CachedXsltTransformationService

      public CachedXsltTransformationService(CachedRenderingService renderingService, XsltPostProcessor postProcessor, ExternalXsltResourceLoader externalResourceLoader, RendererCacheOptions options, EvmSnapshotVerifier snapshotVerifier)
      Creates a render-and-transform facade with a final canonicality check.
      Parameters:
      renderingService - Renderer using the same snapshot identity.
      postProcessor - Secure XSLT post-processor.
      externalResourceLoader - Policy-controlled stylesheet loader.
      options - Cache enablement, bounds, and expiry.
      snapshotVerifier - Check invoked after a newly completed transformation and before cache admission.
  • Method Details

    • transform

      public XsltPostProcessor.TransformationResult transform(EvmSnapshot snapshot, String contractAddress, String xslt) throws Exception
      Renders and transforms one contract snapshot.
      Parameters:
      snapshot - Fixed chain and block identity.
      contractAddress - Contract to render.
      xslt - Absolute stylesheet URI or explicit inline-XPath specification.
      Returns:
      Completed transformation.
      Throws:
      Exception - If rendering, stylesheet loading, or transformation fails.
    • clear

      public void clear()
      Clears all transformed documents retained by this facade.