Package eu.europa.esig.dss.model.tsl
Class CertificateTrustTime
java.lang.Object
eu.europa.esig.dss.model.timedependent.BaseTimeDependent
eu.europa.esig.dss.model.tsl.CertificateTrustTime
- All Implemented Interfaces:
TimeDependent
,Serializable
This class defines a validity period during which a certificate is considered as a trust anchor
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCertificateTrustTime
(boolean trusted) Constructor to create either a not trusted or indefinitely trusted entryCertificateTrustTime
(Date startDate, Date endDate) Default constructor -
Method Summary
Modifier and TypeMethodDescriptiongetJointTrustTime
(Date startDate, Date endDate) This method is used to create a joint time period using the current trust time and the given period betweenstartDate
andendDate
.boolean
Returns whether the corresponding certificate has a trusted periodboolean
isTrustedAtTime
(Date controlTime) This method verifies whether thecontrolTime
lies within the certificate trust time rangeMethods inherited from class eu.europa.esig.dss.model.timedependent.BaseTimeDependent
equals, getEndDate, getStartDate, hashCode, toString
-
Constructor Details
-
CertificateTrustTime
public CertificateTrustTime(boolean trusted) Constructor to create either a not trusted or indefinitely trusted entry- Parameters:
trusted
- whether the object corresponds to a trusted certificate token
-
CertificateTrustTime
-
-
Method Details
-
isTrusted
public boolean isTrusted()Returns whether the corresponding certificate has a trusted period- Returns:
- TRUE if the certificate has a trusted period, FALSE otherwise
-
isTrustedAtTime
-
getJointTrustTime
This method is used to create a joint time period using the current trust time and the given period betweenstartDate
andendDate
. NOTE: the method does not change the current time, but creates a new joint interval- Parameters:
startDate
-Date
the time of another period startendDate
-Date
the time of another period end- Returns:
CertificateTrustTime
-