xades4j.production
Class PropertiesDataGenerationContext

java.lang.Object
  extended by xades4j.production.PropertiesDataGenerationContext

public class PropertiesDataGenerationContext
extends Object

Context used during the generation of the properties low-level data (property data objects). Contains informations about the algorithms in use and the resources being signed.

Author:
Luís
See Also:
PropertiesDataObjectsGenerator

Constructor Summary
PropertiesDataGenerationContext(org.apache.xml.security.signature.XMLSignature targetXmlSignature, AlgorithmsProvider algorithmsProvider)
          A simple constructor to be used in when only unsigned signature properties will be processed.
 
Method Summary
 Element createElementInSignatureDoc(String name, String prefix, String namespace)
          Creates a DOM Element in the signature's document.
 AlgorithmsProvider getAlgorithmsProvider()
           
 List<org.apache.xml.security.signature.Reference> getReferences()
          Gets all the References present in the signature that is being created, except the signed properties reference, in order of appearence within SignedInfo.
 Map<DataObjectDesc,org.apache.xml.security.signature.Reference> getReferencesMappings()
          Gets the mappings from high-level DataObjectDescs to References.
 org.apache.xml.security.signature.XMLSignature getTargetXmlSignature()
          Gets the XML Signature that is being created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesDataGenerationContext

public PropertiesDataGenerationContext(org.apache.xml.security.signature.XMLSignature targetXmlSignature,
                                       AlgorithmsProvider algorithmsProvider)
                                throws XAdES4jXMLSigException
A simple constructor to be used in when only unsigned signature properties will be processed.

Parameters:
targetXmlSignature - the target signature
algorithmsProvider - algorithms in use
Throws:
XAdES4jXMLSigException
Method Detail

getAlgorithmsProvider

public AlgorithmsProvider getAlgorithmsProvider()

getReferences

public List<org.apache.xml.security.signature.Reference> getReferences()
Gets all the References present in the signature that is being created, except the signed properties reference, in order of appearence within SignedInfo.

Returns:
the unmodifiable list of References

getReferencesMappings

public Map<DataObjectDesc,org.apache.xml.security.signature.Reference> getReferencesMappings()
Gets the mappings from high-level DataObjectDescs to References. This should be used when a data object property needs any information from the Reference that corresponds to the data object.

Returns:
the unmodifiable mapping

getTargetXmlSignature

public org.apache.xml.security.signature.XMLSignature getTargetXmlSignature()
Gets the XML Signature that is being created. This is only available when generating unisgned properties data objects.

Returns:
the target signature or null if not yet available

createElementInSignatureDoc

public Element createElementInSignatureDoc(String name,
                                           String prefix,
                                           String namespace)
Creates a DOM Element in the signature's document. This can be useful when generating GenericDOMData data objects.

Parameters:
name - the local name of the element
namespace - the namespace where the element will be created
Returns:
the created element


Copyright © 2012. All Rights Reserved.