[Major] REST APIs are supposed to be plural
This commit is contained in:
parent
8c429ccb19
commit
7a537e7886
|
@ -40,7 +40,7 @@ import li.strolch.rest.model.AuditQueryResult;
|
|||
import li.strolch.rest.model.StringListResult;
|
||||
import li.strolch.rest.model.visitor.ToAuditQueryVisitor;
|
||||
|
||||
@Path("strolch/audit")
|
||||
@Path("strolch/audits")
|
||||
public class AuditsService {
|
||||
|
||||
@GET
|
||||
|
|
|
@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
|
|||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
@Path("strolch/enum")
|
||||
@Path("strolch/enums")
|
||||
public class EnumQuery {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(EnumQuery.class);
|
||||
|
|
|
@ -64,7 +64,7 @@ public class ModelQuery {
|
|||
*/
|
||||
@GET
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Path("resource")
|
||||
@Path("resources")
|
||||
public Response queryResources(@BeanParam QueryData queryData, @Context HttpServletRequest request) {
|
||||
Certificate cert = (Certificate) request.getAttribute(StrolchRestfulConstants.STROLCH_CERTIFICATE);
|
||||
|
||||
|
@ -120,7 +120,7 @@ public class ModelQuery {
|
|||
*/
|
||||
@GET
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Path("order")
|
||||
@Path("orders")
|
||||
public Response queryOrders(@BeanParam QueryData queryData, @Context HttpServletRequest request) {
|
||||
Certificate cert = (Certificate) request.getAttribute(StrolchRestfulConstants.STROLCH_CERTIFICATE);
|
||||
|
||||
|
@ -177,7 +177,7 @@ public class ModelQuery {
|
|||
*/
|
||||
@GET
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Path("activity")
|
||||
@Path("activities")
|
||||
public Response queryActivities(@BeanParam QueryData queryData, @Context HttpServletRequest request) {
|
||||
Certificate cert = (Certificate) request.getAttribute(StrolchRestfulConstants.STROLCH_CERTIFICATE);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import li.strolch.utils.xml.XmlKeyValue;
|
|||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
@Path("strolch/privilege/policy")
|
||||
@Path("strolch/privilege/policies")
|
||||
public class PrivilegePoliciesService {
|
||||
|
||||
// private static final Logger logger = LoggerFactory.getLogger(PrivilegePoliciesService.class);
|
||||
|
|
|
@ -57,7 +57,7 @@ import li.strolch.service.privilege.roles.PrivilegeUpdateRoleService;
|
|||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
@Path("strolch/privilege/role")
|
||||
@Path("strolch/privilege/roles")
|
||||
public class PrivilegeRolesService {
|
||||
|
||||
private PrivilegeHandler getPrivilegeHandler() {
|
||||
|
@ -143,7 +143,7 @@ public class PrivilegeRolesService {
|
|||
@PUT
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Path("{rolename}/privilege")
|
||||
@Path("{rolename}/privileges")
|
||||
public Response addOrReplacePrivilegeOnRole(@PathParam("rolename") String rolename, PrivilegeRep privilegeRep,
|
||||
@Context HttpServletRequest request) {
|
||||
Certificate cert = (Certificate) request.getAttribute(StrolchRestfulConstants.STROLCH_CERTIFICATE);
|
||||
|
@ -161,7 +161,7 @@ public class PrivilegeRolesService {
|
|||
@DELETE
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Path("{rolename}/privilege/{privilege}")
|
||||
@Path("{rolename}/privileges/{privilege}")
|
||||
public Response removePrivilegeFromRole(@PathParam("rolename") String rolename,
|
||||
@PathParam("privilege") String privilege, @Context HttpServletRequest request) {
|
||||
Certificate cert = (Certificate) request.getAttribute(StrolchRestfulConstants.STROLCH_CERTIFICATE);
|
||||
|
|
|
@ -76,7 +76,7 @@ import li.strolch.service.privilege.users.PrivilegeUserResult;
|
|||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
@Path("strolch/privilege/user")
|
||||
@Path("strolch/privilege/users")
|
||||
public class PrivilegeUsersService {
|
||||
|
||||
private PrivilegeHandler getPrivilegeHandler() {
|
||||
|
@ -114,7 +114,7 @@ public class PrivilegeUsersService {
|
|||
JsonObject propObj = new JsonObject();
|
||||
propObj.addProperty("key", propKey);
|
||||
propObj.addProperty("value", userRep.getProperty(propKey));
|
||||
rolesArr.add(propObj);
|
||||
propsArr.add(propObj);
|
||||
}
|
||||
|
||||
return jsonObject;
|
||||
|
@ -248,7 +248,7 @@ public class PrivilegeUsersService {
|
|||
@PUT
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Path("{username}/role/{rolename}")
|
||||
@Path("{username}/roles/{rolename}")
|
||||
public Response addRoleToUser(@PathParam("username") String username, @PathParam("rolename") String rolename,
|
||||
@Context HttpServletRequest request) {
|
||||
Certificate cert = (Certificate) request.getAttribute(StrolchRestfulConstants.STROLCH_CERTIFICATE);
|
||||
|
@ -266,7 +266,7 @@ public class PrivilegeUsersService {
|
|||
@DELETE
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Path("{username}/role/{rolename}")
|
||||
@Path("{username}/roles/{rolename}")
|
||||
public Response removeRoleFromUser(@PathParam("username") String username, @PathParam("rolename") String rolename,
|
||||
@Context HttpServletRequest request) {
|
||||
Certificate cert = (Certificate) request.getAttribute(StrolchRestfulConstants.STROLCH_CERTIFICATE);
|
||||
|
|
|
@ -41,7 +41,7 @@ import li.strolch.rest.model.UserSession;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Path("strolch/session")
|
||||
@Path("strolch/sessions")
|
||||
public class UserSessionsService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(UserSessionsService.class);
|
||||
|
|
Loading…
Reference in New Issue