Package kameleon.exception

Examples of kameleon.exception.InvalidPlugInException


    try {
      ZipFile plugInZip = new ZipFile(plugin) ;
      /* Retrieve plug-in information object */
      ZipEntry infoFileEntry = plugInZip.getEntry(PLUGIN_INFO_FILE_NAME) ;
      if (infoFileEntry == null) {
        throw new InvalidPlugInException(plugin.getName()) ;
      }// if
      PlugInInfo info = (PlugInInfo) IOObject.readObjectFromFile(
          new BufferedInputStream(
              plugInZip.getInputStream(infoFileEntry))) ;

      // Close the zip file in order to copy it
      plugInZip.close() ;

      /* Determine the nature of the plug-in before adding it */
      if (info.isAnalyzer()) {
        addJar(plugin, info, this.analyzerFolder) ;
        addConfiguration(info, this.analyzerConfigFile) ;
        this.am.addAnalyzerInfo(info) ;
      } else {
        addJar(plugin, info, this.generatorFolder) ;
        addConfiguration(info, this.generatorConfigFile) ;
      }// if
      copyImages(info) ;
     
      return info ;
    } catch (ZipException e) {
      throw new InvalidPlugInException(plugin.getName()) ;
    } catch (IOException e) {
      throw new FileReadingException(plugin) ;
    }// try
  }// addPlugIn(File, String, String, String)
View Full Code Here


       * - InstantiationException
       * - InvocationTargetException
       * - NoSuchMethodException
       * - SecurityException
       */
      throw new InvalidPlugInException(info, e) ;
    }// try
  }// copyImages(ZipFile)
View Full Code Here

      ClassLoader loader = URLClassLoader.newInstance(
          new URL[] { new File(jarPath).toURI().toURL() }
          ) ;
      return loader ;
    } catch (MalformedURLException e) {
      throw new InvalidPlugInException(info) ;
    }// try
  }// loadPlugIn(PlugInInfo, String, String)
View Full Code Here

       *  - InstantiationException
       *  - InvocationTargetException
       *  - NoSuchMethodException
       *  - SecurityException
       * === ------------------- === */
      throw new InvalidPlugInException(info, e) ;
    }// try
  }// getInstance(PlugInInfo, String, Class<T>)
View Full Code Here

TOP

Related Classes of kameleon.exception.InvalidPlugInException

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.