- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<Package>
-
- com.aoindustries.aoserv.client.billing.Package
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,Disablable,SingleTableObject<Integer,Package>,Comparable<Package>
public final class Package extends CachedObjectIntegerKey<Package> implements Disablable, Comparable<Package>
APackageis a set of resources and its associated price. AnAccountmay multiplePackages, each with their own monthly fee and sets of resources such as web sites, databases and users. Security is not maintained betweenPackages, only betweenaccounts. If intra-account security is required, please use childaccounts.- Author:
- AO Industries, Inc.
- See Also:
Account,PackageDefinition
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOLUMN_NAME_namestatic intDEFAULT_EMAIL_IN_BURSTThe default inbound email burst before rate limiting.static floatDEFAULT_EMAIL_IN_RATEThe default sustained inbound email rate in emails/second.static intDEFAULT_EMAIL_OUT_BURSTThe default outbound email burst before rate limiting.static floatDEFAULT_EMAIL_OUT_RATEThe default sustained outbound email rate in emails/second.static intDEFAULT_EMAIL_RELAY_BURSTThe default relay email burst before rate limiting.static floatDEFAULT_EMAIL_RELAY_RATEThe default sustained relay email rate in emails/second.-
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 Package()
-
Method Summary
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode, toStringImpl
-
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
-
-
-
-
Field Detail
-
COLUMN_NAME_name
public static final String COLUMN_NAME_name
- See Also:
- Constant Field Values
-
DEFAULT_EMAIL_IN_BURST
public static final int DEFAULT_EMAIL_IN_BURST
The default inbound email burst before rate limiting.- See Also:
- Constant Field Values
-
DEFAULT_EMAIL_IN_RATE
public static final float DEFAULT_EMAIL_IN_RATE
The default sustained inbound email rate in emails/second.- See Also:
- Constant Field Values
-
DEFAULT_EMAIL_OUT_BURST
public static final int DEFAULT_EMAIL_OUT_BURST
The default outbound email burst before rate limiting.- See Also:
- Constant Field Values
-
DEFAULT_EMAIL_OUT_RATE
public static final float DEFAULT_EMAIL_OUT_RATE
The default sustained outbound email rate in emails/second.- See Also:
- Constant Field Values
-
DEFAULT_EMAIL_RELAY_BURST
public static final int DEFAULT_EMAIL_RELAY_BURST
The default relay email burst before rate limiting.- See Also:
- Constant Field Values
-
DEFAULT_EMAIL_RELAY_RATE
public static final float DEFAULT_EMAIL_RELAY_RATE
The default sustained relay email rate in emails/second.- See Also:
- Constant Field Values
-
-
Method Detail
-
addDNSZone
public void addDNSZone(String zone, InetAddress ip, int ttl) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
addEmailSmtpRelay
public int addEmailSmtpRelay(Server aoServer, HostAddress host, SmtpRelayType type, long duration) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
addLinuxGroup
public void addLinuxGroup(Group.Name name, GroupType type) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
addLinuxGroup
public void addLinuxGroup(Group.Name name, String type) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
addUsername
public void addUsername(User.Name username) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
canDisable
public boolean canDisable() throws IOException, SQLException- Specified by:
canDisablein interfaceDisablable- Throws:
IOExceptionSQLException
-
canEnable
public boolean canEnable() throws SQLException, IOException- Specified by:
canEnablein interfaceDisablable- Throws:
SQLExceptionIOException
-
disable
public void disable(DisableLog dl) throws IOException, SQLException
- Specified by:
disablein interfaceDisablable- Throws:
IOExceptionSQLException
-
enable
public void enable() throws IOException, SQLException- Specified by:
enablein interfaceDisablable- Throws:
IOExceptionSQLException
-
getBackupReports
public List<BackupReport> getBackupReports() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getAccount_name
public Account.Name getAccount_name()
-
getAccount
public Account getAccount() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,Package>
-
getCreated
public UnmodifiableTimestamp getCreated()
-
getCreatedBy
public Administrator getCreatedBy() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getCvsRepositories
public List<CvsRepository> getCvsRepositories() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
isDisabled
public boolean isDisabled()
Description copied from interface:DisablableChecks if this object is disabled. This should execute very quickly (not incur any round-trip to any database) and thus does not throw any checked exceptions.- Specified by:
isDisabledin interfaceDisablable
-
getDisableLog_id
public Integer getDisableLog_id()
-
getDisableLog
public DisableLog getDisableLog() throws SQLException, IOException
- Specified by:
getDisableLogin interfaceDisablable- Throws:
SQLExceptionIOException
-
getEmailInBurst
public int getEmailInBurst()
Gets the inbound burst limit for emails, the number of emails that may be sent before limiting occurs. A value of-1indicates unlimited.
-
getEmailInRate
public float getEmailInRate()
Gets the inbound sustained email rate in emails/second. A value ofFloat.NaNindicates unlimited.
-
getEmailOutBurst
public int getEmailOutBurst()
Gets the outbound burst limit for emails, the number of emails that may be sent before limiting occurs. A value of-1indicates unlimited.
-
getEmailOutRate
public float getEmailOutRate()
Gets the outbound sustained email rate in emails/second. A value ofFloat.NaNindicates unlimited.
-
getEmailRelayBurst
public int getEmailRelayBurst()
Gets the relay burst limit for emails, the number of emails that may be sent before limiting occurs. A value of-1indicates unlimited.
-
getEmailRelayRate
public float getEmailRelayRate()
Gets the relay sustained email rate in emails/second. A value ofFloat.NaNindicates unlimited.
-
getDNSZones
public List<Zone> getDNSZones() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEmailLists
public List<List> getEmailLists() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEmailPipes
public List<Pipe> getEmailPipes() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getHttpdSharedTomcats
public List<SharedTomcat> getHttpdSharedTomcats() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getHttpdServers
public List<HttpdServer> getHttpdServers() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getHttpdSites
public List<Site> getHttpdSites() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getIPAddresses
public List<IpAddress> getIPAddresses() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getLinuxGroups
public List<Group> getLinuxGroups() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getMySQLDatabases
public List<Database> getMySQLDatabases() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getFailoverMySQLReplications
public List<MysqlReplication> getFailoverMySQLReplications() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getMySQLUsers
public List<User> getMySQLUsers() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getName
public Account.Name getName()
-
getNetBinds
public List<Bind> getNetBinds() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getNetBinds
public List<Bind> getNetBinds(IpAddress ip) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getPackageDefinition_id
public int getPackageDefinition_id()
-
getPackageDefinition
public PackageDefinition getPackageDefinition() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getPostgresDatabases
public List<Database> getPostgresDatabases() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getPostgresUsers
public List<User> getPostgresUsers() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getSendmailServers
public List<SendmailServer> getSendmailServers() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getHost
public Host getHost(String name) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getServers
public List<Host> getServers() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEmailDomains
public List<Domain> getEmailDomains() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEmailSmtpRelays
public List<SmtpRelay> getEmailSmtpRelays() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getSslCertificates
public List<Certificate> getSslCertificates() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,Package>
-
getUsernames
public List<User> getUsernames() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
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,Package>- 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,Package>- 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,Package>- Throws:
IOException
-
compareTo
public int compareTo(Package o)
- Specified by:
compareToin interfaceComparable<Package>
-
-