/*
 * Created on 27-Oct-2009
 *
 * TODO 
 */
package uk.ac.roe.wfau;

import java.io.InputStream;
import java.util.Properties;

/**
 * @author mar
 *
 */
public class LoadVDFSProperties {
    private static LoadVDFSProperties singletonObject;
    public static String SSSCGIURL="DEFAULT";

	/** A private Constructor prevents any other class from instantiating. */
	private LoadVDFSProperties() {
	    System.out.println("INIT...");

		//	 Optional Code
	    try {
	    InputStream inProp = getClass().getClassLoader().getResourceAsStream("WSA.properties");
	    Properties properties = new Properties();
	
	    
           properties.load(inProp);
           VDFSProperties.WSASERVERS=FormatLines.commaSeparatedStringToStringArray(properties.getProperty("WSASERVERS").trim());
           VDFSProperties.VSASERVERS=FormatLines.commaSeparatedStringToStringArray(properties.getProperty("VSASERVERS").trim());
           VDFSProperties.WSACUSERVERS=FormatLines.commaSeparatedStringToStringArray(properties.getProperty("WSACUSERVERS").trim());
           VDFSProperties.VSACUSERVERS=FormatLines.commaSeparatedStringToStringArray(properties.getProperty("VSACUSERVERS").trim());
           VDFSProperties.WSANSSERVERS=FormatLines.commaSeparatedStringToStringArray(properties.getProperty("WSANSSERVERS").trim());
           
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
	    
	}
	public static synchronized  LoadVDFSProperties getSingletonObject() {
		if (singletonObject == null) {
			singletonObject = new LoadVDFSProperties();
		}
		return singletonObject;
	}
	public Object clone() throws CloneNotSupportedException {
		throw new CloneNotSupportedException();
	}
}
