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

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


     * @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

    }
    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

    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

    private void verifyOnWOJ(final String path) {
        setInfoString(Messages.getString("identify.help.waiting")); //$NON-NLS-1$
        new Thread(new Runnable() {
            public void run() {
                try {
                    final ModuleInfo mi = WojServicesHelper.getDefault().getModuleInfo(path);
                    if(mi != null && mi.isKnown()) {
                        setExistOnWoj(path, mi);
                    } else {
                        setExistOnWoj(path, null);
                    }
                } catch (ServiceNotAvailableException e) {
View Full Code Here

    } catch (JavaModelException e) {
            WojPlugin.log("Error while getting user set javadoc url for:"+element, e); //$NON-NLS-1$
    }
        try {
            String jarPath = PDEJavaModelUtil.getContainingJarPath(element);
            ModuleInfo moduleInfo = WojServicesHelper.getDefault().getModuleInfo(jarPath);
            if(moduleInfo == null || !moduleInfo.isKnown()) {
              LOGGER.debug("module is unknow");//$NON-NLS-1$
                MessageDialogWithToggle dialogWithToggle = MessageDialogWithToggle.openYesNoQuestion(shell, Messages.getString("javadoc.addmodule.title"), Messages.getString("javadoc.addmodule.message"), Messages.getString("javadoc.addmodule.toggle.message"), false, WojPlugin.getDefault().getPreferenceStore(), PreferenceConstants.ASK_ADDMODULE_FROM_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                int response = dialogWithToggle.getReturnCode();
                if(response == MessageDialogWithToggle.OK || response == 2) {//seems that return value is 2 for ok instaed of 0
                    AddModule.showAddModuleDialog(jarPath);
                }
            } else if(!moduleInfo.hasJavadoc()) {
              LOGGER.debug("module has no javadoc");//$NON-NLS-1$
              MessageDialog.openWarning(shell, Messages.getString("javadoc.nodoc.title"), Messages.getString("javadoc.nodoc.message", moduleInfo)); //$NON-NLS-1$ //$NON-NLS-2$
            } else {
                String docBase = getJavadocLocation("", element, false); //$NON-NLS-1$
                String member = getMember(element);
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.