<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page trimDirectiveWhitespaces="true" %> <%@ page import="org.crosswire.webtools.RightsAndRoles" %> <%@ page import="org.crosswire.webtools.RightsAndRoles.User" %> <%@ page import="org.crosswire.xml.XMLBlock" %> <%@ page import="org.crosswire.webtools.annotation.*" %> <%@ page import="javax.validation.constraints.NotNull" %> <%@ page import="org.crosswire.webtools.*" %> <%! @Description(value = "Retrieve information about a user.", name = "projectmanagement/user/get") public static class MyParameters extends Parameters { @NotNull @Description(value = "which user to retrieve", example = "joe") public String userName; @Description(value = "show usage for this web service", defaultValue = "false", example = "true") public Boolean usage = false; } %> <% MyParameters params = new MyParameters().loadFromRequest(request, response, false); if (params.getErrors().size() == 0 && !params.usage) { User user = RightsAndRoles.getInstance().getUser(params.userName); if (user == null) { params.addError(-5, "user not found."); } else { Serializer.output(response, out, params, user); return; } } else params.format = "html"; Serializer.reportErrors(request, response, out, params, true); %>