public WastebasketResourceResponse get(Context context, Request request, Response response, Variant variant)
throws ResourceException
{
WastebasketResourceResponse result = new WastebasketResourceResponse();
WastebasketResource resource = new WastebasketResource();
resource.setItemCount(-1);
Long totalSize = wastebasket.getTotalSize();
if (totalSize != null) {
resource.setSize(totalSize);
}
else {
resource.setSize(-1);
}
result.setData(resource);
return result;