Class EndpointsRestController
- java.lang.Object
-
- com.aquima.web.rest.v1.controller.RestControllerBase
-
- com.aquima.web.rest.v1.controller.EndpointsRestController
-
- All Implemented Interfaces:
EventListener
,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
@RestController @RestApiContext @RequestMapping(value="/endpoints", produces="application/json") public class EndpointsRestController extends RestControllerBase implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAPPING
static String
NAME
-
Fields inherited from class com.aquima.web.rest.v1.controller.RestControllerBase
DEFAULT_PAGE_NUMBER, DEFAULT_PAGE_SIZE
-
-
Constructor Summary
Constructors Constructor Description EndpointsRestController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Endpoint
getEndpoint(String name)
Returns an endpoint by name.PagedEndpoints
getEndpoints(Integer page, Integer pageSize, String sort)
Returns a paged view of all available endpoints.void
onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
-
Methods inherited from class com.aquima.web.rest.v1.controller.RestControllerBase
getFilters, getUser
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
MAPPING
public static final String MAPPING
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEndpoints
@RequestMapping(method=GET) @ResponseStatus(OK) @ResponseBody public PagedEndpoints getEndpoints(@RequestParam(required=false) Integer page, @RequestParam(required=false) Integer pageSize, @RequestParam(required=false) String sort)
Returns a paged view of all available endpoints.
-
getEndpoint
@RequestMapping(value="/{name}", method=GET) @ResponseStatus(OK) @ResponseBody public Endpoint getEndpoint(@PathVariable("name") String name)
Returns an endpoint by name.
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
-