Rev 345 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package in.shop2020.hotspot.dashbaord.server.handler;import in.shop2020.hotspot.dashbaord.shared.actions.AuthRequest;import in.shop2020.hotspot.dashbaord.shared.actions.AuthResponse;import net.customware.gwt.dispatch.server.ActionHandler;import net.customware.gwt.dispatch.server.ExecutionContext;import net.customware.gwt.dispatch.shared.ActionException;public class AuthHandler implements ActionHandler<AuthRequest, AuthResponse>{@Overridepublic AuthResponse execute(AuthRequest request, ExecutionContext response)throws ActionException {String userName = request.getUsername();if (userName.trim().toUpperCase().equals("SHOP2020")){return new AuthResponse(userName, true, " You are charming, loving and affectionate");}elsereturn new AuthResponse(userName, false, "None");}@Overridepublic Class<AuthRequest> getActionType() {return AuthRequest.class;}@Overridepublic void rollback(AuthRequest arg0, AuthResponse arg1,ExecutionContext arg2) throws ActionException {}}