/** * Returns the maximum validity period of each certificate, or {@code null}. * * @since 2.3 */ @CheckForNull public Duration getRecurrentCertificateValidity() { return getJSON().get("recurrent-certificate-validity") .optional() .map(Value::asDuration) .orElse(null); }
/** * Checks if this order is recurrent, according to the ACME STAR specifications. * * @since 2.3 */ public boolean isRecurrent() { return getJSON().get("recurrent") .optional() .map(Value::asBoolean) .orElse(false); }
/** * Returns {@code true} if STAR certificates from this order can also be fetched via * GET requests. * * @since 2.6 */ public boolean isRecurrentGetEnabled() { return getJSON().get("recurrent-certificate-get") .optional() .map(Value::asBoolean) .orElse(false); }
/** * Gets the expiry date of the authorization, if set by the server. */ @CheckForNull public Instant getExpires() { return getJSON().get("expires").map(Value::asInstant).orElse(null); }
/** * Gets the "not before" date that was used for the order, or {@code null}. */ @CheckForNull public Instant getNotBefore() { return getJSON().get("notBefore").map(Value::asInstant).orElse(null); }
/** * Gets the "not before" date that was used for the order, or {@code null}. */ @CheckForNull public Instant getNotBefore() { return getJSON().get("notBefore").map(Value::asInstant).orElse(null); }
/** * Checks if this order is recurrent, according to the ACME STAR specifications. * * @since 2.3 */ public boolean isRecurrent() { return getJSON().get("recurrent") .optional() .map(Value::asBoolean) .orElse(false); }
/** * Gets the expiry date of the authorization, if set by the server. */ @CheckForNull public Instant getExpires() { return getJSON().get("expires").map(Value::asInstant).orElse(null); }
/** * Gets the "not after" date that was used for the order, or {@code null}. */ @CheckForNull public Instant getNotAfter() { return getJSON().get("notAfter").map(Value::asInstant).orElse(null); }
/** * Returns {@code true} if STAR certificates from this order can also be fetched via * GET requests. * * @since 2.6 */ public boolean isRecurrentGetEnabled() { return getJSON().get("recurrent-certificate-get") .optional() .map(Value::asBoolean) .orElse(false); }
/** * Gets the list of {@link Identifier} to be ordered. * * @since 2.3 */ public List<Identifier> getIdentifiers() { return Collections.unmodifiableList(getJSON().get("identifiers") .asArray() .stream() .map(Value::asIdentifier) .collect(toList())); }
/** * Gets the {@link Certificate} if it is available. {@code null} otherwise. */ @CheckForNull public Certificate getCertificate() { return getJSON().get("certificate") .map(Value::asURL) .map(getLogin()::bindCertificate) .orElse(null); }
/** * Gets the {@link Certificate} if it is available. {@code null} otherwise. */ @CheckForNull public Certificate getCertificate() { return getJSON().get("certificate") .map(Value::asURL) .map(getLogin()::bindCertificate) .orElse(null); }
/** * Gets the {@link Authorization} required for this order, in no specific order. */ public List<Authorization> getAuthorizations() { Login login = getLogin(); return Collections.unmodifiableList(getJSON().get("authorizations") .asArray() .stream() .map(Value::asURL) .map(login::bindAuthorization) .collect(toList())); }
/** * Gets the {@link Authorization} required for this order, in no specific order. */ public List<Authorization> getAuthorizations() { Login login = getLogin(); return Collections.unmodifiableList(getJSON().get("authorizations") .asArray() .stream() .map(Value::asURL) .map(login::bindAuthorization) .collect(toList())); }
/** * Returns the current status of the order. * <p> * Possible values are: {@link Status#PENDING}, {@link Status#READY}, * {@link Status#PROCESSING}, {@link Status#VALID}, {@link Status#INVALID}. */ public Status getStatus() { return getJSON().get("status").asStatus(); }
/** * Gets the location {@link URL} of where to send the finalization call to. * <p> * For internal purposes. Use {@link #execute(byte[])} to finalize an order. */ public URL getFinalizeLocation() { return getJSON().get("finalize").asURL(); }
/** * Returns the current status of the order. * <p> * Possible values are: {@link Status#PENDING}, {@link Status#READY}, * {@link Status#PROCESSING}, {@link Status#VALID}, {@link Status#INVALID}. */ public Status getStatus() { return getJSON().get("status").asStatus(); }
/** * Gets the location {@link URL} of where to send the finalization call to. * <p> * For internal purposes. Use {@link #execute(byte[])} to finalize an order. */ public URL getFinalizeLocation() { return getJSON().get("finalize").asURL(); }
/** * Returns a {@link Problem} document if the order failed. */ @CheckForNull public Problem getError() { return getJSON().get("error").map(v -> v.asProblem(getLocation())).orElse(null); }