java.lang.Object
org.shredzone.acme4j.OrderBuilder
A builder for a new
Order
object.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionEnables short-term automatic renewal of the certificate.Announces that the client wishes to fetch the auto-renewed certificate via GET request.autoRenewalEnd
(Instant end) Sets the latest date of validity of the last issued certificate.autoRenewalLifetime
(Duration duration) Sets the maximum validity period of each certificate.autoRenewalLifetimeAdjust
(Duration duration) Sets the amount of pre-dating each certificate.autoRenewalStart
(Instant start) Sets the earliest date of validity of the first issued certificate.create()
Sends a new order to the server, and returns anOrder
object.Adds a domain name to the order.Adds domain names to the order.domains
(Collection<String> domains) Adds a collection of domain names to the order.identifier
(Identifier identifier) Adds anIdentifier
to the order.identifiers
(Collection<Identifier> identifiers) Adds a collection ofIdentifier
to the order.Sets a "not after" date in the certificate.Sets a "not before" date in the certificate.
-
Constructor Details
-
OrderBuilder
Create a newOrderBuilder
.- Parameters:
login
-Login
to bind with
-
-
Method Details
-
domain
Adds a domain name to the order.- Parameters:
domain
- Name of a domain to be ordered. May be a wildcard domain if supported by the CA. IDN names are accepted and will be ACE encoded automatically.- Returns:
- itself
-
domains
Adds domain names to the order.- Parameters:
domains
- Collection of domain names to be ordered. May be wildcard domains if supported by the CA. IDN names are accepted and will be ACE encoded automatically.- Returns:
- itself
-
domains
Adds a collection of domain names to the order.- Parameters:
domains
- Collection of domain names to be ordered. May be wildcard domains if supported by the CA. IDN names are accepted and will be ACE encoded automatically.- Returns:
- itself
-
identifier
Adds anIdentifier
to the order.- Parameters:
identifier
-Identifier
to be added to the order.- Returns:
- itself
- Since:
- 2.3
-
identifiers
Adds a collection ofIdentifier
to the order.- Parameters:
identifiers
- Collection ofIdentifier
to be added to the order.- Returns:
- itself
- Since:
- 2.3
-
notBefore
Sets a "not before" date in the certificate. May be ignored by the CA.- Parameters:
notBefore
- "not before" date- Returns:
- itself
-
notAfter
Sets a "not after" date in the certificate. May be ignored by the CA.- Parameters:
notAfter
- "not after" date- Returns:
- itself
-
autoRenewal
Enables short-term automatic renewal of the certificate. Must be supported by the CA.Automatic renewals cannot be combined with
notBefore(Instant)
ornotAfter(Instant)
.- Returns:
- itself
- Since:
- 2.3
-
autoRenewalStart
Sets the earliest date of validity of the first issued certificate. If not set, the start date is the earliest possible date.Implies
autoRenewal()
.- Parameters:
start
- Start date of validity- Returns:
- itself
- Since:
- 2.3
-
autoRenewalEnd
Sets the latest date of validity of the last issued certificate. If not set, the CA's default is used.Implies
autoRenewal()
.- Parameters:
end
- End date of validity- Returns:
- itself
- Since:
- 2.3
- See Also:
-
autoRenewalLifetime
Sets the maximum validity period of each certificate. If not set, the CA's default is used.Implies
autoRenewal()
.- Parameters:
duration
- Duration of validity of each certificate- Returns:
- itself
- Since:
- 2.3
- See Also:
-
autoRenewalLifetimeAdjust
Sets the amount of pre-dating each certificate. If not set, the CA's default (0) is used.Implies
autoRenewal()
.- Parameters:
duration
- Duration of certificate pre-dating- Returns:
- itself
- Since:
- 2.7
-
autoRenewalEnableGet
Announces that the client wishes to fetch the auto-renewed certificate via GET request. If not used, the STAR certificate can only be fetched via POST-as-GET request.Metadata.isAutoRenewalGetAllowed()
must returntrue
in order for this option to work.This option is only needed if you plan to fetch the STAR certificate via other means than by using acme4j.
Implies
autoRenewal()
.- Returns:
- itself
- Since:
- 2.6
-
create
Sends a new order to the server, and returns anOrder
object.- Returns:
Order
that was created- Throws:
AcmeException
-