Examples of UserIndexKey


Examples of org.onebusaway.users.model.UserIndexKey

    return SUCCESS;
  }

  @Validations(requiredStrings = {@RequiredStringValidator(fieldName = "model.apiKey", message = "Hey!")})
  public String edit() {
    UserIndexKey key = new UserIndexKey(UserIndexTypes.API_KEY,
        _model.getApiKey());
    UserIndex userIndex = _userService.getUserIndexForId(key);
    if (userIndex == null)
      return INPUT;
    UserBean bean = _userService.getUserAsBean(userIndex.getUser());
View Full Code Here

Examples of org.onebusaway.users.model.UserIndexKey

  }

  @Validations(requiredStrings = {@RequiredStringValidator(fieldName = "model.apiKey", message = "Hey!")})
  public String delete() {

    UserIndexKey key = new UserIndexKey(UserIndexTypes.API_KEY,
        _model.getApiKey());
    UserIndex userIndex = _userService.getUserIndexForId(key);
    if (userIndex == null)
      return INPUT;
View Full Code Here

Examples of org.onebusaway.users.model.UserIndexKey

   * Private Methods
   ****/

  private void saveOrUpdateKey(String apiKey, Long minApiRequestInterval) {

    UserIndexKey key = new UserIndexKey(UserIndexTypes.API_KEY, apiKey);
    UserIndex userIndex = _userService.getOrCreateUserForIndexKey(key, "", true);

    _userPropertiesService.authorizeApi(userIndex.getUser(),
        minApiRequestInterval);

View Full Code Here

Examples of org.onebusaway.users.model.UserIndexKey

  @Override
  public String execute() {
    if (_apiKey == null) {
      _apiKey = UUID.randomUUID().toString();
    }
    UserIndexKey key = new UserIndexKey(UserIndexTypes.API_KEY, _apiKey);
   
    _userService.getUserIndexForId(key);
   
    UserIndex userIndex = _userService.getOrCreateUserForIndexKey(key, _apiKey,
        false);
View Full Code Here

Examples of org.onebusaway.users.model.UserIndexKey

    if (!_password.equals(_password2))
      return INPUT;

    String credentials = _passwordEncoder.encodePassword(_password, _userName);
    UserIndexKey key = new UserIndexKey(UserIndexTypes.USERNAME, _userName);
    UserIndex userIndex = _userService.getOrCreateUserForIndexKey(key,
        credentials, false);

    if (userIndex == null)
      return null;
View Full Code Here

Examples of org.onebusaway.users.model.UserIndexKey

  }

  @Override
  public String execute() {

    UserIndexKey key = new UserIndexKey(_type, _id);
    UserIndex userIndex = _userService.getUserIndexForId(key);
    if (userIndex == null)
      return INPUT;

    _user = _userService.getUserAsBean(userIndex.getUser());
View Full Code Here

Examples of org.onebusaway.users.model.UserIndexKey

    return "changePassword";
  }

  public String changePasswordSubmit() {

    UserIndexKey key = new UserIndexKey(_type, _id);
    UserIndex userIndex = _userService.getUserIndexForId(key);
    if (userIndex == null)
      return INPUT;

    if (!ObjectUtils.equals(_password, _password2))
View Full Code Here

Examples of org.onebusaway.users.model.UserIndexKey

  public String execute() {

    if (_phoneNumber == null || _phoneNumber.length() == 0)
      return INPUT;

    UserIndexKey key = new UserIndexKey(UserIndexTypes.PHONE_NUMBER,_phoneNumber);
    _currentUserService.removeUserIndex(key);

    return SUCCESS;
  }
View Full Code Here

Examples of org.onebusaway.users.model.UserIndexKey

      IndexedUserDetails details = _currentUserService.getCurrentUserDetails();
      String id = null;
      if (details == null) {
        id = UUID.randomUUID().toString();
      } else {
        UserIndexKey key = details.getUserIndexKey();
        id = key.getType() + "|" + key.getValue();
      }
      _currentUserService.getCurrentUser(true);
      _currentUserService.handleAddAccount("tccStudyId", id, _id, false);
    } catch (Exception ex) {
      _log.warn("error registering tcc study id", ex);
View Full Code Here

Examples of org.onebusaway.users.model.UserIndexKey

    if (!_password.equals(_password2))
      return INPUT;

    String credentials = _passwordEncoder.encodePassword(_password, _userName);
    UserIndexKey key = new UserIndexKey(UserIndexTypes.USERNAME, _userName);
    UserIndex userIndex = _userService.getOrCreateUserForIndexKey(key,
        credentials, false);

    if (userIndex == null)
      return ERROR;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.