- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<Address>
-
- com.aoindustries.aoserv.client.email.Address
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,Removable,SingleTableObject<Integer,Address>
public final class Address extends CachedObjectIntegerKey<Address> implements Removable
AnEmailAddressrepresents a unique email address hosted on an AOServ server. This email address may only go to one destination,- Author:
- AO Industries, Inc.
- See Also:
BlackholeAddress,Forwarding,ListAddress,PipeAddress,InboxAddress
-
-
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 Address()
-
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
-
addEmailForwarding
public int addEmailForwarding(Email destination) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getAddress
public String getAddress()
-
getBlackholeEmailAddress
public BlackholeAddress getBlackholeEmailAddress() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,Address>
-
getDomain
public Domain getDomain() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getEmailForwardings
public List<Forwarding> getEmailForwardings() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEnabledEmailForwardings
public List<Forwarding> getEnabledEmailForwardings() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getEmailForwarding
public Forwarding getEmailForwarding(Email destination) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEmailLists
public List<List> getEmailLists() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEmailListAddresses
public List<ListAddress> getEmailListAddresses() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEnabledEmailListAddresses
public List<ListAddress> getEnabledEmailListAddresses() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEmailListAddress
public ListAddress getEmailListAddress(List list) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEmailPipes
public List<Pipe> getEmailPipes() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEmailPipeAddresses
public List<PipeAddress> getEmailPipeAddresses() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEnabledEmailPipeAddresses
public List<PipeAddress> getEnabledEmailPipeAddresses() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getEmailPipeAddress
public PipeAddress getEmailPipeAddress(Pipe pipe) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getLinuxServerAccounts
public List<UserServer> getLinuxServerAccounts() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getLinuxAccAddresses
public List<InboxAddress> getLinuxAccAddresses() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getLinuxAccAddress
public InboxAddress getLinuxAccAddress(UserServer lsa) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,Address>
-
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,Address>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
isUsed
public boolean isUsed() throws IOException, SQLException- Throws:
IOExceptionSQLException
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<Integer,Address>- Throws:
IOException
-
getCannotRemoveReasons
public List<CannotRemoveReason<?>> getCannotRemoveReasons() throws SQLException, IOException
Description copied from interface:RemovableLists the reasons an object may not be removed.- Specified by:
getCannotRemoveReasonsin interfaceRemovable- Returns:
- an empty
List<CannotRemoveReason>if this object may be removed, or a list of descriptions - Throws:
SQLExceptionIOException
-
remove
public void remove() throws IOException, SQLExceptionRemoves thisEmailAddressany any references to it. For example, if this address is sent to aLinuxAccount, the address is disassociated before it is removed. For integrity, this entire operation is handled in a single database transaction.- Specified by:
removein interfaceRemovable- Throws:
IOExceptionSQLException
-
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<Address>- Throws:
SQLExceptionIOException
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,Address>- Throws:
IOException
-
-