All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.nagyesta.lowkeyvault.service.certificate.CertificateLifetimeActionTrigger Maven / Gradle / Ivy

There is a newer version: 2.5.81
Show newest version
package com.github.nagyesta.lowkeyvault.service.certificate;

import lombok.NonNull;

import java.time.OffsetDateTime;

public record CertificateLifetimeActionTrigger(CertificateLifetimeActionTriggerType triggerType, int value) {

    public CertificateLifetimeActionTrigger(
            @NonNull final CertificateLifetimeActionTriggerType triggerType, final int value) {
        this.triggerType = triggerType;
        this.value = value;
    }

    public void validate(final int validityMonths) {
        triggerType.validate(validityMonths, value);
    }

    public long triggersAfterDays(final OffsetDateTime validityStart, final OffsetDateTime expiry) {
        return triggerType.triggersAfterDays(validityStart, expiry, value);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy