001package service.tut.pori.users;
002
003import java.util.Properties;
004
005import org.apache.commons.lang3.StringUtils;
006import org.apache.log4j.Logger;
007
008import core.tut.pori.properties.SystemProperty;
009
010/**
011 * Properties for User Service.
012 */
013public class UserServiceProperties extends SystemProperty {
014  private static final String PROPERTY_SERVICE_PORI_USERS = PROPERTY_SERVICE_PORI+".users";
015  private static final String PROPERTY_SERVICE_PORI_USERS_REGISTER_PASSWORD = PROPERTY_SERVICE_PORI_USERS+".register_password";
016  private String _registerPassword = null;
017
018  @Override
019  public void initialize(Properties properties) throws IllegalArgumentException {
020    _registerPassword = properties.getProperty(PROPERTY_SERVICE_PORI_USERS_REGISTER_PASSWORD);
021    if(StringUtils.isBlank(_registerPassword)){
022      Logger.getLogger(getClass()).debug("No register password set.");
023    }
024  }
025
026  /**
027   * @return the registerPassword
028   */
029  public String getRegisterPassword() {
030    return _registerPassword;
031  }
032}