- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<Certificate>
-
- com.aoindustries.aoserv.client.pki.Certificate
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,SingleTableObject<Integer,Certificate>
public final class Certificate extends CachedObjectIntegerKey<Certificate>
- Author:
- AO Industries, Inc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCertificate.Check
-
Field Summary
-
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
-
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
-
Fields inherited from class com.aoindustries.aoserv.client.AOServObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
-
Constructor Summary
Constructors Constructor Description Certificate()
-
Method Summary
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
-
Methods inherited from class com.aoindustries.aoserv.client.AOServObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxID, getLinuxUserName, getMacAddress, getMySQLDatabaseName, getMySQLServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
-
-
-
Method Detail
-
toStringImpl
public String toStringImpl() throws SQLException, IOException
Description copied from class:AOServObjectAOServObject.toString()implementation that is allowed to throw exceptions.Implementation Note:
This default implementation callsAOServObject.toString()on the key (fromAOServObject.getKey()). When the key isnull, uses the default implementation fromObject.toString().- Overrides:
toStringImplin classCachedObjectIntegerKey<Certificate>- Throws:
SQLExceptionIOException
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,Certificate>
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,Certificate>
-
init
public void init(ResultSet result) throws SQLException
Description copied from class:AOServObjectInitializes this object from the raw database contents.- Specified by:
initin classAOServObject<Integer,Certificate>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<Integer,Certificate>- Throws:
IOException
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,Certificate>- Throws:
IOException
-
getLinuxServer
public Server getLinuxServer() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getPackage
public Package getPackage() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getKeyFile
public PosixPath getKeyFile()
The private key file.
-
getCsrFile
public PosixPath getCsrFile()
The optional CSR file.
-
getCertFile
public PosixPath getCertFile()
The public key file.
-
getChainFile
public PosixPath getChainFile()
The optional certificate chain file.
-
getCertbotName
public String getCertbotName()
-
getNames
public List<CertificateName> getNames() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getCommonName
public CertificateName getCommonName() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getAltNames
public List<CertificateName> getAltNames() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getOtherUses
public List<CertificateOtherUse> getOtherUses() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getCyrusImapdBinds
public List<CyrusImapdBind> getCyrusImapdBinds() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getCyrusImapdServers
public List<CyrusImapdServer> getCyrusImapdServers() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getHttpdSiteBinds
public List<VirtualHost> getHttpdSiteBinds() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getSendmailServersByServerCertificate
public List<SendmailServer> getSendmailServersByServerCertificate() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getSendmailServersByClientCertificate
public List<SendmailServer> getSendmailServersByClientCertificate() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
check
public List<Certificate.Check> check(boolean allowCached) throws IOException, SQLException
Performs a status check on this certificate.- Parameters:
allowCached- allow a cached response? Whenfalsemay be slow, but result will be up-to-date.trueis good for interactive use, whilefalseis good for background tasks such as certificate monitoring.- Throws:
IOExceptionSQLException
-
-