Examples of WojException


Examples of org.jayasoft.woj.client.services.exception.WojException

            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$
        }
    }
View Full Code Here

Examples of org.jayasoft.woj.client.services.exception.WojException

            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$
            }
            File file = _wojCache.getSourceFile(md5, className);
            if(file != null) {
                return file;
            }
            ModuleInfo moduleInfo = getModuleInfo(jarPath);
            if(moduleInfo == null || !moduleInfo.isKnown()) {
                throw new WojModuleNotFoundException(jarPath);
            }
            String 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 _wojCache.getSourceFile(md5, className);
        } 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$
        }
    }
View Full Code Here

Examples of org.jayasoft.woj.client.services.exception.WojException

            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$
            }
            URL url = _wojCache.getSourceURL(md5, className);
            if(url != null) {
                return url;
            }
            ModuleInfo moduleInfo = getModuleInfo(jarPath);
            if(moduleInfo == null || !moduleInfo.isKnown()) {
                throw new WojModuleNotFoundException(jarPath);
            }
            String 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 _wojCache.getSourceURL(md5, className);
        } 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$
        }
    }
View Full Code Here

Examples of org.jayasoft.woj.client.services.exception.WojException

            if(moduleInfo == null || !moduleInfo.isKnown()) {
                throw new WojModuleNotFoundException();
            }
            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$
        }
    }
View Full Code Here

Examples of org.jayasoft.woj.client.services.exception.WojException

            if(moduleInfo == null || !moduleInfo.isKnown()) {
                throw new WojModuleNotFoundException();
            }
            String 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 _wojCache.getSourceFile(md5, className);
        } 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$
        }
    }
View Full Code Here

Examples of org.jayasoft.woj.client.services.exception.WojException

            if(moduleInfo == null || !moduleInfo.isKnown()) {
                throw new WojModuleNotFoundException();
            }
            String 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 _wojCache.getSourceURL(md5, className);
        } 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$
        }
    }
View Full Code Here

Examples of org.jayasoft.woj.client.services.exception.WojException

            //do not care about security here it is handled by server now
            ModuleInfo moduleInfo = null;
            try {
                moduleInfo = getModuleInfo(jarPath);
            } catch (ServiceException e) {
                throw new WojException(Messages.getString("common.moduleinfo.get.error.message")+jarPath, e); //$NON-NLS-1$
            }
            return WojServicesAccess.INSTANCE.getJavadocUrl(moduleInfo, docpath, memberInfo);
        } catch (Exception ioe) {
            throw new WojException(Messages.getString("common.moduleinfo.general.error.message")+jarPath, ioe); //$NON-NLS-1$
        }
    }
View Full Code Here

Examples of org.jayasoft.woj.client.services.exception.WojException

            } else {
                throw new IllegalStateException(Messages.getString("common.badlogin.message")); //$NON-NLS-1$
            }
        } catch (ServiceException e) {
            LOGGER.error(Messages.getString("common.contacting.server.error"), e); //$NON-NLS-1$
            throw new WojException(Messages.getString("common.contacting.server.error")+" "+e.getMessage()); //$NON-NLS-1$
        }
    }
View Full Code Here

Examples of org.jayasoft.woj.client.services.exception.WojException

                throw new NotSignedException(Messages.getString("common.badlogin.message")); //$NON-NLS-1$
            }
            ModuleInfo moduleInfo = new ModuleInfoImpl(org, name, rev, v, true, true);
            String source = WojServicesAccess.INSTANCE.getSource(moduleInfo, className, null);
            if(source == null || source.length()==0) {
                throw new WojException(Messages.getString("common.nosource.messsage")+className+" for module :"+moduleInfo); //$NON-NLS-1$ //$NON-NLS-2$
            }
            return source;
        } catch (ServiceException e) {
            throw new WojException (Messages.getString("common.contacting.server.error")+ "  "+e.getMessage(), e); //$NON-NLS-1$
        } finally {
            SimpleMonitor.endTask("WojServicesHelper.getSource.fromModule"); //$NON-NLS-1$
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.