Class EntityTemplateResource
java.lang.Object
ch.tocco.nice2.rest.core.spi.AbstractRestResource
ch.tocco.nice2.rest.entity.impl.resources.template.EntityTemplateResource
- All Implemented Interfaces:
RestResource
@Path("/entities/2.0/templates/{name}")
public class EntityTemplateResource
extends AbstractRestResource
-
Field Summary
Fields inherited from class ch.tocco.nice2.rest.core.spi.AbstractRestResource
uriInfo
-
Constructor Summary
ConstructorDescriptionEntityTemplateResource
(PersistenceService persistenceService, CommandExecutor executor, DataModel dataModel, EntityBeanRebinder entityBeanRebinder, EntityBeanFactory entityBeanFactory, PrincipalService principalService, FieldBeanFactory fieldBeanFactory, TypeManager typeManager, Set<TemplateEntityFieldHandler> fieldHandlers, TemplateBlacklist templateBlacklist) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
addTemplate
(String modelName, EntityTemplateRecord templateRecord) buildHalBean
(EntityModel baseModel, Map<String, Object> values) jakarta.ws.rs.core.Response
readTemplate
(String modelName, String id) resolveToNRelation
(Entity e, String relation) resolveToOneRelation
(Entity e, String relation) transformToSearchResult
(TemplateEntity templateEntity) jakarta.ws.rs.core.Response
updateTemplate
(String modelName, String id, EntityBean entityBean) Methods inherited from class ch.tocco.nice2.rest.core.spi.AbstractRestResource
getPathParameter, setUriInfo, tryGetInt
-
Constructor Details
-
EntityTemplateResource
public EntityTemplateResource(PersistenceService persistenceService, CommandExecutor executor, DataModel dataModel, EntityBeanRebinder entityBeanRebinder, EntityBeanFactory entityBeanFactory, PrincipalService principalService, FieldBeanFactory fieldBeanFactory, TypeManager typeManager, Set<TemplateEntityFieldHandler> fieldHandlers, TemplateBlacklist templateBlacklist)
-
-
Method Details
-
readTemplate
-
transformToSearchResult
-
resolveToNRelation
-
resolveToOneRelation
-
buildHalBean
-
addTemplate
@POST @Consumes("application/json") public jakarta.ws.rs.core.Response addTemplate(@PathParam("name") String modelName, EntityTemplateRecord templateRecord) -
updateTemplate
@PATCH @Path("/{id}") @Consumes("application/json") public jakarta.ws.rs.core.Response updateTemplate(@PathParam("name") String modelName, @PathParam("id") String id, EntityBean entityBean)
-