@RestController @RequestMapping(value="dns") public class DNSResource extends ProtectedResource
Although not required, this class is instantiated using the Jersey SpringServlet and dependencies are defined in the Sprint context XML file.
| Constructor and Description |
|---|
DNSResource()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> |
addDNSRecord(org.nhindirect.config.model.DNSRecord record)
Adds a DNS record.
|
org.springframework.http.ResponseEntity<reactor.core.publisher.Flux<org.nhindirect.config.model.DNSRecord>> |
getDNSRecords(int type,
java.lang.String name)
Gets DNS records that match a given name, type, or combination of both.
|
org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> |
removeDNSRecordsByIds(java.lang.String ids)
Delete DNS records by system id.
|
void |
setDNSRepository(org.nhindirect.config.repository.DNSRepository dnsRepo)
Sets the DNS repository.
|
org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> |
updateDNSRecord(org.nhindirect.config.model.DNSRecord updateRecord)
Updates the attributes of an existing DNS record.
|
@Autowired public void setDNSRepository(org.nhindirect.config.repository.DNSRepository dnsRepo)
dnsRepo - DNS repository@GetMapping(produces="application/json")
public org.springframework.http.ResponseEntity<reactor.core.publisher.Flux<org.nhindirect.config.model.DNSRecord>> getDNSRecords(@RequestParam(name="type",defaultValue="-1")
int type,
@RequestParam(name="name",defaultValue="")
java.lang.String name)
type - DNS record type filter. Defaults to -1 which means no filter will be applied.name - DNS record name filter. Defaults to an empty string which means no filter will be applied.@PutMapping(consumes="application/json")
public org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> addDNSRecord(@RequestBody
org.nhindirect.config.model.DNSRecord record)
uriInfo - Injected URI context used for building the location URI.record - The DNS record to add.@PostMapping(consumes="application/json")
public org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> updateDNSRecord(@RequestBody
org.nhindirect.config.model.DNSRecord updateRecord)
updateRecord - The DNS record to update.@DeleteMapping(value="{ids}")
public org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> removeDNSRecordsByIds(@PathVariable(value="ids")
java.lang.String ids)
ids - Comma delimited list of ids to delete.Copyright © 2019. All Rights Reserved.