Examples of ModuleInfo


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

            }
            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

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

            }
            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

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

            }
            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

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

        }
        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

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

  }
   
    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

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

        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

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

            SimpleMonitor.endTask("WojServicesHelper.getSource.fromModule"); //$NON-NLS-1$
        }
    }
    public URL getJavadocUrl(String org, String name, String rev, String className, Visibility v) throws ServiceException {
        //do not care about security here it is handled by server now
        ModuleInfo moduleInfo = new ModuleInfoImpl(org, name, rev, v, true, true);
        return WojServicesAccess.INSTANCE.getJavadocUrl(moduleInfo, className, null);
    }
View Full Code Here

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

     * @param userId the Id of user who want to see the module
     * @return
     */
    public ModuleInfo getModuleInfo(String md5, UAK uak) {
      LOGGER.debug("Getting ModuleInfo for checksum: " + md5);
      ModuleInfo mi = null;
        if(md5 != null) {
            ModuleDescriptorDao dao= WOJServer.getInstance().getDataService().getModuleDescriptorDao();
            ModuleDescriptor result = dao.getModuleDescriptor(md5, null, uak);
            if (result != null) {
            LOGGER.debug("ModuleInfo: " + result.toString() + " was found for md5: " + md5);
View Full Code Here

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

    }
    public ActionForward getDocUrl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        String org = request.getParameter("org");
        String name = request.getParameter("name");
        String rev = request.getParameter("rev");
        ModuleInfo md = new ModuleInfoImpl(org, name, rev, Visibility.PUBLIC, true, false);
        final URL javaDocUrl = Portal.getInstance().getServerServicesProvider().getContentService().getJavaDocUrl(md, "", "");
        //remove uak quite dirty
        final String url = javaDocUrl.toString();
        request.setAttribute("response", url.substring(0, url.length()-javaDocUrl.getQuery().length()-2));
        return mapping.findForward("module.javadoc");
View Full Code Here

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

    request.setAttribute("response",  getUrl(org, name, rev, type));
        return mapping.findForward("module.javadoc");
    }

  private String getUrl(String org, String name, String rev, String type) {
    ModuleInfo md = new ModuleInfoImpl(org, name, rev, Visibility.PUBLIC, true, false);
    final URL docURL = Portal.getInstance().getServerServicesProvider().getContentService().getDocumentUrl(md, "", "", type);
//remove uak quite dirty
//        final String url = docURL.toString();
//        request.setAttribute("response", url.substring(0, url.length()-docURL.getQuery().length()-2));
        String url = docURL.toString();
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.