Class Profile<Encod,​Sig extends Signature<Encod>>

java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.signaturePolicy.decoder.Profile<Encod,​Sig>
All Implemented Interfaces:
SignaturePolicyInstance
Direct Known Subclasses:
CAdESBProfile, CAdESLTAProfile, CAdESLTProfile, CAdESTProfile, JAdESBProfile, JAdESLTAProfile, JAdESLTProfile, JAdESTProfile, PAdESProfileAbstract, XAdESBES, XAdESBProfile, XAdESLTAProfile, XAdESLTProfile, XAdESTProfile

public abstract class Profile<Encod,​Sig extends Signature<Encod>>
extends Object
implements SignaturePolicyInstance
  • Field Details

    • mandatedSignedAttributeList

      protected final List<String> mandatedSignedAttributeList
    • mandatedUnsignedAttributeList

      protected final List<String> mandatedUnsignedAttributeList
    • prohibitedUnsignedAttributeList

      protected final List<String> prohibitedUnsignedAttributeList
    • prohibitedSignedAttributeList

      protected final List<String> prohibitedSignedAttributeList
    • mandatedConditionalSignedAttributeList

      protected final List<List<String>> mandatedConditionalSignedAttributeList
    • conditionalSignedAttributeList

      protected final List<String> conditionalSignedAttributeList
    • conditionalUnsignedAttributeList

      protected final List<String> conditionalUnsignedAttributeList
  • Constructor Details

    • Profile

      public Profile()
  • Method Details

    • getSignaturePolicyType

      public SignaturePolicyProxy.SignaturePolicyType getSignaturePolicyType()
      Specified by:
      getSignaturePolicyType in interface SignaturePolicyInstance
    • isAtLeast

      public abstract boolean isAtLeast​(Profile.AdESLevel level)
    • validate

      public boolean validate​(Sig signature)
    • validateMandatoryConditionals

      public abstract org.apache.commons.lang3.tuple.Pair<Boolean,​List<String>> validateMandatoryConditionals​(Signature<Encod> signature, List<String> attrList)
    • validateMandatoryConditionalsLocal

      public org.apache.commons.lang3.tuple.Pair<Boolean,​List<String>> validateMandatoryConditionalsLocal​(Signature<Encod> signature, List<String> attrList)
      Valida os atributos condicionais obrigatorios para os perfis
      Parameters:
      signature - assinatura a ter seus parametros verificados
      attrList - lista de atributos que passarão pelo teste para verificação
      Returns:
      Um mapa de 1 parametro com a key sendo o resultado da verificação e o value sendo a lista de atributos a serem adicionados
    • addMandatoryConditionals

      public void addMandatoryConditionals​(List<String> mandatedList, List<String> attrList)
      adiciona os parametros como atributos obrigatorios do perfil
      Parameters:
      attrList - lista de atributos a ser adicionado
    • getMandatedUnsignedAttrs

      public List<String> getMandatedUnsignedAttrs()
    • getMandatedSignedAttrs

      public List<String> getMandatedSignedAttrs()
    • getProhibitedUnsignedAttrs

      public List<String> getProhibitedUnsignedAttrs()
    • getProhibitedSignedAttrs

      public List<String> getProhibitedSignedAttrs()
    • getMandatedConditionalSignedAttributeList

      public List<List<String>> getMandatedConditionalSignedAttributeList()
    • getMandatedUnsignedAttributeList

      public List<String> getMandatedUnsignedAttributeList()
    • getSignaturePolicyName

      public String getSignaturePolicyName()
      Specified by:
      getSignaturePolicyName in interface SignaturePolicyInstance
    • getNormativeReference

      public abstract String getNormativeReference()
    • getAdESLevel

      public abstract Profile.AdESLevel getAdESLevel()
      Description copied from interface: SignaturePolicyInstance
      Retorna o tipo do perfil
      Specified by:
      getAdESLevel in interface SignaturePolicyInstance
      Returns:
      tipo do perfil
    • loadAttributes

      public void loadAttributes​(Sig signature)
    • getAdES

      public String getAdES()
    • getSignatureValidationPolicy

      public SignatureValidationPolicy getSignatureValidationPolicy()
      Retorna a política de validação.
      Specified by:
      getSignatureValidationPolicy in interface SignaturePolicyInstance
      Returns:
      política de validação
    • getIdentifier

      public String getIdentifier()
    • getWarningAttributeList

      public abstract List<String> getWarningAttributeList()
      Método que retorna a lista de atributos que geram warnings
      Returns:
      lista de atributos que geram warnings
    • isInstanceOf

      public static <Encod,​ Sig extends Signature<Encod>> boolean isInstanceOf​(Sig signature, Profile<Encod,​Sig> profile)