use of com.liferay.ide.kaleo.core.KaleoCore in project liferay-ide by liferay.
the class WorkflowValidationProxy method getGroovyFile.
protected File getGroovyFile() throws Exception {
Object loadAdapter = _runtime.loadAdapter(ILiferayRuntime.class, null);
ILiferayRuntime liferayRuntime = (ILiferayRuntime) loadAdapter;
KaleoCore kaleoCore = KaleoCore.getDefault();
if (liferayRuntime != null) {
Version version = new Version(liferayRuntime.getPortalVersion());
Bundle bundle = kaleoCore.getBundle();
URL bundleURL = FileLocator.toFileURL(bundle.getEntry(_getGroovyWorkflowValidationScript(version)));
return new File(bundleURL.getFile());
}
IStatus error = KaleoCore.createErrorStatus("Unable to locate groovy script");
ILog log = kaleoCore.getLog();
log.log(error);
throw new CoreException(error);
}
Aggregations