/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package socius.factory.arquivo;
import java.rmi.RemoteException;
import socius.adapter.Arquivo;
import socius.adapter.ArquivoWindows;
import socius.util.ConfigSistema;
/**
*
* @author Lucas Dillmann <lucas [at] dillmann.com.br>
*/
public class ArquivoWindowsFactory extends ArquivoFactory {
private static ArquivoFactory instance;
private ArquivoWindowsFactory() {
}
public static ArquivoFactory getInstance() {
if(instance == null)
instance = new ArquivoWindowsFactory();
return instance;
}
@Override
public Arquivo getArquivo() {
Arquivo arq = null;
String path = System.getProperty("user.home") + System.getProperty("file.separator") +
ConfigSistema.getProperty("cliente.pasta_publica");
try {
arq = new ArquivoWindows(path);
} catch (RemoteException ex) {
}
return arq;
}
@Override
public Arquivo getArquivo(String path) {
Arquivo arq = null;
try {
arq = new ArquivoWindows(path);
} catch (RemoteException ex) {
}
return arq;
}
}