Package net.sf.chellow.monad.types

Examples of net.sf.chellow.monad.types.EmailAddress


    if (emailAddressString == null) {
      emailAddressString = configuration.getProperty("ip"
          + inv.getRequest().getRemoteAddr().replace(".", "-"));
    }
    if (emailAddressString != null) {
      user = User.findUserByEmail(new EmailAddress(emailAddressString
          .trim()));
    }
    return user;
  }
View Full Code Here


  public static void generalImport(String action, String[] values,
      Element csvElement) throws HttpException {
    if (action.equals("insert")) {
      String emailAddressStr = GeneralImport.addField(csvElement,
          "Email Address", values, 0);
      EmailAddress emailAddress = new EmailAddress(emailAddressStr);
      String password = GeneralImport.addField(csvElement, "Password",
          values, 1);
      String passwordDigest = GeneralImport.addField(csvElement,
          "Password Digest", values, 2);
      String userRoleCode = GeneralImport.addField(csvElement,
View Full Code Here

      }
      setPasswordDigest(digest(newPassword));
      Hiber.commit();
      inv.sendOk(document("New password set successfully."));
    } else {
      EmailAddress emailAddress = inv.getEmailAddress("email-address");
      Long userRoleId = inv.getLong("user-role-id");
      UserRole userRole = UserRole.getUserRole(userRoleId);
      if (!inv.isValid()) {
        throw new UserException(document());
      }
View Full Code Here

      return null;
      // throw new BadRequestException(
      // "The Authorisation header must contain a base64 encoded string
      // consisting of a username and password separated by a ':'.");
    }
    User user = Chellow.USERS_INSTANCE.findUser(new EmailAddress(
        usernameAndPassword[0]));
    if (user == null) {
      return null;
    } else if (!user.getPasswordDigest().equals(
        User.digest(usernameAndPassword[1]))) {
View Full Code Here

  public MonadUri getEditUri() throws HttpException {
    return Chellow.ROOT_URI.resolve(getUriId()).append("/");
  }

  public void httpPost(Invocation inv) throws HttpException {
    EmailAddress emailAddress = inv.getEmailAddress("email-address");
    String password = inv.getString("password");
    Long userRoleId = inv.getLong("user-role-id");

    if (!inv.isValid()) {
      throw new UserException(document());
View Full Code Here

TOP

Related Classes of net.sf.chellow.monad.types.EmailAddress

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.