Package de.terrestris.shoguncore.rest
Class PluginRestController<E extends Plugin,D extends PluginDao<E>,S extends PluginService<E,D>>
- java.lang.Object
-
- de.terrestris.shoguncore.web.AbstractWebController<E,D,S>
-
- de.terrestris.shoguncore.rest.AbstractRestController<E,D,S>
-
- de.terrestris.shoguncore.rest.PluginRestController<E,D,S>
-
- Direct Known Subclasses:
WpsPluginRestController
@RestController @RequestMapping("/plugins") public class PluginRestController<E extends Plugin,D extends PluginDao<E>,S extends PluginService<E,D>> extends AbstractRestController<E,D,S>- Author:
- Nils Bühner
-
-
Field Summary
-
Fields inherited from class de.terrestris.shoguncore.rest.AbstractRestController
objectMapper
-
Fields inherited from class de.terrestris.shoguncore.web.AbstractWebController
logger, service
-
-
Constructor Summary
Constructors Modifier Constructor Description PluginRestController()Default constructor, which calls the type-constructorprotectedPluginRestController(Class<E> entityClass)Constructor that sets the concrete entity class for the controller.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<String>getExternalPluginSource(String simpleClassName)voidsetService(S service)We have to useQualifierto define the correct service here.-
Methods inherited from class de.terrestris.shoguncore.rest.AbstractRestController
delete, findAll, findById, findBySimpleFilter, save, update
-
Methods inherited from class de.terrestris.shoguncore.web.AbstractWebController
getEntityClass, getService
-
-
-
-
Method Detail
-
getExternalPluginSource
@RequestMapping(value="/{simpleClassName}.js", method=GET) @ResponseBody public org.springframework.http.ResponseEntity<String> getExternalPluginSource(@PathVariable String simpleClassName)- Returns:
-
setService
@Autowired @Qualifier("pluginService") public void setService(S service)We have to useQualifierto define the correct service here. Otherwise, spring can not decide which service has to be autowired here as there are multiple candidates.- Specified by:
setServicein classAbstractWebController<E extends Plugin,D extends PluginDao<E>,S extends PluginService<E,D>>- Parameters:
service- the service to set
-
-