All method definitions for the CategoriesApi are now in place

Former-commit-id: 8b3f843531
restapi
Jens Pelzetter 2020-06-05 07:21:35 +02:00
parent 08cebebd02
commit 2d15639124
1 changed files with 120 additions and 13 deletions

View File

@ -164,7 +164,7 @@ public class CategoriesApi {
// Delete only empty categories!!! // Delete only empty categories!!!
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
// delete update category by id @Path("/ID-{categoryId}") // delete update category by id @Path("/ID-{categoryId}")
@DELETE @DELETE
@Path("/ID-{categoryId}") @Path("/ID-{categoryId}")
@ -177,7 +177,7 @@ public class CategoriesApi {
// Delete only empty categories!!! // Delete only empty categories!!!
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@DELETE @DELETE
@Path("/UUID-{categoryUuid}") @Path("/UUID-{categoryUuid}")
@AuthorizationRequired @AuthorizationRequired
@ -189,15 +189,122 @@ public class CategoriesApi {
// Delete only empty categories!!! // Delete only empty categories!!!
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
// GET object in category @Path("/{domain-identifier}/{path}/objects @GET
// GET object in category @Path("/ID-{categoryId} @Path("/{domainIdentifier}/{path:^[\\w\\-/]+$}/objects")
// GET object in category @Path("/UUID-{categoryUuid} @Produces(MediaType.APPLICATION_JSON)
// PUT object in category @Path("/{domain-identifier}/{path}/objects/{objectIdentifier} @AuthorizationRequired
// PUT object in category @Path("/ID-{categoryId}/{objectIdentifier} @RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
// PUT object in category @Path("/UUID-{categoryUuid}/{objectIdentifier} @Transactional(Transactional.TxType.REQUIRED)
// DELETE object in category @Path("/{domain-identifier}/{path}/objects/{objectIdentifier} public CategoryData getObjectsInCategory(
// DELETE object in category @Path("/ID-{categoryId}/{objectIdentifier} @PathParam("domainIdentifier") final String domainIdentifierParam,
// DELETE object in category @Path("/UUID-{categoryUuid}/{objectIdentifier} @PathParam("path") final String categoryPathTokens
) {
throw new UnsupportedOperationException();
}
@GET
@Path("/ID-{categoryId}/objects")
@Produces(MediaType.APPLICATION_JSON)
@AuthorizationRequired
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
@Transactional(Transactional.TxType.REQUIRED)
public CategoryData getCategoryObjectsInCategory(
@PathParam("categoryId") final long categoryId
) {
throw new UnsupportedOperationException();
}
@GET
@Path("/UUID-{categoryId}/objects")
@Produces(MediaType.APPLICATION_JSON)
@AuthorizationRequired
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
@Transactional(Transactional.TxType.REQUIRED)
public CategoryData getObjectsInCategory(
@PathParam("categoryId") final String categoryUuid
) {
throw new UnsupportedOperationException();
}
@PUT
@Path("/{domainIdentifier}/{path:^[\\w\\-/]+$}/objects/{objectIdentifier}")
@Produces(MediaType.APPLICATION_JSON)
@AuthorizationRequired
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
@Transactional(Transactional.TxType.REQUIRED)
public CategoryData addObjectToCategory(
@PathParam("domainIdentifier") final String domainIdentifierParam,
@PathParam("path") final String categoryPathTokens,
@PathParam("objectIdentifier") final String objectIdentifierParam
) {
throw new UnsupportedOperationException();
}
@PUT
@Path("/ID-{categoryId}/objects/{objectIdentifier}")
@Produces(MediaType.APPLICATION_JSON)
@AuthorizationRequired
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
@Transactional(Transactional.TxType.REQUIRED)
public CategoryData addObjectToCategory(
@PathParam("categoryId") final long categoryId,
@PathParam("objectIdentifier") final String objectIdentifier
) {
throw new UnsupportedOperationException();
}
@PUT
@Path("/UUID-{categoryId}/objects/objectIdentifier")
@Produces(MediaType.APPLICATION_JSON)
@AuthorizationRequired
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
@Transactional(Transactional.TxType.REQUIRED)
public CategoryData addObjectsToCategory(
@PathParam("categoryId") final String categoryUuid,
@PathParam("objectIdentifier") final String objectIdentifier
) {
throw new UnsupportedOperationException();
}
@DELETE
@Path("/{domainIdentifier}/{path:^[\\w\\-/]+$}/objects/{objectIdentifier}")
@Produces(MediaType.APPLICATION_JSON)
@AuthorizationRequired
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
@Transactional(Transactional.TxType.REQUIRED)
public CategoryData removeObjectFromCategory(
@PathParam("domainIdentifier") final String domainIdentifierParam,
@PathParam("path") final String categoryPathTokens,
@PathParam("objectIdentifier") final String objectIdentifierParam
) {
throw new UnsupportedOperationException();
}
@DELETE
@Path("/ID-{categoryId}/objects/{objectIdentifier}")
@Produces(MediaType.APPLICATION_JSON)
@AuthorizationRequired
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
@Transactional(Transactional.TxType.REQUIRED)
public CategoryData removeObjectFromCategory(
@PathParam("categoryId") final long categoryId,
@PathParam("objectIdentifier") final String objectIdentifier
) {
throw new UnsupportedOperationException();
}
@DELETE
@Path("/UUID-{categoryId}/objects/objectIdentifier")
@Produces(MediaType.APPLICATION_JSON)
@AuthorizationRequired
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
@Transactional(Transactional.TxType.REQUIRED)
public CategoryData removeObjectsFromCategory(
@PathParam("categoryId") final String categoryUuid,
@PathParam("objectIdentifier") final String objectIdentifier
) {
throw new UnsupportedOperationException();
}
} }