java.lang.Object
- All Implemented Interfaces:
Streamable
,StreamReadable
,StreamWritable
,Row
,AoservReadable
,AoservStreamable
,AoservWritable
,Dumpable
,Removable
,SingleTableObject<String,
Zone>
A
DNSZone
is one domain hosted in the name servers. It can have
any number of DNSRecord
s. Please see DNSTLD
for
domain restrictions.- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The zone that is in charge of the API.static final short
The default flag for new CAA records.static final String
The default tag for new CAA records.static final String
The default value for new CAA records.static final String
The hostmaster that is placed in a newly createdDNSZone
.static final int
The default priority for new MX records.static final int
static final int
The maximum number of characters allowed in a line.Fields inherited from class com.aoindustries.aoserv.client.CachedObjectStringKey
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
-
Method Summary
Modifier and TypeMethodDescriptionint
addDnsRecord
(String domain, RecordType type, int priority, int weight, int port, short flag, String tag, String destination, int ttl) void
dump
(PrintWriter out) Dumps the contents of this object into aPrintWriter
.static String
getArpaZoneForIpAddress
(InetAddress ip, String netmask) Lists the reasons an object may not be removed.protected Object
getColumnImpl
(int i) static long
getFile()
getRecords
(String domain, RecordType type) long
int
getTtl()
getZone()
void
Initializes this object from the raw database contents.boolean
isArpa()
void
printZoneFile
(PrintWriter out) void
read
(StreamableInput in, AoservProtocol.Version protocolVersion) void
remove()
Removes this object, and all dependant objects, from the system.void
setTtl
(int ttl) void
write
(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectStringKey
equals, getKey, 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 Details
-
DEFAULT_TTL
public static final int DEFAULT_TTL- See Also:
-
MAX_LINE_LENGTH
public static final int MAX_LINE_LENGTHThe maximum number of characters allowed in a line.- See Also:
-
API_ZONE
The zone that is in charge of the API.- See Also:
-
DEFAULT_HOSTMASTER
The hostmaster that is placed in a newly createdDNSZone
.- See Also:
-
DEFAULT_MX_PRIORITY
public static final int DEFAULT_MX_PRIORITYThe default priority for new MX records.- See Also:
-
DEFAULT_CAA_FLAG
public static final short DEFAULT_CAA_FLAGThe default flag for new CAA records.- See Also:
-
DEFAULT_CAA_TAG
The default tag for new CAA records.- See Also:
-
DEFAULT_CAA_VALUE
The default value for new CAA records.- See Also:
-
-
Constructor Details
-
Zone
Deprecated.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
addDnsRecord
public int addDnsRecord(String domain, RecordType type, int priority, int weight, int port, short flag, String tag, String destination, int ttl) throws IOException, SQLException - Throws:
IOException
SQLException
-
dump
Description copied from interface:Dumpable
Dumps the contents of this object into aPrintWriter
.- Specified by:
dump
in interfaceDumpable
- Throws:
SQLException
IOException
-
getAllowedTypes
- Throws:
IOException
SQLException
-
getArpaZoneForIpAddress
public static String getArpaZoneForIpAddress(InetAddress ip, String netmask) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
getColumnImpl
- Specified by:
getColumnImpl
in classAoservObject<String,
Zone>
-
getCurrentSerial
public static long getCurrentSerial() -
getRecords
- Throws:
IOException
SQLException
-
getRecords
- Throws:
IOException
SQLException
-
getFile
-
getHostmaster
-
getPackage
- Throws:
SQLException
IOException
-
getSerial
public long getSerial() -
getTtl
public int getTtl() -
getTableId
- Specified by:
getTableId
in classAoservObject<String,
Zone>
-
getZone
-
getZoneFile
- Throws:
SQLException
IOException
-
init
Description copied from class:AoservObject
Initializes this object from the raw database contents.- Specified by:
init
in classAoservObject<String,
Zone> - Parameters:
result
- theResultSet
containing the row to copy into this object- Throws:
SQLException
-
isArpa
public boolean isArpa() -
printZoneFile
- Throws:
SQLException
IOException
-
read
- Specified by:
read
in interfaceAoservReadable
- Specified by:
read
in interfaceAoservStreamable
- Specified by:
read
in classAoservObject<String,
Zone> - Throws:
IOException
-
getCannotRemoveReasons
Description copied from interface:Removable
Lists the reasons an object may not be removed.- Specified by:
getCannotRemoveReasons
in interfaceRemovable
- Returns:
- an empty
List<CannotRemoveReason>
if this object may be removed, or a list of descriptions
-
remove
Description copied from interface:Removable
Removes this object, and all dependant objects, from the system.- Specified by:
remove
in interfaceRemovable
- Throws:
IOException
SQLException
-
setTtl
- Throws:
IOException
SQLException
-
write
- Specified by:
write
in interfaceAoservStreamable
- Specified by:
write
in interfaceAoservWritable
- Specified by:
write
in classAoservObject<String,
Zone> - Throws:
IOException
-