home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / Plugin.java < prev    next >
Text File  |  1998-10-25  |  2KB  |  63 lines

  1. /*
  2.  * Copyright 1998 Symantec Corporation, All Rights Reserved.
  3.  */
  4.  
  5. package com.symantec.itools.vcafe.openapi.pluginapi;
  6.  
  7. import java.io.InputStream;
  8. import java.io.OutputStream;
  9.  
  10. /**
  11.  * The API used to integrate a software component/feature into the Visual Cafe
  12.  *
  13.  * @author Symantec Internet Tools Division
  14.  * @version 1.0
  15.  * @since VCafe 3.0
  16.  */
  17. public interface Plugin
  18. {
  19.     /**
  20.      * This method is called by the Visual Cafe framework, after it successfully loads
  21.      * a plugin class and create an instance of it. Access to Visual Cafe open API is
  22.      * granted during this initialization.
  23.      */
  24.     void init();
  25.  
  26.     /**
  27.      * Before Visual Cafe exits, this method is called for every initialized plugin.
  28.      * The plugin should not perform any action after this method is called. In particular,
  29.      * threads created by the plugin must be destroyed.
  30.      */
  31.     void destroy();
  32.  
  33.     /**
  34.      * Plugin info. ** NOT YET IMPLEMENTED **
  35.      * A place holder to obtain name, version and other info of a plugin.
  36.      */
  37.     void getPluginInfo();
  38.  
  39.     /**
  40.      * Plugin persistence. This method is called by the Visual Cafe framework when
  41.      * saving workspace information to the disk. This could happen when a project
  42.      * is closed or Visual Cafe is shutdown, or a workspace is switched.
  43.      * A plug in might want to save any state information it might have
  44.      * This information can be read back in the restore method when the framework loads
  45.      * the workspace.
  46.      *
  47.      * @param os    the output stream to which data will be written
  48.      * @param b        true for local workspace and false for global workspace
  49.      */
  50.     void save(OutputStream os, boolean local);
  51.  
  52.     /**
  53.      * Plugin persistence. This method is called by the Visual Cafe framework when
  54.      * restoring workspace information from the disk. This could happen when a project
  55.      * is opened or Visual Cafe is started, or a workspace is switched.
  56.      * A plug in might want to read any state information it might have saved earlier
  57.      *
  58.      * @param is    the input stream from which to read the data
  59.      * @param b        true for local workspace and false for global workspace
  60.      */
  61.     void restore(InputStream is, boolean local);
  62. }
  63.