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 DNSRecords. Please see DNSTLD for
domain restrictions.- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe zone that is in charge of the API.static final shortThe default flag for new CAA records.static final StringThe default tag for new CAA records.static final StringThe default value for new CAA records.static final StringThe hostmaster that is placed in a newly createdDNSZone.static final intThe default priority for new MX records.static final intstatic final intThe maximum number of characters allowed in a line.Fields inherited from class com.aoindustries.aoserv.client.CachedObjectStringKey
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
ConstructorsConstructorDescriptionZone()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 TypeMethodDescriptionintaddDnsRecord(String domain, RecordType type, int priority, int weight, int port, short flag, String tag, String destination, int ttl) voiddump(PrintWriter out) Dumps the contents of this object into aPrintWriter.static StringgetArpaZoneForIpAddress(InetAddress ip, String netmask) Lists the reasons an object may not be removed.protected ObjectgetColumnImpl(int i) static longgetFile()getRecords(String domain, RecordType type) longintgetTtl()getZone()voidInitializes this object from the raw database contents.booleanisArpa()voidprintZoneFile(PrintWriter out) voidread(StreamableInput in, AoservProtocol.Version protocolVersion) voidremove()Removes this object, and all dependant objects, from the system.voidsetTtl(int ttl) voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectStringKey
equals, getKey, hashCode, toStringImplMethods 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
-
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, 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
-
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:
IOExceptionSQLException
-
dump
Description copied from interface:DumpableDumps the contents of this object into aPrintWriter.- Specified by:
dumpin interfaceDumpable- Throws:
SQLExceptionIOException
-
getAllowedTypes
- Throws:
IOExceptionSQLException
-
getArpaZoneForIpAddress
public static String getArpaZoneForIpAddress(InetAddress ip, String netmask) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
getColumnImpl
- Specified by:
getColumnImplin classAoservObject<String,Zone>
-
getCurrentSerial
public static long getCurrentSerial() -
getRecords
- Throws:
IOExceptionSQLException
-
getRecords
- Throws:
IOExceptionSQLException
-
getFile
-
getHostmaster
-
getPackage
- Throws:
SQLExceptionIOException
-
getSerial
public long getSerial() -
getTtl
public int getTtl() -
getTableId
- Specified by:
getTableIdin classAoservObject<String,Zone>
-
getZone
-
getZoneFile
- Throws:
SQLExceptionIOException
-
init
Description copied from class:AoservObjectInitializes this object from the raw database contents.- Specified by:
initin classAoservObject<String,Zone> - Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
isArpa
public boolean isArpa() -
printZoneFile
- Throws:
SQLExceptionIOException
-
read
- Specified by:
readin interfaceAoservReadable- Specified by:
readin interfaceAoservStreamable- Specified by:
readin classAoservObject<String,Zone> - Throws:
IOException
-
getCannotRemoveReasons
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
-
remove
Description copied from interface:RemovableRemoves this object, and all dependant objects, from the system.- Specified by:
removein interfaceRemovable- Throws:
IOExceptionSQLException
-
setTtl
- Throws:
IOExceptionSQLException
-
write
- Specified by:
writein interfaceAoservStreamable- Specified by:
writein interfaceAoservWritable- Specified by:
writein classAoservObject<String,Zone> - Throws:
IOException
-
