Package org.dynamoframework.rest.model
Class EntityModelController
java.lang.Object
org.dynamoframework.rest.model.EntityModelController
@RestController
@RequestMapping("#{@\'dynamoframework-org.dynamoframework.configuration.DynamoConfigurationProperties\'.defaults.endpoints.model}")
@CrossOrigin
public class EntityModelController
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetActionEntityModel(String entityName, String actionId, String reference) Retrieves a nested entity model based on the main attribute name and the name of the attributegetEntityModel(String entityName, String reference) Retrieves an entity model based on the name of the entitygetNestedEntityModel(String entityName, String attributeName, String reference) Retrieves a nested entity model based on entity name and the name of the attributegetNestedEntityModel2(String entityName, String attributeName, String secondAttribute, String reference) Retrieves a nested entity model based on entity name and two nested attributes
-
Constructor Details
-
EntityModelController
public EntityModelController()
-
-
Method Details
-
getEntityModel
@GetMapping("/{entityName}") public EntityModelResponse getEntityModel(@PathVariable String entityName, @RequestParam(required=false) String reference) Retrieves an entity model based on the name of the entity- Parameters:
entityName- the name of the entityreference- optional reference to the specific entity model- Returns:
- the entity model
-
getNestedEntityModel
@GetMapping("/{entityName}/attribute/{attributeName}") public EntityModelResponse getNestedEntityModel(@PathVariable String entityName, @PathVariable String attributeName, @RequestParam(required=false) String reference) Retrieves a nested entity model based on entity name and the name of the attribute- Parameters:
entityName- the entity nameattributeName- the name of the attribute- Returns:
- the entity model
-
getNestedEntityModel2
@GetMapping("/{entityName}/attribute/{attributeName}/attribute/{secondAttribute}") public EntityModelResponse getNestedEntityModel2(@PathVariable String entityName, @PathVariable String attributeName, @PathVariable String secondAttribute, @RequestParam(required=false) String reference) Retrieves a nested entity model based on entity name and two nested attributes- Parameters:
entityName- the main entity nameattributeName- the name of the attribute- Returns:
- the entity model
-
getActionEntityModel
@GetMapping("/{entityName}/action/{actionId}") public EntityModelResponse getActionEntityModel(@PathVariable String entityName, @PathVariable String actionId, @RequestParam(required=false) String reference) Retrieves a nested entity model based on the main attribute name and the name of the attribute- Parameters:
entityName- the main entity nameactionId- the ID of the action- Returns:
- the entity model
-