Package org.aavso.tools.vstar.plugin

Examples of org.aavso.tools.vstar.plugin.IPlugin


          URL pluginUrl = new URL(pluginBaseURLStr + "/"
              + pluginJarFileName);
          String className = pluginJarFileName.replace(".jar", "");

          IPlugin plugin = createObjectFromJarURL(pluginUrl,
              className);

          remoteDescriptions.put(plugin.getDescription(),
              pluginJarFileName);
          remotePlugins.put(pluginJarFileName, pluginUrl);

          // Store dependent libs, if any exist, by plugin key.
          if (fields.length == 2) {
            if (interrupted)
              break;

            File pluginLibDirPath = new File(
                System.getProperty("user.home")
                    + File.separator + PLUGIN_LIBS_DIR);

            for (String libFileStr : fields[1].split("\\s*,\\s*")) {
              String libJarFileName = libFileStr;
              URL libUrl = new URL(libBaseURLStr + "/"
                  + libJarFileName);
              List<URL> libUrls = libs.get(pluginJarFileName);
              if (libUrls == null) {
                libUrls = new ArrayList<URL>();
                libs.put(pluginJarFileName, libUrls);
              }
              libUrls.add(libUrl);

              // Populate dependent library name and reference
              // counting maps. Note that we treat the remote
              // plugin information as the source of truth for the
              // basis of checking against local library jar
              // files. Our reference counting will only be as
              // good as this remote/local correspondence.
              File localLibJarFilePath = new File(
                  pluginLibDirPath, libJarFileName);

              if (localLibJarFilePath.exists()) {
                if (!libDescriptions.containsKey(plugin
                    .getDescription())) {
                  libDescriptions.put(
                      plugin.getDescription(),
                      new HashSet<String>());
                }
                libDescriptions.get(plugin.getDescription())
                    .add(libJarFileName);

                if (!libRefs.containsKey(libJarFileName)) {
                  libRefs.put(libJarFileName, 1);
                } else {
View Full Code Here


          // file and description.
          String pluginJarFileName = file.getName();
          localPlugins.put(pluginJarFileName, file);
          String className = pluginJarFileName.replace(".jar", "");

          IPlugin plugin = createObjectFromJarURL(file.toURI()
              .toURL(), className);

          localDescriptions.put(plugin.getDescription(),
              pluginJarFileName);
        } catch (MalformedURLException e) {
          MessageBox.showErrorDialog("Plug-in Manager",
              "Invalid local plug-in location.");
        } catch (ClassNotFoundException e) {
View Full Code Here

TOP

Related Classes of org.aavso.tools.vstar.plugin.IPlugin

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.