@Controller public class EntityTemplateController extends Object
Controller that provides localized EntityTemplate
s. An entity template holds information related to displaying a template in a selection widget, and information related
to the forms that represent the template.
Constructor and Description |
---|
EntityTemplateController(EntityTemplateManager entityTemplateManager) |
Modifier and Type | Method and Description |
---|---|
org.springframework.http.ResponseEntity<EntityTemplate> |
getEntityTemplateById(String id,
Locale locale)
Returns the
EntityTemplate with the given id. |
org.springframework.http.ResponseEntity<EntityTemplate> |
getEntityTemplateByModelId(String modelId,
Locale locale)
Returns the latest version of
EntityTemplate with the given modelId. |
org.springframework.http.ResponseEntity<List<EntityTemplate>> |
getEntityTemplatesByType(String type,
String typedText,
Locale locale)
Returns all the
EntityTemplate s of the given type. |
org.springframework.http.ResponseEntity<List<EntityTemplate>> |
getEntityTemplatesByTypeAndCase(String type,
String ambiguousId,
String typedText,
Locale locale)
Returns all the
EntityTemplate s of the given type and the given case. |
public EntityTemplateController(EntityTemplateManager entityTemplateManager)
@RequestMapping(value="/entityTemplate/{id}", method=GET) @ResponseBody public org.springframework.http.ResponseEntity<EntityTemplate> getEntityTemplateById(@PathVariable String id, Locale locale)
Returns the EntityTemplate
with the given id.
id
- the entity template idlocale
- the translation locale@RequestMapping(value="/entityTemplate/modelId/{modelId}", method=GET) @ResponseBody public org.springframework.http.ResponseEntity<EntityTemplate> getEntityTemplateByModelId(@PathVariable String modelId, Locale locale)
Returns the latest version of EntityTemplate
with the given modelId.
modelId
- the entity template modelIdlocale
- the translation locale@RequestMapping(value="/entityTemplate/type/{type}", method=GET) @ResponseBody public org.springframework.http.ResponseEntity<List<EntityTemplate>> getEntityTemplatesByType(@PathVariable String type, @RequestParam(required=false,defaultValue="") String typedText, Locale locale)
Returns all the EntityTemplate
s of the given type.
type
- the type of the entity templates to returntypedText
- the typed text.locale
- the translation locale@RequestMapping(value="/entityTemplate/type/{type}/case/{ambiguousId}", method=GET) @ResponseBody public org.springframework.http.ResponseEntity<List<EntityTemplate>> getEntityTemplatesByTypeAndCase(@PathVariable String type, @PathVariable String ambiguousId, @RequestParam(required=false,defaultValue="") String typedText, Locale locale)
Returns all the EntityTemplate
s of the given type and the given case. The case model restricts which EntityTemplate
s are shown.
type
- the type of the entity templates to returnambiguousId
- the case ambiguous id.typedText
- the typed text.locale
- the translation localeCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.