java.lang.Object
com.aoindustries.aoserv.client.AoservObject<Integer,Package>
com.aoindustries.aoserv.client.CachedObject<Integer,Package>
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>
A
Package is a set of resources and its associated price.
An Account may multiple Packages, each with
their own monthly fee and sets of resources such as web sites, databases
and users. Security is not maintained between Packages,
only between accounts. If intra-account security is
required, please use child accounts.- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intThe default inbound email burst before rate limiting.static final floatThe default sustained inbound email rate in emails/second.static final intThe default outbound email burst before rate limiting.static final floatThe default sustained outbound email rate in emails/second.static final intThe default relay email burst before rate limiting.static final floatThe default sustained relay email rate in emails/second.Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkeyFields inherited from class com.aoindustries.aoserv.client.CachedObject
tableFields inherited from class com.aoindustries.aoserv.client.AoservObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE -
Constructor Summary
ConstructorsConstructorDescriptionPackage()Deprecated, for removal: This API element is subject to removal in a future version.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDnsZone(String zone, InetAddress ip, int ttl) intaddEmailSmtpRelay(Server aoServer, HostAddress host, SmtpRelayType type, long duration) voidaddLinuxGroup(Group.Name name, GroupType type) voidaddLinuxGroup(Group.Name name, String type) voidaddUsername(User.Name username) booleanbooleanintvoiddisable(DisableLog dl) voidenable()protected ObjectgetColumnImpl(int i) intGets the inbound burst limit for emails, the number of emails that may be sent before limiting occurs.floatGets the inbound sustained email rate in emails/second.intGets the outbound burst limit for emails, the number of emails that may be sent before limiting occurs.floatGets the outbound sustained email rate in emails/second.intGets the relay burst limit for emails, the number of emails that may be sent before limiting occurs.floatGets the relay sustained email rate in emails/second.getName()getNetBinds(IpAddress ip) intvoidInitializes this object from the raw database contents.booleanChecks if this object is disabled.voidread(StreamableInput in, AoservProtocol.Version protocolVersion) AoservObject.toString()implementation that is allowed to throw exceptions.voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCodeMethods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTableMethods 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 Details
-
COLUMN_NAME_name
- See Also:
-
DEFAULT_EMAIL_IN_BURST
public static final int DEFAULT_EMAIL_IN_BURSTThe default inbound email burst before rate limiting.- See Also:
-
DEFAULT_EMAIL_IN_RATE
public static final float DEFAULT_EMAIL_IN_RATEThe default sustained inbound email rate in emails/second.- See Also:
-
DEFAULT_EMAIL_OUT_BURST
public static final int DEFAULT_EMAIL_OUT_BURSTThe default outbound email burst before rate limiting.- See Also:
-
DEFAULT_EMAIL_OUT_RATE
public static final float DEFAULT_EMAIL_OUT_RATEThe default sustained outbound email rate in emails/second.- See Also:
-
DEFAULT_EMAIL_RELAY_BURST
public static final int DEFAULT_EMAIL_RELAY_BURSTThe default relay email burst before rate limiting.- See Also:
-
DEFAULT_EMAIL_RELAY_RATE
public static final float DEFAULT_EMAIL_RELAY_RATEThe default sustained relay email rate in emails/second.- See Also:
-
-
Constructor Details
-
Package
Deprecated, for removal: This API element is subject to removal in a future version.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
toStringImpl
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<Package>
-
addDnsZone
- Throws:
IOExceptionSQLException
-
addEmailSmtpRelay
public int addEmailSmtpRelay(Server aoServer, HostAddress host, SmtpRelayType type, long duration) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
addLinuxGroup
- Throws:
IOExceptionSQLException
-
addLinuxGroup
- Throws:
IOExceptionSQLException
-
addUsername
- Throws:
IOExceptionSQLException
-
canDisable
- Specified by:
canDisablein interfaceDisablable- Throws:
IOExceptionSQLException
-
canEnable
- Specified by:
canEnablein interfaceDisablable- Throws:
SQLExceptionIOException
-
disable
- Specified by:
disablein interfaceDisablable- Throws:
IOExceptionSQLException
-
enable
- Specified by:
enablein interfaceDisablable- Throws:
IOExceptionSQLException
-
getBackupReports
- Throws:
IOExceptionSQLException
-
getAccount_name
-
getAccount
- Throws:
SQLExceptionIOException
-
getColumnImpl
- Specified by:
getColumnImplin classAoservObject<Integer,Package>
-
getCreated
-
getCreatedBy
- Throws:
SQLExceptionIOException
-
getCvsRepositories
- 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
-
getDisableLog
- 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
- Throws:
IOExceptionSQLException
-
getEmailLists
- Throws:
IOExceptionSQLException
-
getEmailPipes
- Throws:
IOExceptionSQLException
-
getHttpdServers
- Throws:
IOExceptionSQLException
-
getHttpdSites
- Throws:
IOExceptionSQLException
-
getIpAddresses
- Throws:
IOExceptionSQLException
-
getLinuxGroups
- Throws:
IOExceptionSQLException
-
getMysqlDatabases
- Throws:
IOExceptionSQLException
-
getFailoverMysqlReplications
- Throws:
IOExceptionSQLException
-
getMysqlUsers
- Throws:
IOExceptionSQLException
-
getName
-
getNetBinds
- Throws:
IOExceptionSQLException
-
getNetBinds
- Throws:
IOExceptionSQLException
-
getPackageDefinition_id
public int getPackageDefinition_id() -
getPackageDefinition
- Throws:
SQLExceptionIOException
-
getPostgresDatabases
- Throws:
IOExceptionSQLException
-
getPostgresUsers
- Throws:
SQLExceptionIOException
-
getSendmailServers
- Throws:
IOExceptionSQLException
-
getHost
- Throws:
IOExceptionSQLException
-
getServers
- Throws:
IOExceptionSQLException
-
getEmailDomains
- Throws:
IOExceptionSQLException
-
getEmailSmtpRelays
- Throws:
IOExceptionSQLException
-
getSslCertificates
- Throws:
IOExceptionSQLException
-
getTableId
- Specified by:
getTableIdin classAoservObject<Integer,Package>
-
getUsernames
- Throws:
IOExceptionSQLException
-
init
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
- Specified by:
readin interfaceAoservReadable- Specified by:
readin interfaceAoservStreamable- Specified by:
readin classAoservObject<Integer,Package> - Throws:
IOException
-
write
- Specified by:
writein interfaceAoservStreamable- Specified by:
writein interfaceAoservWritable- Specified by:
writein classAoservObject<Integer,Package> - Throws:
IOException
-
compareTo
- Specified by:
compareToin interfaceComparable<Package>
-
