use of com.genexus.db.driver.ExternalProvider in project JavaClasses by genexuslabs.
the class Application method getExternalProviderImpl.
private static ExternalProvider getExternalProviderImpl(String service) {
ExternalProvider externalProviderImpl = null;
GXService providerService = getGXServices().get(service);
if (providerService != null) {
Class providerClass;
try {
providerClass = Class.forName(providerService.getClassName());
} catch (ClassNotFoundException e) {
logger.fatal("Unrecognized External Provider class (ClassNotFound) : " + providerService.getName() + " / " + providerService.getClassName(), e);
throw new InternalError("Unrecognized External Provider class (ClassNotFound) : " + providerService.getName() + " / " + providerService.getClassName());
}
try {
externalProviderImpl = (ExternalProvider) providerClass.getConstructor(String.class).newInstance(service);
} catch (Exception e) {
logger.fatal("Unable to Initialize External Provider Class: " + providerService.getClassName(), e);
throw new InternalError("Unable to Initialize External Provider Class: " + providerService.getClassName(), e);
}
}
return externalProviderImpl;
}
use of com.genexus.db.driver.ExternalProvider in project JavaClasses by genexuslabs.
the class GXExternalFileInfo method listFiles.
@Override
public GXFileCollection listFiles(String filter, Object prov, String name) {
ExternalProvider provider = (ExternalProvider) prov;
GXFileCollection files = new GXFileCollection();
for (String file : (filter != null) ? provider.getFiles(name, filter) : provider.getFiles(name)) {
files.add(new GXFile(new com.genexus.util.GXExternalFileInfo(file, provider)));
}
return files;
}
Aggregations