DocumentResolver

public class DocumentResolver extends ResourceResolverSpi

This class is needed by the Apache XML Security library for locating and loading the document attachments.

Author:kcyee

Fields

docs

protected DocumentDetail[] docs

Internal variable for holding the document parameters.

logger

protected static Logger logger

Constructors

DocumentResolver

public DocumentResolver(DocumentDetail[] docs)

Construct with an array of document parameters.

Parameters:
  • docs – array of document parameters

Methods

engineCanResolveURI

public boolean engineCanResolveURI(ResourceResolverContext context)

Sees whether the resolver can resolve the document specified by the URI or not.

Parameters:
  • uri
  • baseUri
Returns:

true if the resolver can locate the document specified, false if otherwise.

engineResolveURI

public XMLSignatureInput engineResolveURI(ResourceResolverContext context)

Gets the document (encapsulated in the XMLSignatureInput object) by specifying the URI.

Parameters:
  • uri
  • baseUri
Returns:

the document encapsulated in the XMLSignatureInput object