org.nhindirect.config.service
Interface DNSService

All Known Subinterfaces:
ConfigurationService
All Known Implementing Classes:
ConfigurationServiceImpl, DNSServiceImpl

public interface DNSService

Web service class for DNS service operations.

Since:
1.1
Author:
Greg Meyer

Method Summary
 void addDNS(Collection<org.nhindirect.config.store.DNSRecord> records)
          Adds multiple new DNS records to the store.
 Collection<org.nhindirect.config.store.DNSRecord> getDNSByName(String name)
          Gets DNS records by record name.
 Collection<org.nhindirect.config.store.DNSRecord> getDNSByNameAndType(String name, int type)
          Gets DNS records by record name and a specific record type.
 org.nhindirect.config.store.DNSRecord getDNSByRecordId(long recordId)
          Gets a single DNS record for an internal record id.
 Collection<org.nhindirect.config.store.DNSRecord> getDNSByRecordIds(long[] recordIds)
          Gets DNS records by the internal record ids.
 Collection<org.nhindirect.config.store.DNSRecord> getDNSByType(int type)
          Gets all DNS records or a given type.
 int getDNSCount()
          Gets the number of records in the DNS store.
 void removeDNS(Collection<org.nhindirect.config.store.DNSRecord> records)
          Removes DNS records matching the DNS records' name and type.
 void removeDNSByRecordId(long recordId)
          Removes a single DNS record by an existing internal record id.
 void removeDNSByRecordIds(long[] recordIds)
          Removes DNS records by existing internal record ids.
 void updateDNS(long recordId, org.nhindirect.config.store.DNSRecord record)
          Update a DNS record for a specific internal id.
 

Method Detail

getDNSCount

int getDNSCount()
                throws ConfigurationServiceException
Gets the number of records in the DNS store.

Returns:
The number of records in the DNS store.
Throws:
ConfigurationServiceException

getDNSByName

Collection<org.nhindirect.config.store.DNSRecord> getDNSByName(String name)
                                                               throws ConfigurationServiceException
Gets DNS records by record name.

Parameters:
name - The record name.
Returns:
A collection of records matching the name and of any type.
Throws:
ConfigurationServiceException

getDNSByType

Collection<org.nhindirect.config.store.DNSRecord> getDNSByType(int type)
                                                               throws ConfigurationServiceException
Gets all DNS records or a given type. Using type ANY will return all records in the store.

Parameters:
type - The record type to search for.
Returns:
A collection of records matching the record type.
Throws:
ConfigurationServiceException

getDNSByNameAndType

Collection<org.nhindirect.config.store.DNSRecord> getDNSByNameAndType(String name,
                                                                      int type)
                                                                      throws ConfigurationServiceException
Gets DNS records by record name and a specific record type.

Parameters:
name - The record name.
type - The record type to search for.
Returns:
A collection of records matching the name and record type.
Throws:
ConfigurationServiceException

getDNSByRecordId

org.nhindirect.config.store.DNSRecord getDNSByRecordId(long recordId)
                                                       throws ConfigurationServiceException
Gets a single DNS record for an internal record id.

Parameters:
recordId - The internal record id to search for.
Returns:
A DNS record matching the record id.
Throws:
ConfigurationServiceException

getDNSByRecordIds

Collection<org.nhindirect.config.store.DNSRecord> getDNSByRecordIds(long[] recordIds)
                                                                    throws ConfigurationServiceException
Gets DNS records by the internal record ids.

Parameters:
recordIds - Array of record ids to search for.
Returns:
A collection of records matching the record ids.
Throws:
ConfigurationServiceException

addDNS

void addDNS(Collection<org.nhindirect.config.store.DNSRecord> records)
            throws ConfigurationServiceException
Adds multiple new DNS records to the store. The type cannot be ANY.

Parameters:
records - The records to add the store. If a record already exists, then an exception is thrown.
Throws:
ConfigurationServiceException

removeDNS

void removeDNS(Collection<org.nhindirect.config.store.DNSRecord> records)
               throws ConfigurationServiceException
Removes DNS records matching the DNS records' name and type.

Parameters:
records - Records to delete. Matching is done by name and type.
Throws:
ConfigurationServiceException

removeDNSByRecordId

void removeDNSByRecordId(long recordId)
                         throws ConfigurationServiceException
Removes a single DNS record by an existing internal record id.

Parameters:
recordId - The internal record id to delete.
Throws:
ConfigurationServiceException

removeDNSByRecordIds

void removeDNSByRecordIds(long[] recordIds)
                          throws ConfigurationServiceException
Removes DNS records by existing internal record ids.

Parameters:
recordIds - The internal record ids to delete.
Throws:
ConfigurationServiceException

updateDNS

void updateDNS(long recordId,
               org.nhindirect.config.store.DNSRecord record)
               throws ConfigurationServiceException
Update a DNS record for a specific internal id. If a record does not exist, then an exception is thrown. The type cannot be ANY.

Parameters:
recordId - The internal record id to update.
record - Data to update the record with.
Throws:
ConfigurationServiceException


Copyright © 2011. All Rights Reserved.