public PluginResult(Status status1, String s) { keepCallback = false; status = status1.ordinal(); int i; if (s == null) { i = 5; } else { i = 1; } messageType = i; strMessage = s; }
@Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { String user = request.getParameter("user"); String pass = request.getParameter("pass"); Status status = dbhandler.authenticateUser(user, pass); dbhandler.updateLastLoginTime(user); try { if (status == Status.OK) { // should eventually change this to something more secure response.addCookie(new Cookie("login", "true")); response.addCookie(new Cookie("name", user)); response.sendRedirect(response.encodeRedirectURL("/")); } else { response.addCookie(new Cookie("login", "false")); response.addCookie(new Cookie("name", "")); response.sendRedirect(response.encodeRedirectURL("/login?error=" + status.ordinal())); } } catch (Exception ex) { log.error("Unable to process login form.", ex); } }
public PluginResult(Status status, boolean b) { this.status = status.ordinal(); this.message = "" + b; }
public PluginResult(Status status, float f) { this.status = status.ordinal(); this.message = "" + f; }
public PluginResult(Status status, int i) { this.status = status.ordinal(); this.message = "" + i; }
public PluginResult(Status status, JSONObject message) { this.status = status.ordinal(); this.message = message.toString(); }
public PluginResult(Status status, String message) { this.status = status.ordinal(); this.message = JSONObject.quote(message); }
public PluginResult(Status status) { this.status = status.ordinal(); this.message = "\"" + PluginResult.StatusMessages[this.status] + "\""; }
public PluginResult(Status status1, int i) { keepCallback = false; status = status1.ordinal(); messageType = 3; encodedMessage = (new StringBuilder()).append("").append(i).toString(); }
public PluginResult(Status status1) { this(status1, StatusMessages[status1.ordinal()]); }
public PluginResult(Status status1, boolean flag) { keepCallback = false; status = status1.ordinal(); messageType = 4; encodedMessage = Boolean.toString(flag); }
public PluginResult(Status status1, JSONObject jsonobject) { keepCallback = false; status = status1.ordinal(); messageType = 2; encodedMessage = jsonobject.toString(); }
public PluginResult(Status status1, JSONArray jsonarray) { keepCallback = false; status = status1.ordinal(); messageType = 2; encodedMessage = jsonarray.toString(); }
public void setStatus(Status s) { status = s; statusDB = s.ordinal(); // Log.v("TodoItem-Status = ", String.valueOf(statusDB)); }