@RestController @RequestMapping(value="address") public class AddressResource 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 |
|---|
AddressResource()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> |
addAddress(org.nhindirect.config.model.Address address)
Adds an address to the system and associates it with a domain.
|
org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<org.nhindirect.config.model.Address>> |
getAddress(java.lang.String address)
Gets an address by name.
|
org.springframework.http.ResponseEntity<reactor.core.publisher.Flux<org.nhindirect.config.model.Address>> |
getAddressesByDomain(java.lang.String domainName)
Gets all addresses configured for a given domain.
|
org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> |
removedAddress(java.lang.String address)
Removes an address from the system.
|
void |
setAddressRepository(org.nhindirect.config.repository.AddressRepository addRepo)
Sets the address repository.
|
void |
setDomainRepository(org.nhindirect.config.repository.DomainRepository domainRepo)
Sets the domain repository.
|
org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> |
updateAddress(org.nhindirect.config.model.Address address)
Updates the attributes of an existing address.
|
@Autowired public void setAddressRepository(org.nhindirect.config.repository.AddressRepository addRepo)
addRepo - Address repository@Autowired public void setDomainRepository(org.nhindirect.config.repository.DomainRepository domainRepo)
domainRepo - @GetMapping(value="/{address}",
produces="application/json")
public org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<org.nhindirect.config.model.Address>> getAddress(@PathVariable
java.lang.String address)
address - The address to retrieve.@GetMapping(value="domain/{domainName}",
produces="application/json")
public org.springframework.http.ResponseEntity<reactor.core.publisher.Flux<org.nhindirect.config.model.Address>> getAddressesByDomain(@PathVariable
java.lang.String domainName)
domainName - The domain name to retrieve addresses for.@PutMapping(consumes="application/json")
public org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> addAddress(@RequestBody
org.nhindirect.config.model.Address address)
uriInfo - Injected URI context used for building the location URI.address - The address to add.@PostMapping(consumes="application/json")
public org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> updateAddress(@RequestBody
org.nhindirect.config.model.Address address)
address - The address to update along with new attributes.@DeleteMapping(value="{address}")
@Transactional
public org.springframework.http.ResponseEntity<reactor.core.publisher.Mono<java.lang.Void>> removedAddress(@PathVariable(value="address")
java.lang.String address)
address - The address to removed.Copyright © 2019. All Rights Reserved.