Package org.xipki.ca.gateway.acme
Class AcmeDataSource
- java.lang.Object
-
- org.xipki.ca.gateway.acme.AcmeDataSource
-
public class AcmeDataSource extends java.lang.Object- Author:
- Lijun Liao (xipki)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAcmeDataSource.IdChecker
-
Constructor Summary
Constructors Constructor Description AcmeDataSource(org.xipki.datasource.DataSourceWrapper dataSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNewAccount(AcmeAccount account)voidaddNewOrder(AcmeOrder order)intcleanOrders(java.time.Instant certNotAfter, java.time.Instant notFinishedOrderExpires)AcmeAccountgetAccount(long accountId)AcmeAccountgetAccountForJwk(java.util.Map<java.lang.String,java.lang.String> jwk)AcmeAuthzgetAuthz(byte[] authzId)byte[]getCert(long orderId)java.util.List<ChallId>getChallengesToValidate()byte[]getCsr(long orderId)AcmeOrdergetOrder(long orderId)AcmeOrdergetOrderForCertSha256(java.lang.String certSha256)java.util.List<java.lang.Long>getOrderIds(long accountId)java.util.List<java.lang.Long>getOrdersToEnroll()longnextAccountId()int[]nextAuthzIds(int numAuthzs)int[]nextChallIds(int numChalls)longnextOrderId()voidsetIdChecker(AcmeDataSource.IdChecker idChecker)voidupdateAccount(AcmeAccount oldAccount, AcmeAccount newAccount)voidupdateOrder(AcmeOrder oldOrder, AcmeOrder newOrder)
-
-
-
Method Detail
-
setIdChecker
public void setIdChecker(AcmeDataSource.IdChecker idChecker)
-
addNewAccount
public void addNewAccount(AcmeAccount account) throws AcmeSystemException
- Throws:
AcmeSystemException
-
getCert
public byte[] getCert(long orderId) throws AcmeSystemException- Throws:
AcmeSystemException
-
getCsr
public byte[] getCsr(long orderId) throws AcmeSystemException- Throws:
AcmeSystemException
-
getAccount
public AcmeAccount getAccount(long accountId) throws AcmeSystemException
- Throws:
AcmeSystemException
-
updateAccount
public void updateAccount(AcmeAccount oldAccount, AcmeAccount newAccount) throws AcmeSystemException
- Throws:
AcmeSystemException
-
getAccountForJwk
public AcmeAccount getAccountForJwk(java.util.Map<java.lang.String,java.lang.String> jwk) throws AcmeSystemException
- Throws:
AcmeSystemException
-
addNewOrder
public void addNewOrder(AcmeOrder order) throws AcmeSystemException
- Throws:
AcmeSystemException
-
updateOrder
public void updateOrder(AcmeOrder oldOrder, AcmeOrder newOrder) throws AcmeSystemException
- Throws:
AcmeSystemException
-
getOrder
public AcmeOrder getOrder(long orderId) throws AcmeSystemException
- Throws:
AcmeSystemException
-
getOrderForCertSha256
public AcmeOrder getOrderForCertSha256(java.lang.String certSha256) throws AcmeSystemException
- Throws:
AcmeSystemException
-
getAuthz
public AcmeAuthz getAuthz(byte[] authzId) throws AcmeSystemException
- Throws:
AcmeSystemException
-
getOrderIds
public java.util.List<java.lang.Long> getOrderIds(long accountId) throws AcmeSystemException- Throws:
AcmeSystemException
-
getChallengesToValidate
public java.util.List<ChallId> getChallengesToValidate() throws AcmeSystemException
- Throws:
AcmeSystemException
-
getOrdersToEnroll
public java.util.List<java.lang.Long> getOrdersToEnroll() throws AcmeSystemException- Throws:
AcmeSystemException
-
cleanOrders
public int cleanOrders(java.time.Instant certNotAfter, java.time.Instant notFinishedOrderExpires) throws AcmeSystemException- Throws:
AcmeSystemException
-
nextAccountId
public long nextAccountId() throws org.xipki.datasource.DataAccessException- Throws:
org.xipki.datasource.DataAccessException
-
nextOrderId
public long nextOrderId() throws org.xipki.datasource.DataAccessException- Throws:
org.xipki.datasource.DataAccessException
-
nextAuthzIds
public int[] nextAuthzIds(int numAuthzs)
-
nextChallIds
public int[] nextChallIds(int numChalls)
-
-