Package com.adito.properties.impl.userattributes

Examples of com.adito.properties.impl.userattributes.UserAttributeKey


            throw new InvalidLoginCredentialsException("No answer has been provided.");
        }
       
        answer = normalizeAnswer(answer.trim());
       
        String actualAnswer = normalizeAnswer(Property.getProperty(new UserAttributeKey(session.getUser(), SECURITY_QUESTIONS[currentQuestion])));
        if(actualAnswer == null)
          throw new InvalidLoginCredentialsException("Sorry but you do not have an answer configured. Contact your administrator");
       
        if(actualAnswer.equals(answer)) {
          return new PersonalQuestionsCredentials(session.getUsername(), currentQuestion, answer);         
View Full Code Here


            throw new SecurityErrorException(SecurityErrorException.INTERNAL_ERROR, "Invalid use of personal questions module");
         
          String answer;
          boolean canAuth = true;
          for(int i=0; i< SECURITY_QUESTIONS.length;i++) {
            answer = Property.getProperty(new UserAttributeKey(session.getUser(), SECURITY_QUESTIONS[i]));
            if(answer == null || "".equals(answer)) {
              canAuth = false;
              break;
            }
          }
View Full Code Here

public class PersistentSettings {

  public static int getIntValue(SessionInfo session, String key, int defaultValue) {
   
    UserAttributeKey attr = new UserAttributeKey(session.getUser(), key);
   
    checkDefinition(attr, PropertyDefinition.TYPE_INTEGER, String.valueOf(defaultValue));
   
    return Property.getPropertyInt(new UserAttributeKey(session.getUser(), key));
   
  }
View Full Code Here

   
  }

  public static String getValue(SessionInfo session, String key, String defaultValue) {
   
    UserAttributeKey attr = new UserAttributeKey(session.getUser(), key);
   
    checkDefinition(attr, PropertyDefinition.TYPE_STRING, String.valueOf(defaultValue));
   
    return Property.getProperty(new UserAttributeKey(session.getUser(), key));
   
  }
View Full Code Here

    }
  }
 
  public static void setValue(SessionInfo session, String key, String actualValue, String defaultValue) {
   
    UserAttributeKey attr = new UserAttributeKey(session.getUser(), key);
   
    checkDefinition(attr, PropertyDefinition.TYPE_STRING, String.valueOf(defaultValue));
   
    Property.setProperty(new UserAttributeKey(session.getUser(), key), actualValue, session);
  }
View Full Code Here

  }


  public static void setIntValue(SessionInfo session, String key, int actualValue, int defaultValue) {
   
    UserAttributeKey attr = new UserAttributeKey(session.getUser(), key);
   
    checkDefinition(attr, PropertyDefinition.TYPE_INTEGER, String.valueOf(defaultValue));
   
    Property.setProperty(new UserAttributeKey(session.getUser(), key), actualValue, session);
  }
View Full Code Here

TOP

Related Classes of com.adito.properties.impl.userattributes.UserAttributeKey

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.