package com.winsun.tenpay;

import java.util.Properties;

public class AlipayGlobals
{
  public static final String PARAMS_LIST = "paramsList";
  private static Properties properties = null;
  
  private static synchronized void loadProperties()
  {
    if (properties == null) {
      properties = new InitPropLoader().getProperties("tenpayconfig.properties");
    }
  }
  
  public static synchronized void reloadProperties()
  {
    properties = null;
    properties = new InitPropLoader().getProperties("tenpayconfig.properties");
  }
  
  public static String getProperty(String property)
  {
    loadProperties();
    String value = null;
    if (properties != null)
    {
      value = properties.getProperty(property);
      if (value != null) {
        value = value.trim();
      }
    }
    return value;
  }
}
