if(!isAutenticate()) {
throw new NotSignedException(Messages.getString("common.badlogin.message")); //$NON-NLS-1$
}
String md5 = computeMD5(jarPath);
if(md5 == null) {
throw new WojException(Messages.getString("common.identifyjar.failed.message")+jarPath); //$NON-NLS-1$
}
String source = _wojCache.getSource(md5, className);
if(source != null) {
return source.toCharArray();
}
ModuleInfo moduleInfo = getModuleInfo(jarPath);
if(moduleInfo == null || !moduleInfo.isKnown()) {
throw new WojModuleNotFoundException(jarPath);
}
source = WojServicesAccess.INSTANCE.getSource(moduleInfo, className, null);
if(source == null || source.length()==0) {
throw new WojException(Messages.getString("common.nosource.messsage",new Object[]{className, moduleInfo})); //$NON-NLS-1$ //$NON-NLS-2$
}
_wojCache.putSource(md5, className, source);
return source.toCharArray();
} catch (ServiceException e) {
throw new WojException (Messages.getString("common.server.send.error.message")+e.getMessage(), e); //$NON-NLS-1$
} finally {
SimpleMonitor.endTask("WojServicesHelper.getSource.fromjar"); //$NON-NLS-1$
}
}