Package eu.europa.esig.dss.validation
Class AbstractSignatureIdentifierBuilder
java.lang.Object
eu.europa.esig.dss.validation.AbstractSignatureIdentifierBuilder
- All Implemented Interfaces:
- SignatureIdentifierBuilder
- Direct Known Subclasses:
- CAdESSignatureIdentifierBuilder,- JAdESSignatureIdentifierBuilder,- PAdESSignatureIdentifierBuilder,- XAdESSignatureIdentifierBuilder
public abstract class AbstractSignatureIdentifierBuilder
extends Object
implements SignatureIdentifierBuilder
The abstract SignatureIdentifier builder
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final AdvancedSignatureThe signature to build identifier for
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedThe default constructor
- 
Method SummaryModifier and TypeMethodDescriptionbuild()BuildsSignatureIdentifierfor the providedAdvancedSignatureprotected byte[]Builds unique binary data describing the signature objectprotected abstract ObjectgetCounterSignaturePosition(AdvancedSignature masterSignature) Returns a current counter signature position in its master signatureprotected StringReturns Id representing a current signature position in a file, considering its pre-siblings, master signatures when presentprotected ObjectThis method returns a position of a signature file NOTE: this method returns a signature filename for ASiC containers, empty string for othersprotected abstract ObjectReturns a position of a signature in the provided fileprotected voidWrites the current signature position between other signature entries on the same levelprotected voidWrite signed properties of a signature to the givenByteArrayOutputStreamprotected voidwriteString(ByteArrayOutputStream baos, String str) The method used to write astrintobaos
- 
Field Details- 
signatureThe signature to build identifier for
 
- 
- 
Constructor Details- 
AbstractSignatureIdentifierBuilderThe default constructor- Parameters:
- signature-- AdvancedSignature
 
 
- 
- 
Method Details- 
buildBuildsSignatureIdentifierfor the providedAdvancedSignature- Specified by:
- buildin interface- SignatureIdentifierBuilder
- Returns:
- SignatureIdentifier
 
- 
buildBinariesprotected byte[] buildBinaries()Builds unique binary data describing the signature object- Returns:
- a byte array
 
- 
writeSignedPropertiesWrite signed properties of a signature to the givenByteArrayOutputStream- Parameters:
- baos-- ByteArrayOutputStreamto enrich with the basic signature parameters
- Throws:
- IOException- if in exception has been thrown
 
- 
writeStringThe method used to write astrintobaos- Parameters:
- baos-- ByteArrayOutputStreamto write String into
- str-- String
- Throws:
- IOException- if in exception occurs
 
- 
writeSignaturePositionWrites the current signature position between other signature entries on the same level- Parameters:
- baos-- ByteArrayOutputStreamto add data to
- Throws:
- IOException- if an exception occurs
 
- 
getPositionIdReturns Id representing a current signature position in a file, considering its pre-siblings, master signatures when present- Returns:
- Stringposition id
 
- 
getCounterSignaturePositionReturns a current counter signature position in its master signature- Parameters:
- masterSignature-- AdvancedSignatureto analyze
- Returns:
- counter signature position
 
- 
getSignaturePositionReturns a position of a signature in the provided file- Returns:
- signature position in a file
 
- 
getSignatureFilePositionThis method returns a position of a signature file NOTE: this method returns a signature filename for ASiC containers, empty string for others- Returns:
- signature file position
 
 
-