public class CaManagerQueryExecutor extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CaManagerQueryExecutorBase.Table |
protected static class |
QueryExecutor.ColumnType |
protected static class |
QueryExecutor.DbSchemaInfo |
protected static class |
QueryExecutor.SqlColumn |
protected static class |
QueryExecutor.SqlColumn2 |
| Modifier and Type | Field and Description |
|---|---|
protected org.xipki.datasource.DataSourceWrapper |
datasource |
protected int |
dbSchemaVersion |
| Constructor and Description |
|---|
CaManagerQueryExecutor(org.xipki.datasource.DataSourceWrapper datasource) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCa(org.xipki.ca.api.mgmt.entry.CaEntry caEntry) |
void |
addCaAlias(String aliasName,
org.xipki.ca.api.NameId ca) |
void |
addCertprofile(org.xipki.ca.api.mgmt.entry.CertprofileEntry dbEntry) |
void |
addCertprofileToCa(org.xipki.ca.api.NameId profile,
org.xipki.ca.api.NameId ca) |
void |
addDbSchema(String name,
String value) |
void |
addEmbeddedRequestor(String requestorName) |
void |
addKeypairGen(org.xipki.ca.api.mgmt.entry.KeypairGenEntry dbEntry) |
void |
addPublisher(org.xipki.ca.api.mgmt.entry.PublisherEntry dbEntry) |
void |
addPublisherToCa(org.xipki.ca.api.NameId publisher,
org.xipki.ca.api.NameId ca) |
void |
addRequestor(org.xipki.ca.api.mgmt.entry.RequestorEntry dbEntry) |
void |
addRequestorToCa(org.xipki.ca.api.mgmt.entry.CaHasRequestorEntry requestor,
org.xipki.ca.api.NameId ca) |
void |
addSigner(org.xipki.ca.api.mgmt.entry.SignerEntry dbEntry) |
protected PreparedStatement |
buildPrepStmt(String sql,
QueryExecutor.SqlColumn2... columns) |
protected PreparedStatement |
buildPrepStmt0(String sql,
QueryExecutor.SqlColumn2... columns) |
protected String |
buildSelectFirstSql(String coreSql) |
protected String |
buildSelectFirstSql(String orderBy,
String coreSql) |
void |
changeCa(org.xipki.ca.api.mgmt.entry.ChangeCaEntry changeCaEntry,
org.xipki.ca.api.mgmt.entry.CaEntry currentCaEntry,
org.xipki.ca.api.mgmt.entry.CaConfColumn currentCaConfColumn,
org.xipki.security.SecurityFactory securityFactory) |
IdentifiedCertprofile |
changeCertprofile(org.xipki.ca.api.NameId nameId,
String type,
String conf,
CaManagerImpl certprofileManager) |
void |
changeDbSchema(String name,
String value) |
protected void |
changeIfNotNull(String tableName,
QueryExecutor.SqlColumn whereColumn,
QueryExecutor.SqlColumn... columns) |
KeypairGenEntryWrapper |
changeKeypairGen(String name,
String type,
String conf,
CaManagerImpl manager) |
IdentifiedCertPublisher |
changePublisher(String name,
String type,
String conf,
CaManagerImpl publisherManager) |
RequestorEntryWrapper |
changeRequestor(org.xipki.ca.api.NameId nameId,
String type,
String conf,
org.xipki.password.PasswordResolver passwordResolver) |
SignerEntryWrapper |
changeSigner(String name,
String type,
String conf,
String base64Cert,
CaManagerImpl signerManager) |
void |
changeSystemEvent(CertStore.SystemEvent systemEvent) |
protected static QueryExecutor.SqlColumn2 |
col2Bool(Boolean value) |
protected static QueryExecutor.SqlColumn2 |
col2Int(Integer value) |
protected static QueryExecutor.SqlColumn2 |
col2Long(Long value) |
protected static QueryExecutor.SqlColumn2 |
col2Str(String value) |
protected static QueryExecutor.SqlColumn2 |
col2Timestamp(Timestamp value) |
protected static QueryExecutor.SqlColumn |
colBool(String name,
Boolean value) |
protected static QueryExecutor.SqlColumn |
colInt(String name,
Integer value) |
protected static QueryExecutor.SqlColumn |
colLong(String name,
Long value) |
protected static QueryExecutor.SqlColumn |
colStr(String name,
String value) |
protected static QueryExecutor.SqlColumn |
colStr(String name,
String value,
boolean sensitive,
boolean signerConf) |
void |
commitNextCrlNoIfLess(org.xipki.ca.api.NameId ca,
long nextCrlNo) |
Map<String,Integer> |
createCaAliases() |
Set<Integer> |
createCaHasProfiles(org.xipki.ca.api.NameId ca) |
Set<Integer> |
createCaHasPublishers(org.xipki.ca.api.NameId ca) |
Set<org.xipki.ca.api.mgmt.entry.CaHasRequestorEntry> |
createCaHasRequestors(org.xipki.ca.api.NameId ca) |
CaInfo |
createCaInfo(String name,
CertStore certstore) |
org.xipki.ca.api.mgmt.entry.CertprofileEntry |
createCertprofile(String name) |
org.xipki.ca.api.mgmt.entry.KeypairGenEntry |
createKeypairGen(String name) |
org.xipki.ca.api.mgmt.entry.PublisherEntry |
createPublisher(String name) |
org.xipki.ca.api.mgmt.entry.RequestorEntry |
createRequestor(String name) |
org.xipki.ca.api.mgmt.entry.SignerEntry |
createSigner(String name) |
boolean |
deleteRowWithName(String name,
String table) |
protected org.xipki.ca.server.db.ResultRow |
execQuery1PrepStmt(String sql,
QueryExecutor.SqlColumn2... params) |
protected org.xipki.ca.server.db.ResultRow |
execQuery1PrepStmt0(String sql,
QueryExecutor.SqlColumn2... params) |
protected List<org.xipki.ca.server.db.ResultRow> |
execQueryPrepStmt(String sql,
QueryExecutor.SqlColumn2... params) |
protected List<org.xipki.ca.server.db.ResultRow> |
execQueryPrepStmt0(String sql,
QueryExecutor.SqlColumn2... params) |
protected List<org.xipki.ca.server.db.ResultRow> |
execQueryStmt(String sql) |
protected List<org.xipki.ca.server.db.ResultRow> |
execQueryStmt0(String sql) |
protected int |
execUpdatePrepStmt(String sql,
QueryExecutor.SqlColumn2... params) |
protected int |
execUpdatePrepStmt0(String sql,
QueryExecutor.SqlColumn2... params) |
protected int |
execUpdateStmt(String sql) |
protected int |
execUpdateStmt0(String sql) |
Map<String,String> |
getDbSchemas() |
int |
getDbSchemaVersion() |
protected Integer |
getIdForName(String sql,
String name) |
protected Map<Integer,String> |
getIdNameMap(String tableName) |
protected int |
getNonNullIdForName(String sql,
String name) |
Integer |
getRequestorId(String requestorName) |
CertStore.SystemEvent |
getSystemEvent(String eventName)
Retrieve the system event.
|
List<String> |
namesFromTable(String table) |
protected void |
notNulls(Object param1,
String name1,
Object param2,
String name2) |
protected void |
notNulls(Object param1,
String name1,
Object param2,
String name2,
Object param3,
String name3) |
protected void |
notNulls(Object param1,
String name1,
Object param2,
String name2,
Object param3,
String name3,
Object param4,
String name4) |
void |
removeCa(String caName) |
void |
removeCaAlias(String aliasName) |
void |
removeCertprofileFromCa(String profileName,
String caName) |
void |
removeDbSchema(String name) |
void |
removePublisherFromCa(String publisherName,
String caName) |
void |
removeRequestorFromCa(String requestorName,
String caName) |
void |
revokeCa(String caName,
org.xipki.security.CertRevocationInfo revocationInfo) |
protected static String |
str(String sa,
String sb) |
void |
unlockCa() |
void |
unrevokeCa(String caName) |
protected int dbSchemaVersion
protected final org.xipki.datasource.DataSourceWrapper datasource
public CaManagerQueryExecutor(org.xipki.datasource.DataSourceWrapper datasource)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic CertStore.SystemEvent getSystemEvent(String eventName) throws org.xipki.ca.api.mgmt.CaMgmtException
eventName - Event namenull.org.xipki.ca.api.mgmt.CaMgmtException - If error occurs.public void changeSystemEvent(CertStore.SystemEvent systemEvent) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic Map<String,Integer> createCaAliases() throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic org.xipki.ca.api.mgmt.entry.CertprofileEntry createCertprofile(String name) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic org.xipki.ca.api.mgmt.entry.PublisherEntry createPublisher(String name) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic Integer getRequestorId(String requestorName) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic org.xipki.ca.api.mgmt.entry.RequestorEntry createRequestor(String name) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic org.xipki.ca.api.mgmt.entry.SignerEntry createSigner(String name) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic org.xipki.ca.api.mgmt.entry.KeypairGenEntry createKeypairGen(String name) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic CaInfo createCaInfo(String name, CertStore certstore) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic Set<org.xipki.ca.api.mgmt.entry.CaHasRequestorEntry> createCaHasRequestors(org.xipki.ca.api.NameId ca) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic Set<Integer> createCaHasProfiles(org.xipki.ca.api.NameId ca) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic Set<Integer> createCaHasPublishers(org.xipki.ca.api.NameId ca) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addCa(org.xipki.ca.api.mgmt.entry.CaEntry caEntry)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addCaAlias(String aliasName, org.xipki.ca.api.NameId ca) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addCertprofile(org.xipki.ca.api.mgmt.entry.CertprofileEntry dbEntry)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addCertprofileToCa(org.xipki.ca.api.NameId profile,
org.xipki.ca.api.NameId ca)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addPublisherToCa(org.xipki.ca.api.NameId publisher,
org.xipki.ca.api.NameId ca)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addRequestor(org.xipki.ca.api.mgmt.entry.RequestorEntry dbEntry)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addEmbeddedRequestor(String requestorName) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addRequestorToCa(org.xipki.ca.api.mgmt.entry.CaHasRequestorEntry requestor,
org.xipki.ca.api.NameId ca)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addPublisher(org.xipki.ca.api.mgmt.entry.PublisherEntry dbEntry)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void changeCa(org.xipki.ca.api.mgmt.entry.ChangeCaEntry changeCaEntry,
org.xipki.ca.api.mgmt.entry.CaEntry currentCaEntry,
org.xipki.ca.api.mgmt.entry.CaConfColumn currentCaConfColumn,
org.xipki.security.SecurityFactory securityFactory)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void commitNextCrlNoIfLess(org.xipki.ca.api.NameId ca,
long nextCrlNo)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic IdentifiedCertprofile changeCertprofile(org.xipki.ca.api.NameId nameId, String type, String conf, CaManagerImpl certprofileManager) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic RequestorEntryWrapper changeRequestor(org.xipki.ca.api.NameId nameId, String type, String conf, org.xipki.password.PasswordResolver passwordResolver) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic SignerEntryWrapper changeSigner(String name, String type, String conf, String base64Cert, CaManagerImpl signerManager) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic KeypairGenEntryWrapper changeKeypairGen(String name, String type, String conf, CaManagerImpl manager) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic IdentifiedCertPublisher changePublisher(String name, String type, String conf, CaManagerImpl publisherManager) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void removeCa(String caName) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void removeCaAlias(String aliasName) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void removeCertprofileFromCa(String profileName, String caName) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void removeRequestorFromCa(String requestorName, String caName) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void removePublisherFromCa(String publisherName, String caName) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void removeDbSchema(String name) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void revokeCa(String caName, org.xipki.security.CertRevocationInfo revocationInfo) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addKeypairGen(org.xipki.ca.api.mgmt.entry.KeypairGenEntry dbEntry)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addSigner(org.xipki.ca.api.mgmt.entry.SignerEntry dbEntry)
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void unlockCa()
throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void unrevokeCa(String caName) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void addDbSchema(String name, String value) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic void changeDbSchema(String name, String value) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic Map<String,String> getDbSchemas() throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic int getDbSchemaVersion()
public List<String> namesFromTable(String table) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionpublic boolean deleteRowWithName(String name, String table) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionprotected int execUpdateStmt0(String sql) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionprotected int execUpdatePrepStmt0(String sql, QueryExecutor.SqlColumn2... params) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionprotected List<org.xipki.ca.server.db.ResultRow> execQueryStmt0(String sql) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionprotected org.xipki.ca.server.db.ResultRow execQuery1PrepStmt0(String sql, QueryExecutor.SqlColumn2... params) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionprotected List<org.xipki.ca.server.db.ResultRow> execQueryPrepStmt0(String sql, QueryExecutor.SqlColumn2... params) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionprotected PreparedStatement buildPrepStmt0(String sql, QueryExecutor.SqlColumn2... columns) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionprotected void changeIfNotNull(String tableName, QueryExecutor.SqlColumn whereColumn, QueryExecutor.SqlColumn... columns) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionprotected int getNonNullIdForName(String sql, String name) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionprotected Integer getIdForName(String sql, String name) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionprotected Map<Integer,String> getIdNameMap(String tableName) throws org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.ca.api.mgmt.CaMgmtExceptionprotected static QueryExecutor.SqlColumn colBool(String name, Boolean value)
protected static QueryExecutor.SqlColumn colInt(String name, Integer value)
protected static QueryExecutor.SqlColumn colLong(String name, Long value)
protected static QueryExecutor.SqlColumn colStr(String name, String value)
protected static QueryExecutor.SqlColumn colStr(String name, String value, boolean sensitive, boolean signerConf)
protected static QueryExecutor.SqlColumn2 col2Bool(Boolean value)
protected static QueryExecutor.SqlColumn2 col2Int(Integer value)
protected static QueryExecutor.SqlColumn2 col2Long(Long value)
protected static QueryExecutor.SqlColumn2 col2Str(String value)
protected static QueryExecutor.SqlColumn2 col2Timestamp(Timestamp value)
protected int execUpdateStmt(String sql) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected int execUpdatePrepStmt(String sql, QueryExecutor.SqlColumn2... params) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected List<org.xipki.ca.server.db.ResultRow> execQueryStmt(String sql) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected org.xipki.ca.server.db.ResultRow execQuery1PrepStmt(String sql, QueryExecutor.SqlColumn2... params) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected List<org.xipki.ca.server.db.ResultRow> execQueryPrepStmt(String sql, QueryExecutor.SqlColumn2... params) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected PreparedStatement buildPrepStmt(String sql, QueryExecutor.SqlColumn2... columns) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected void notNulls(Object param1, String name1, Object param2, String name2, Object param3, String name3)
Copyright © 2022. All rights reserved.