Package org.jayasoft.woj.common.model.content

Examples of org.jayasoft.woj.common.model.content.ModuleInfo


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


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

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

        String jarMd5 = computeMD5(jarPath);
        if(jarMd5 == null) {
            return null;
        }
        LOGGER.debug("jarMd5:"+jarMd5); //$NON-NLS-1$
        ModuleInfo info = _wojCache.getModuleInfo(jarMd5);
        if(info != null && info.isKnown()) {
          LOGGER.debug("found in cache:"+info); //$NON-NLS-1$
            return info;
        }
        LOGGER.debug("ask woj server"); //$NON-NLS-1$
        info = WojServicesAccess.INSTANCE.getModuleInfo(jarMd5);
        LOGGER.debug("woj server respond :"+info); //$NON-NLS-1$
        if(info != null) {
            _wojCache.putModuleInfo(jarMd5, info);
        }
        if(info == null || !info.isKnown()) {
          LOGGER.debug("woj server do not kown this jar looking for local association."); //$NON-NLS-1$
          info = _localAsso.getLocalAssociation(jarMd5);
          LOGGER.debug("local asso:"+info); //$NON-NLS-1$
        }
        return info;
View Full Code Here

            }
            String source = _wojCache.getSource(md5, className);
            if(source != null) {
                return source.toCharArray();
            }
            ModuleInfo moduleInfo = getModuleInfoByMd5(md5);
            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$
View Full Code Here

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

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

        }
        if (isOffline()) {
          LOGGER.debug("Offline mode"); //$NON-NLS-1$
            throw new OfflineException();
        }
        ModuleInfo info = _wojCache.getModuleInfo(md5);
        if(info != null && info.isKnown()) {
          LOGGER.debug("found in cache:"+info); //$NON-NLS-1$
            return info;
        }
        LOGGER.debug("ask woj server"); //$NON-NLS-1$
        info = WojServicesAccess.INSTANCE.getModuleInfo(md5);
        LOGGER.debug("woj server respond :"+info); //$NON-NLS-1$
        if(info != null) {
            _wojCache.putModuleInfo(md5, info);
        }
        if(info == null || !info.isKnown()) {
          LOGGER.debug("woj server do not kown this jar looking for local association."); //$NON-NLS-1$
          info = _localAsso.getLocalAssociation(md5);
          LOGGER.debug("local asso:"+info); //$NON-NLS-1$
        }
        return info;
View Full Code Here

  }
   
    public URL getJavadocUrl(String jarPath, String docpath, String memberInfo) throws WojException  {
        try {
            //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$
            }
View Full Code Here

        try {
            SimpleMonitor.startTask("WojServicesHelper.getSource.fromModule"); //$NON-NLS-1$
            if(!isAutenticate()) {
                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;
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.common.model.content.ModuleInfo

Copyright © 2018 www.massapicom. 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.