Class XadesSigner
java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.xades.AbstractXadesSigner
br.ufsc.labsec.signature.conformanceVerifier.xades.XadesSigner
- All Implemented Interfaces:
Signer<XadesInformation>
- Direct Known Subclasses:
XadesCoSigner
public class XadesSigner extends AbstractXadesSigner implements Signer<XadesInformation>
Esta classe cria uma assinatura CXdES em um documento.
Estende
AbstractXadesSigner
e implementa Signer
.-
Field Summary
Fields inherited from class br.ufsc.labsec.signature.conformanceVerifier.xades.AbstractXadesSigner
signature, signatureContainer, xadesSignatureComponent
-
Constructor Summary
Constructors Constructor Description XadesSigner(XadesSignatureComponent xadesSignature)
Construtor -
Method Summary
Modifier and Type Method Description SignatureDataWrapper
getSignature(FileToBeSigned<? extends XadesInformation> fileToBeSigned)
InputStream
getSignatureStream()
Retorna o arquivo assinadoboolean
sign(FileToBeSigned<? extends XadesInformation> fileToBeSigned)
Realiza a assinaturaboolean
supports(FileToBeSigned<? extends XadesInformation> fileToBeSigned)
Verifica se o documento requisitado pode ser assinadoMethods inherited from class br.ufsc.labsec.signature.conformanceVerifier.xades.AbstractXadesSigner
getCertPath, getComponent, getMandatedSignedAttributeList, getMandatedUnsignedAttributeList, getPoliciesAvailable, getSignature, getSignedAttributesAvailable, getUnsignedAttributes, getUnsignedAttributesAvailable, selectAttribute, unselectAttribute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface br.ufsc.labsec.signature.Signer
getPoliciesAvailable, getSignedAttributesAvailable, getUnsignedAttributesAvailable
-
Constructor Details
-
XadesSigner
Construtor- Parameters:
xadesSignature
- Componente de assinatura XAdES
-
-
Method Details
-
sign
public boolean sign(FileToBeSigned<? extends XadesInformation> fileToBeSigned) throws SignerExceptionRealiza a assinatura- Specified by:
sign
in interfaceSigner<XadesInformation>
- Returns:
- Throws:
SignerException
-
getSignatureStream
Retorna o arquivo assinado- Specified by:
getSignatureStream
in interfaceSigner<XadesInformation>
- Returns:
- O
InputStream
do arquivo assinado
-
supports
public boolean supports(FileToBeSigned<? extends XadesInformation> fileToBeSigned) throws SignerException, CertificationPathExceptionVerifica se o documento requisitado pode ser assinado- Specified by:
supports
in interfaceSigner<XadesInformation>
- Parameters:
fileToBeSigned
- documento a ser assinado- Throws:
SignerException
CertificationPathException
-
getSignature
public SignatureDataWrapper getSignature(FileToBeSigned<? extends XadesInformation> fileToBeSigned) throws SignerException- Specified by:
getSignature
in interfaceSigner<XadesInformation>
- Throws:
SignerException
-