mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
Fix overridden method annotations
This commit is contained in:
@@ -43,6 +43,37 @@ public class GroupCollectionResource extends AbstractManagerResource<Group, Grou
|
|||||||
this.groupCollectionToDtoMapper = groupCollectionToDtoMapper;
|
this.groupCollectionToDtoMapper = groupCollectionToDtoMapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns all groups for a given page number with a given page size (default page size is {@value DEFAULT_PAGE_SIZE}).
|
||||||
|
* <strong>Note:</strong> This method requires admin privileges.
|
||||||
|
*
|
||||||
|
* @param request the current request
|
||||||
|
* @param page the number of the requested page
|
||||||
|
* @param pageSize the page size (default page size is {@value DEFAULT_PAGE_SIZE})
|
||||||
|
* @param sortby sort parameter
|
||||||
|
* @param desc sort direction desc or aesc
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path("")
|
||||||
|
@TypeHint(GroupDto[].class)
|
||||||
|
@StatusCodes({
|
||||||
|
@ResponseCode(code = 200, condition = "success"),
|
||||||
|
@ResponseCode(code = 403, condition = "forbidden, the current user has no admin privileges"),
|
||||||
|
@ResponseCode(code = 500, condition = "internal server error")
|
||||||
|
})
|
||||||
|
@Override
|
||||||
|
public Response getAll(@Context Request request,
|
||||||
|
@DefaultValue("0") @QueryParam("page") int page,
|
||||||
|
@DefaultValue("" + DEFAULT_PAGE_SIZE) @QueryParam("pageSize") int pageSize,
|
||||||
|
@QueryParam("sortby") String sortby,
|
||||||
|
@DefaultValue("false")
|
||||||
|
@QueryParam("desc") boolean desc) {
|
||||||
|
PageResult<Group> pageResult = fetchPage(sortby, desc, page, pageSize);
|
||||||
|
|
||||||
|
return Response.ok(groupCollectionToDtoMapper.map(page, pageSize, pageResult)).build();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new group.
|
* Creates a new group.
|
||||||
* @param groupDto The group to be created.
|
* @param groupDto The group to be created.
|
||||||
@@ -68,36 +99,6 @@ public class GroupCollectionResource extends AbstractManagerResource<Group, Grou
|
|||||||
return Response.created(URI.create(group(uriInfo).self(group.getName()))).build();
|
return Response.created(URI.create(group(uriInfo).self(group.getName()))).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns all groups for a given page number with a given page size (default page size is {@value DEFAULT_PAGE_SIZE}).
|
|
||||||
* <strong>Note:</strong> This method requires admin privileges.
|
|
||||||
*
|
|
||||||
* @param request the current request
|
|
||||||
* @param page the number of the requested page
|
|
||||||
* @param pageSize the page size (default page size is {@value DEFAULT_PAGE_SIZE})
|
|
||||||
* @param sortby sort parameter
|
|
||||||
* @param desc sort direction desc or aesc
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GET
|
|
||||||
@Path("")
|
|
||||||
@TypeHint(GroupDto[].class)
|
|
||||||
@StatusCodes({
|
|
||||||
@ResponseCode(code = 200, condition = "success"),
|
|
||||||
@ResponseCode(code = 403, condition = "forbidden, the current user has no admin privileges"),
|
|
||||||
@ResponseCode(code = 500, condition = "internal server error")
|
|
||||||
})
|
|
||||||
public Response getAll(@Context Request request, @Context UriInfo uriInfo,
|
|
||||||
@DefaultValue("0") @QueryParam("page") int page,
|
|
||||||
@DefaultValue("" + DEFAULT_PAGE_SIZE) @QueryParam("pageSize") int pageSize,
|
|
||||||
@QueryParam("sortby") String sortby,
|
|
||||||
@DefaultValue("false")
|
|
||||||
@QueryParam("desc") boolean desc) {
|
|
||||||
PageResult<Group> pageResult = fetchPage(sortby, desc, page, pageSize);
|
|
||||||
|
|
||||||
return Response.ok(groupCollectionToDtoMapper.map(page, pageSize, pageResult)).build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected GenericEntity<Collection<Group>> createGenericEntity(Collection<Group> items) {
|
protected GenericEntity<Collection<Group>> createGenericEntity(Collection<Group> items) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public class UserCollectionResource extends AbstractManagerResource<User, UserEx
|
|||||||
@ResponseCode(code = 403, condition = "forbidden, the current user has no admin privileges"),
|
@ResponseCode(code = 403, condition = "forbidden, the current user has no admin privileges"),
|
||||||
@ResponseCode(code = 500, condition = "internal server error")
|
@ResponseCode(code = 500, condition = "internal server error")
|
||||||
})
|
})
|
||||||
|
@Override
|
||||||
public Response getAll(@Context Request request,
|
public Response getAll(@Context Request request,
|
||||||
@DefaultValue("0") @QueryParam("page") int page,
|
@DefaultValue("0") @QueryParam("page") int page,
|
||||||
@DefaultValue("" + DEFAULT_PAGE_SIZE) @QueryParam("pageSize") int pageSize,
|
@DefaultValue("" + DEFAULT_PAGE_SIZE) @QueryParam("pageSize") int pageSize,
|
||||||
|
|||||||
Reference in New Issue
Block a user