Class XMLSignatureLocation

java.lang.Object
se.idsec.signservice.integration.document.xml.XMLSignatureLocation
All Implemented Interfaces:
Serializable, Extensible

public class XMLSignatureLocation extends Object implements Extensible
Tells where in an XML document the signature should be inserted. The default is to add it as the last child of the document root element.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
See Also:
  • Constructor Details

    • XMLSignatureLocation

      public XMLSignatureLocation()
      Default constructor.
    • XMLSignatureLocation

      public XMLSignatureLocation(String childPosition, String xPath, Extension extension)
      Constructor.
      Parameters:
      childPosition - indicator for first or last child of a selected parent node
      xPath - the XPath expression for selecting the parent node
      extension - extensions for the object
  • Method Details

    • getChildPosition

      public String getChildPosition()
      Gets the indicator for first or last child of a selected parent node.
      Returns:
      the position (first of last)
    • setChildPosition

      public void setChildPosition(String childPosition)
      Sets the position in the selected parent node where the signature element should be installed (first or last). The default is "last".
      Parameters:
      childPosition - the position
    • setChildPosition

      public void setChildPosition(XMLSignatureLocation.ChildPosition childPosition)
      Sets the position in the selected parent node where the signature element should be installed (first or last). The default is "last".
      Parameters:
      childPosition - the position
    • getxPath

      public String getxPath()
      Gets the XPath expression for selecting the parent node (or null which means the the parent node is the document root element).
      Returns:
      the XPath expression for locating the parent node of the Signature element
    • setxPath

      public void setxPath(String xPath)
      Assigns the XPath expression for selecting the parent node (or null which means the the parent node is the document root element).
      Parameters:
      xPath - the XPath expression for locating the parent node of the Signature element
    • getExtension

      public Extension getExtension()
      Returns the extension parameters for the instance.
      Specified by:
      getExtension in interface Extensible
      Returns:
      the extension, or null if no extensions are set
    • setExtension

      public void setExtension(Extension extension)
      Assigns the extension parameters for the instance.
      Specified by:
      setExtension in interface Extensible
      Parameters:
      extension - the extension
    • builder

    • toString

      public String toString()
      Overrides:
      toString in class Object