@@ -0,0 +1,2069 @@
+package cl.fatman.capital.fund;%0A%0Aimport org.apache.log4j.Logger;%0A%0Aimport java.io.FileInputStream;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.util.Properties;%0A%0Apublic class FundProperties %7B%0A%09%0A%09private String propertyFile;%0A%09private String userAgent;%0A%09private String fundLink;%0A%09private String fundQuery;%0A%09private String ufLink;%0A%09static final Logger logger = Logger.getLogger(FundProperties.class);%0A%09%0A%09%0A%09public FundProperties(String propertyFile) %7B%0A%09%09super();%0A%09%09this.propertyFile = propertyFile;%0A%09%7D%0A%09%0A%09%0A%09public String getUserAgent() %7B%0A%09%09return userAgent;%0A%09%7D%0A%09%0A%09%0A%09public String getFundLink() %7B%0A%09%09return fundLink;%0A%09%7D%0A%09%0A%09%0A%09public String getFundQuery() %7B%0A%09%09return fundQuery;%0A%09%7D%0A%09%0A%09%0A%09public String getUfLink() %7B%0A%09%09return ufLink;%0A%09%7D%0A%09%0A%09%0A%09public String getPropertyFile() %7B%0A%09%09return propertyFile;%0A%09%7D%0A%09%0A%09%0A%09public void setPropertyFile(String propertyFile) %7B%0A%09%09this.propertyFile = propertyFile;%0A%09%7D%0A%09%0A%09/*%0A%09 * Method that read the property file and store the property values.%0A%09 */%0A%09public void readProperties() %7B%0A%09%09logger.debug(%22readProperties()%22);%0A%09%09InputStream input = null;%0A%09%09try %7B%0A%09%09%09logger.debug(%22Start reading %22 + propertyFile + %22 file.%22);%0A%09%09%09input = new FileInputStream(%22fund.properties%22);%0A%09%09%09logger.debug(%22Loading properties.%22);%0A%09%09%09Properties prop = new Properties();%0A%09%09%09prop.load(input);%0A%09%09%09userAgent = (String) prop.getProperty(%22connection.common.UserAgent%22);%0A%09%09%09logger.debug(%22User agent: %22 + userAgent);%0A%09%09%09fundLink = (String) prop.getProperty(%22connection.fund.Link%22);%0A%09%09%09logger.debug(%22Fund link: %22 + fundLink);%0A%09%09%09fundQuery = (String) prop.getProperty(%22connection.fund.Query%22);%0A%09%09%09logger.debug(%22Raw fund query: %22 + fundQuery);%0A%09%09%09ufLink = (String) prop.getProperty(%22connection.uf.Link%22);%0A%09%09%09logger.debug(%22UF link: %22 + ufLink);%0A%09%09%09logger.debug(%22Finish reading fund.properties file.%22);%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09logger.error(%22Problem reading the property file.%22, e);%0A%09%09%7D finally %7B%0A%09%09%09if (input != null) %7B%0A%09%09%09%09try %7B%0A%09%09%09%09%09input.close();%0A%09%09%09%09%7D catch (IOException e) %7B%0A%09%09%09%09%09logger.error(%22Problem closing the property file.%22, e);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%09%0A%7D

Create a property class to read the configuration file, this will reduce the coupling in the project.