public abstract class BaseRestController<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.log4j.Logger |
LOG |
private au.com.jcloud.lxd.service.ICachingLxdService |
lxdService |
private ServerService |
serverService |
| Constructor and Description |
|---|
BaseRestController() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,T> |
getEntities(javax.servlet.http.HttpServletRequest request) |
abstract Map<String,T> |
getEntities(au.com.jcloud.lxd.service.ICachingLxdService lxdService) |
abstract T |
getEntity(au.com.jcloud.lxd.service.ICachingLxdService lxdService,
String name) |
au.com.jcloud.lxd.service.ICachingLxdService |
getLxdService() |
au.com.jcloud.lxd.service.ICachingLxdService |
getLxdService(javax.servlet.http.HttpServletRequest request) |
ServerService |
getServerService() |
protected boolean |
isDefaultServerAndWindowsOs(au.com.jcloud.lxd.service.ILxdService lxdService) |
void |
performSearch(Map<String,T> entities,
SearchCriteria search,
AjaxResponseBody<T> result) |
org.springframework.http.ResponseEntity<?> |
reloadEntity(javax.servlet.http.HttpServletRequest request,
Class<T> classType) |
org.springframework.http.ResponseEntity<?> |
searchEntity(javax.servlet.http.HttpServletRequest request,
SearchCriteria search,
org.springframework.validation.Errors errors) |
org.springframework.http.ResponseEntity<?> |
searchEntity(javax.servlet.http.HttpServletRequest request,
String searchTerm) |
void |
setLxdService(au.com.jcloud.lxd.service.ICachingLxdService lxdService) |
void |
setServerService(ServerService serverService) |
org.springframework.http.ResponseEntity<?> |
viewEntity(javax.servlet.http.HttpServletRequest request,
String name) |
private static final org.apache.log4j.Logger LOG
@Autowired private au.com.jcloud.lxd.service.ICachingLxdService lxdService
@Autowired private ServerService serverService
public au.com.jcloud.lxd.service.ICachingLxdService getLxdService(javax.servlet.http.HttpServletRequest request)
@PostMapping(value="/reload")
public org.springframework.http.ResponseEntity<?> reloadEntity(javax.servlet.http.HttpServletRequest request,
Class<T> classType)
@RequestMapping(value="/view/{name}",
method={GET,POST})
public org.springframework.http.ResponseEntity<?> viewEntity(javax.servlet.http.HttpServletRequest request,
@PathVariable
String name)
@RequestMapping(value="/search/{searchTerm}",
method={GET,POST})
public org.springframework.http.ResponseEntity<?> searchEntity(javax.servlet.http.HttpServletRequest request,
@PathVariable
String searchTerm)
@PostMapping(value="/search")
public org.springframework.http.ResponseEntity<?> searchEntity(javax.servlet.http.HttpServletRequest request,
@RequestBody
SearchCriteria search,
org.springframework.validation.Errors errors)
protected boolean isDefaultServerAndWindowsOs(au.com.jcloud.lxd.service.ILxdService lxdService)
public abstract T getEntity(au.com.jcloud.lxd.service.ICachingLxdService lxdService, String name) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic abstract Map<String,T> getEntities(au.com.jcloud.lxd.service.ICachingLxdService lxdService) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void performSearch(Map<String,T> entities, SearchCriteria search, AjaxResponseBody<T> result) throws Exception
Exceptionpublic Map<String,T> getEntities(javax.servlet.http.HttpServletRequest request) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic au.com.jcloud.lxd.service.ICachingLxdService getLxdService()
public void setLxdService(au.com.jcloud.lxd.service.ICachingLxdService lxdService)
public ServerService getServerService()
public void setServerService(ServerService serverService)
Copyright © 2025 JCloud. All rights reserved.