Class KeyUsageCondition

java.lang.Object
eu.europa.esig.dss.tsl.dto.condition.KeyUsageCondition
All Implemented Interfaces:
eu.europa.esig.dss.model.tsl.Condition, Serializable

public class KeyUsageCondition extends Object implements eu.europa.esig.dss.model.tsl.Condition
Condition based on the certificate key usage
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyUsageCondition(eu.europa.esig.dss.enumerations.KeyUsageBit bit, boolean value)
    Constructs a new KeyUsageCondition.
    KeyUsageCondition(String usage, boolean value)
    Constructs a new KeyUsageCondition.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    check(eu.europa.esig.dss.model.x509.CertificateToken certificateToken)
     
    final eu.europa.esig.dss.enumerations.KeyUsageBit
    Returns the key usage to be checked.
    final boolean
    Returns the required bit value of the key usage to be checked.
     
    toString(String indent)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • KeyUsageCondition

      public KeyUsageCondition(eu.europa.esig.dss.enumerations.KeyUsageBit bit, boolean value)
      Constructs a new KeyUsageCondition.
      Parameters:
      bit - the key usage
      value - the required value of the key usage bit
    • KeyUsageCondition

      public KeyUsageCondition(String usage, boolean value)
      Constructs a new KeyUsageCondition.
      Parameters:
      usage - the key usage
      value - the required value of the key usage bit
  • Method Details

    • getBit

      public final eu.europa.esig.dss.enumerations.KeyUsageBit getBit()
      Returns the key usage to be checked.
      Returns:
      never null
    • getValue

      public final boolean getValue()
      Returns the required bit value of the key usage to be checked.
      Returns:
      the required bit value of the key usage to be checked
    • check

      public boolean check(eu.europa.esig.dss.model.x509.CertificateToken certificateToken)
      Specified by:
      check in interface eu.europa.esig.dss.model.tsl.Condition
    • toString

      public String toString(String indent)
      Specified by:
      toString in interface eu.europa.esig.dss.model.tsl.Condition
    • toString

      public String toString()
      Overrides:
      toString in class Object