Package org.xipki.ca.mgmt.db.port
Class DbPorter
- java.lang.Object
-
- org.xipki.ca.mgmt.db.DbToolBase
-
- org.xipki.ca.mgmt.db.port.DbPorter
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class DbPorter extends DbToolBase
Database porter.- Since:
- 2.0.0
- Author:
- Lijun Liao (xipki)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDbPorter.CaDbEntryTypestatic classDbPorter.DbPortFileNameIteratorstatic classDbPorter.OcspDbEntryType
-
Field Summary
Fields Modifier and Type Field Description protected DbSchemaInfodbSchemaInfoprotected intdbSchemaVersionstatic java.lang.StringEXPORT_PROCESS_LOG_FILENAMEstatic java.lang.StringFILENAME_CA_CERTSTOREstatic java.lang.StringFILENAME_CA_CONFIGURATIONstatic java.lang.StringFILENAME_OCSP_CERTSTOREstatic java.lang.StringIMPORT_PROCESS_LOG_FILENAMEstatic java.lang.StringIMPORT_TO_OCSP_PROCESS_LOG_FILENAMEprotected intmaxX500nameLenstatic intVERSION_V1For XiPKI Version 5.3.xstatic intVERSION_V2For XiPKI Version 5.4.x-
Fields inherited from class org.xipki.ca.mgmt.db.DbToolBase
baseDir, connection, datasource, stopMe
-
-
Constructor Summary
Constructors Constructor Description DbPorter(org.xipki.datasource.DataSourceWrapper datasource, java.lang.String baseDir, java.util.concurrent.atomic.AtomicBoolean stopMe)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.xipki.util.FileOrBinarybuildFileOrBase64Binary(java.lang.String base64Content, java.lang.String fileName)protected org.xipki.util.FileOrBinarybuildFileOrBinary(byte[] content, java.lang.String fileName)protected org.xipki.util.FileOrValuebuildFileOrValue(java.lang.String content, java.lang.String fileName)static voidechoToFile(java.lang.String content, java.io.File file)protected byte[]readContent(org.xipki.util.FileOrBinary fileOrBinary)protected java.lang.StringreadContent(org.xipki.util.FileOrValue fileOrValue)-
Methods inherited from class org.xipki.ca.mgmt.db.DbToolBase
buildFilename, close, commit, count, deleteFromTableWithLargerId, deleteTmpFiles, disableAutoCommit, getDbConfProperties, getZipOutputStream, max, max, min, min, prepareStatement, recoverAutoCommit, releaseResources, rollback, setBoolean, setInt, setLong, setSavepoint, tableExists, tableHasColumn, translate, writeLine
-
-
-
-
Field Detail
-
FILENAME_CA_CONFIGURATION
public static final java.lang.String FILENAME_CA_CONFIGURATION
- See Also:
- Constant Field Values
-
FILENAME_CA_CERTSTORE
public static final java.lang.String FILENAME_CA_CERTSTORE
- See Also:
- Constant Field Values
-
FILENAME_OCSP_CERTSTORE
public static final java.lang.String FILENAME_OCSP_CERTSTORE
- See Also:
- Constant Field Values
-
EXPORT_PROCESS_LOG_FILENAME
public static final java.lang.String EXPORT_PROCESS_LOG_FILENAME
- See Also:
- Constant Field Values
-
IMPORT_PROCESS_LOG_FILENAME
public static final java.lang.String IMPORT_PROCESS_LOG_FILENAME
- See Also:
- Constant Field Values
-
IMPORT_TO_OCSP_PROCESS_LOG_FILENAME
public static final java.lang.String IMPORT_TO_OCSP_PROCESS_LOG_FILENAME
- See Also:
- Constant Field Values
-
VERSION_V1
public static final int VERSION_V1
For XiPKI Version 5.3.x- See Also:
- Constant Field Values
-
VERSION_V2
public static final int VERSION_V2
For XiPKI Version 5.4.x- See Also:
- Constant Field Values
-
dbSchemaVersion
protected final int dbSchemaVersion
-
maxX500nameLen
protected final int maxX500nameLen
-
dbSchemaInfo
protected final DbSchemaInfo dbSchemaInfo
-
-
Method Detail
-
buildFileOrValue
protected org.xipki.util.FileOrValue buildFileOrValue(java.lang.String content, java.lang.String fileName) throws java.io.IOException- Throws:
java.io.IOException
-
buildFileOrBase64Binary
protected org.xipki.util.FileOrBinary buildFileOrBase64Binary(java.lang.String base64Content, java.lang.String fileName) throws java.io.IOException- Throws:
java.io.IOException
-
buildFileOrBinary
protected org.xipki.util.FileOrBinary buildFileOrBinary(byte[] content, java.lang.String fileName) throws java.io.IOException- Throws:
java.io.IOException
-
readContent
protected byte[] readContent(org.xipki.util.FileOrBinary fileOrBinary) throws java.io.IOException- Throws:
java.io.IOException
-
readContent
protected java.lang.String readContent(org.xipki.util.FileOrValue fileOrValue) throws java.io.IOException- Throws:
java.io.IOException
-
echoToFile
public static void echoToFile(java.lang.String content, java.io.File file) throws java.io.IOException- Throws:
java.io.IOException
-
-