Class RuleUtils

java.lang.Object
eu.europa.esig.dss.policy.RuleUtils

public final class RuleUtils extends Object
Converts TimeConstraint from a policy into the corresponding long time value
  • Method Details

    • convertDuration

      public static long convertDuration(TimeUnit fromJaxb, TimeUnit toJaxb, int value)
      Converts the given value to the corresponding long value
      Parameters:
      fromJaxb - eu.europa.esig.dss.policy.jaxb.TimeUnit of the value
      toJaxb - eu.europa.esig.dss.policy.jaxb.TimeUnit to obtain
      value - integer value to convert
      Returns:
      long time value
    • convertDuration

      public static long convertDuration(TimeConstraint timeConstraint)
      Converts the TimeConstraint to the corresponding long time value in milliseconds
      Parameters:
      timeConstraint - TimeConstraint
      Returns:
      long time value in milliseconds