Class RelationResource
java.lang.Object
ch.tocco.nice2.rest.core.spi.AbstractRestResource
ch.tocco.nice2.rest.entity.impl.resources.entities.AbstractRelationResource
ch.tocco.nice2.rest.entity.impl.resources.entities.RelationResource
- All Implemented Interfaces:
RestResource
@Path("/entities/2.0/{name}/{pk}/{relation}")
public class RelationResource
extends AbstractRelationResource
-
Field Summary
Fields inherited from class ch.tocco.nice2.rest.entity.impl.resources.entities.AbstractRelationResource
context, dataModel, entityBeanRebinder
Fields inherited from class ch.tocco.nice2.rest.core.spi.AbstractRestResource
uriInfo
-
Constructor Summary
ConstructorDescriptionRelationResource
(DataModel dataModel, Context context, EntityBeanRebinder entityBeanRebinder, RestSearchService restSearchService) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
addEntity
(String modelName, String pk, String relationName, EntityBean entityBean) jakarta.ws.rs.core.Response
deleteRelationEntity
(String modelName, String pk, String relationName, String target) getRelation
(String modelName, String key, String relationName) protected jakarta.ws.rs.core.UriBuilder
getUriBuilder
(jakarta.ws.rs.core.UriInfo uriInfo, String modelName, String pk, String relationName) searchEntities
(String modelName, String pk, String relationName, EntitySearchBean searchBean) jakarta.ws.rs.core.Response
setEntities
(String modelName, String pk, String relationName, EntityBean[] entityBeans) Methods inherited from class ch.tocco.nice2.rest.entity.impl.resources.entities.AbstractRelationResource
doAddEntity, doSetEntities
Methods inherited from class ch.tocco.nice2.rest.core.spi.AbstractRestResource
getPathParameter, setUriInfo, tryGetInt
-
Constructor Details
-
RelationResource
public RelationResource(DataModel dataModel, Context context, EntityBeanRebinder entityBeanRebinder, RestSearchService restSearchService)
-
-
Method Details
-
getRelation
@GET @Produces("application/json") public CollectionBean getRelation(@PathParam("name") String modelName, @PathParam("pk") String key, @PathParam("relation") String relationName) -
searchEntities
@POST @Path("search") @Produces("application/json") @Consumes("application/json") public CollectionBean searchEntities(@PathParam("name") String modelName, @PathParam("pk") String pk, @PathParam("relation") String relationName, EntitySearchBean searchBean) -
addEntity
@POST @Consumes("application/json") public jakarta.ws.rs.core.Response addEntity(@PathParam("name") String modelName, @PathParam("pk") String pk, @PathParam("relation") String relationName, EntityBean entityBean) -
setEntities
@PUT @Consumes("application/json") public jakarta.ws.rs.core.Response setEntities(@PathParam("name") String modelName, @PathParam("pk") String pk, @PathParam("relation") String relationName, EntityBean[] entityBeans) -
deleteRelationEntity
-
getUriBuilder
-