- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServTable<K,V>
-
- com.aoindustries.aoserv.client.CachedTable<String,V>
-
- com.aoindustries.aoserv.client.CachedTableStringKey<Zone>
-
- com.aoindustries.aoserv.client.dns.ZoneTable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.aoindustries.aoserv.client.AOServTable
AOServTable.OrderBy
-
-
Field Summary
-
Fields inherited from class com.aoindustries.aoserv.client.AOServTable
ASCENDING, connector, DESCENDING
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDNSZone(Package packageObj, String zone, InetAddress ip, int ttl)booleancheckDNSZone(String zone)Checks the formatting for a DNS zone.static booleancheckDNSZone(String zone, List<DomainName> tlds)Checks the formatting for a DNS zone.Zoneget(String zone)protected AOServTable.OrderBy[]getDefaultOrderBy()Gets the default sorting for this table.StringgetDNSZoneForHostname(String hostname)static StringgetDNSZoneForHostname(String hostname, List<DomainName> tlds)Gets the zone represented by thisDNSZone.List<Zone>getDNSZones(Package packageObj)DomainNamegetHostTLD(DomainName hostname)static DomainNamegetHostTLD(DomainName hostname, List<DomainName> tlds)Gets the hostname for a fully qualified hostname.Table.TableIDgetTableID()Gets the unique identifier for this table.booleanhandleCommand(String[] args, Reader in, TerminalWriter out, TerminalWriter err, boolean isInteractive)booleanisDNSZoneAvailable(String zone)static booleanisValidHostnamePart(String name)TODO: Is this redundant withDomainLabel?-
Methods inherited from class com.aoindustries.aoserv.client.CachedTableStringKey
get
-
Methods inherited from class com.aoindustries.aoserv.client.CachedTable
clearCache, getIndexedRows, getRows, getRowsCopy, getUniqueRowImpl, isLoaded
-
Methods inherited from class com.aoindustries.aoserv.client.AOServTable
addProgressListener, addTableListener, addTableListener, addTableLoadListener, getCachedRowCount, getConnector, getDefaultOrderBySQLExpressions, getIndexedRows, getMap, getNewObject, getObject, getObjects, getObjects, getObjects, getObjectsNoProgress, getObjectsNoProgress, getSize, getSortAlgorithm, getTableName, getTableSchema, getUniqueRow, getUniqueRow, getUniqueRow, getUniqueRow, hasAnyTableListener, hasTableListener, isEmpty, iterator, printTable, removeProgressListener, removeTableListener, removeTableLoadListener, size, sortIfNeeded, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getDefaultOrderBy
protected AOServTable.OrderBy[] getDefaultOrderBy()
Description copied from class:AOServTableGets the default sorting for this table.- Specified by:
getDefaultOrderByin classAOServTable<String,Zone>- Returns:
nullif the sorting is performed by the server or the array of column names
-
get
public Zone get(String zone) throws IOException, SQLException
- Specified by:
getin classCachedTableStringKey<Zone>- Throws:
IOExceptionSQLException- See Also:
CachedTableStringKey.get(java.lang.Object)
-
addDNSZone
public void addDNSZone(Package packageObj, String zone, InetAddress ip, int ttl) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
checkDNSZone
public boolean checkDNSZone(String zone) throws IOException, SQLException
Checks the formatting for a DNS zone. The format of a DNS zone must bename.tld.- Throws:
IOExceptionSQLException
-
checkDNSZone
public static boolean checkDNSZone(String zone, List<DomainName> tlds)
Checks the formatting for a DNS zone. The format of a DNS zone must bename.tld.
-
getDNSZoneForHostname
public String getDNSZoneForHostname(String hostname) throws IllegalArgumentException, IOException, SQLException
-
getDNSZoneForHostname
public static String getDNSZoneForHostname(String hostname, List<DomainName> tlds) throws IllegalArgumentException, IOException, SQLException
Gets the zone represented by thisDNSZone.- Returns:
- the zone in the format
name.tld. - Throws:
IllegalArgumentExceptionIOExceptionSQLException
-
getDNSZones
public List<Zone> getDNSZones(Package packageObj) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getHostTLD
public static DomainName getHostTLD(DomainName hostname, List<DomainName> tlds) throws IllegalArgumentException
Gets the hostname for a fully qualified hostname. Gets a hostname inname.tldformat.- Throws:
IllegalArgumentException- if hostname cannot be resolved to a top level domain
-
getHostTLD
public DomainName getHostTLD(DomainName hostname) throws IllegalArgumentException, IOException, SQLException
-
getTableID
public Table.TableID getTableID()
Description copied from class:AOServTableGets the unique identifier for this table. Each table has a unique identifier, as defined inSchemaTable.TableID.- Specified by:
getTableIDin classAOServTable<String,Zone>- Returns:
- the identifier for this table
- See Also:
Table.TableID
-
handleCommand
public boolean handleCommand(String[] args, Reader in, TerminalWriter out, TerminalWriter err, boolean isInteractive) throws IllegalArgumentException, IOException, SQLException
- Overrides:
handleCommandin classAOServTable<String,Zone>- Throws:
IllegalArgumentExceptionIOExceptionSQLException
-
isDNSZoneAvailable
public boolean isDNSZoneAvailable(String zone) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
isValidHostnamePart
public static boolean isValidHostnamePart(String name)
TODO: Is this redundant withDomainLabel?
-
-