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 Package
s, each with
their own monthly fee and sets of resources such as web sites, databases
and users. Security is not maintained between Package
s,
only between accounts
. If intra-account security is
required, please use child accounts
.- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final int
The default inbound email burst before rate limiting.static final float
The default sustained inbound email rate in emails/second.static final int
The default outbound email burst before rate limiting.static final float
The default sustained outbound email rate in emails/second.static final int
The default relay email burst before rate limiting.static final float
The 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
ConstructorDescriptionPackage()
Deprecated.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDnsZone
(String zone, InetAddress ip, int ttl) int
addEmailSmtpRelay
(Server aoServer, HostAddress host, SmtpRelayType type, long duration) void
addLinuxGroup
(Group.Name name, GroupType type) void
addLinuxGroup
(Group.Name name, String type) void
addUsername
(User.Name username) boolean
boolean
int
void
disable
(DisableLog dl) void
enable()
protected Object
getColumnImpl
(int i) int
Gets the inbound burst limit for emails, the number of emails that may be sent before limiting occurs.float
Gets the inbound sustained email rate in emails/second.int
Gets the outbound burst limit for emails, the number of emails that may be sent before limiting occurs.float
Gets the outbound sustained email rate in emails/second.int
Gets the relay burst limit for emails, the number of emails that may be sent before limiting occurs.float
Gets the relay sustained email rate in emails/second.getName()
getNetBinds
(IpAddress ip) int
void
Initializes this object from the raw database contents.boolean
Checks if this object is disabled.void
read
(StreamableInput in, AoservProtocol.Version protocolVersion) AoservObject.toString()
implementation that is allowed to throw exceptions.void
write
(StreamableOutput out, AoservProtocol.Version protocolVersion) 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
-
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.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
toStringImpl
Description copied from class:AoservObject
AoservObject.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:
toStringImpl
in classCachedObjectIntegerKey<Package>
-
addDnsZone
- Throws:
IOException
SQLException
-
addEmailSmtpRelay
public int addEmailSmtpRelay(Server aoServer, HostAddress host, SmtpRelayType type, long duration) throws IOException, SQLException - Throws:
IOException
SQLException
-
addLinuxGroup
- Throws:
IOException
SQLException
-
addLinuxGroup
- Throws:
IOException
SQLException
-
addUsername
- Throws:
IOException
SQLException
-
canDisable
- Specified by:
canDisable
in interfaceDisablable
- Throws:
IOException
SQLException
-
canEnable
- Specified by:
canEnable
in interfaceDisablable
- Throws:
SQLException
IOException
-
disable
- Specified by:
disable
in interfaceDisablable
- Throws:
IOException
SQLException
-
enable
- Specified by:
enable
in interfaceDisablable
- Throws:
IOException
SQLException
-
getBackupReports
- Throws:
IOException
SQLException
-
getAccount_name
-
getAccount
- Throws:
SQLException
IOException
-
getColumnImpl
- Specified by:
getColumnImpl
in classAoservObject<Integer,
Package>
-
getCreated
-
getCreatedBy
- Throws:
SQLException
IOException
-
getCvsRepositories
- Throws:
IOException
SQLException
-
isDisabled
public boolean isDisabled()Description copied from interface:Disablable
Checks 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:
isDisabled
in interfaceDisablable
-
getDisableLog_id
-
getDisableLog
- Specified by:
getDisableLog
in interfaceDisablable
- Throws:
SQLException
IOException
-
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-1
indicates unlimited. -
getEmailInRate
public float getEmailInRate()Gets the inbound sustained email rate in emails/second. A value ofFloat.NaN
indicates 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-1
indicates unlimited. -
getEmailOutRate
public float getEmailOutRate()Gets the outbound sustained email rate in emails/second. A value ofFloat.NaN
indicates 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-1
indicates unlimited. -
getEmailRelayRate
public float getEmailRelayRate()Gets the relay sustained email rate in emails/second. A value ofFloat.NaN
indicates unlimited. -
getDnsZones
- Throws:
IOException
SQLException
-
getEmailLists
- Throws:
IOException
SQLException
-
getEmailPipes
- Throws:
IOException
SQLException
-
getHttpdServers
- Throws:
IOException
SQLException
-
getHttpdSites
- Throws:
IOException
SQLException
-
getIpAddresses
- Throws:
IOException
SQLException
-
getLinuxGroups
- Throws:
IOException
SQLException
-
getMysqlDatabases
- Throws:
IOException
SQLException
-
getFailoverMysqlReplications
- Throws:
IOException
SQLException
-
getMysqlUsers
- Throws:
IOException
SQLException
-
getName
-
getNetBinds
- Throws:
IOException
SQLException
-
getNetBinds
- Throws:
IOException
SQLException
-
getPackageDefinition_id
public int getPackageDefinition_id() -
getPackageDefinition
- Throws:
SQLException
IOException
-
getPostgresDatabases
- Throws:
IOException
SQLException
-
getPostgresUsers
- Throws:
SQLException
IOException
-
getSendmailServers
- Throws:
IOException
SQLException
-
getHost
- Throws:
IOException
SQLException
-
getServers
- Throws:
IOException
SQLException
-
getEmailDomains
- Throws:
IOException
SQLException
-
getEmailSmtpRelays
- Throws:
IOException
SQLException
-
getSslCertificates
- Throws:
IOException
SQLException
-
getTableId
- Specified by:
getTableId
in classAoservObject<Integer,
Package>
-
getUsernames
- Throws:
IOException
SQLException
-
init
Description copied from class:AoservObject
Initializes this object from the raw database contents.- Specified by:
init
in classAoservObject<Integer,
Package> - Parameters:
result
- theResultSet
containing the row to copy into this object- Throws:
SQLException
-
read
- Specified by:
read
in interfaceAoservReadable
- Specified by:
read
in interfaceAoservStreamable
- Specified by:
read
in classAoservObject<Integer,
Package> - Throws:
IOException
-
write
- Specified by:
write
in interfaceAoservStreamable
- Specified by:
write
in interfaceAoservWritable
- Specified by:
write
in classAoservObject<Integer,
Package> - Throws:
IOException
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Package>
-