Examples of PluginException


Examples of org.apache.wiki.plugin.PluginException

        throws PluginException
    {
        String inputName = (String)pluginParams.get( PARAM_INPUTNAME );
        if( inputName == null )
        {
            throw new PluginException( rb.getString( "formselect.namemissing" ) );
        }
   
        String inputValue = (String)pluginParams.get( PARAM_VALUE );
        String previousValue = (String)ctxValues.get( inputName );
        //
View Full Code Here

Examples of org.dspace.plugin.PluginException

      RecentSubmissions recent = rsm.getRecentSubmissions(community);
      request.setAttribute("recently.submitted", recent);
    }
    catch (RecentSubmissionsException e)
    {
      throw new PluginException(e);
    }
  }
View Full Code Here

Examples of org.gudy.azureus2.plugins.PluginException

                }
              }
            }
        }catch( Throwable e ){
         
          throw( new PluginException( "Failed to read plugin file", e ));
       
        }finally{
       
          if ( zis != null ){
           
            try{
              zis.close();
             
            }catch( Throwable e ){
             
              Debug.printStackTrace(e);
            }
          }
        }

        pos = prefix.lastIndexOf("_");
        String filename_id = null, filename_version = null;
        if ( pos != -1 ){
          filename_id       = prefix.substring(0,pos);             
          filename_version    = prefix.substring(pos+1);
        }
       
        if ( properties == null ){
         
            // one valid possibility here, this is a built-in plugin. this doesn't have
            // a plugin.properties
                   
          if (filename_id != null) {
         
            id       = filename_id;             
            version    = filename_version;
                     
            PluginInterface pi = installer.getPluginManager().getPluginInterfaceByID( id );

            ok =    pi != null &&
                pi.getPluginDirectoryName() == null ||
                    pi.getPluginDirectoryName().length() == 0 );
          }
         
          if ( !ok ){
         
            throw( new PluginException( "Mandatory file 'plugin.properties' not found in plugin file" ));
          }
        }else{ // properties != null
       
          // unfortunately plugin.id isn't mandatory for the properties, and neither is plugin.version
       
          PluginInitializer.checkJDKVersion( "", properties, false );
          PluginInitializer.checkAzureusVersion("", properties, false);
         
          id    = properties.getProperty( "plugin.id" );
          version  = properties.getProperty( "plugin.version" );
         
          // Force both versions to be the same if they are both defined.
          String prop_version = version;
          if (prop_version != null && filename_version != null && !filename_version.equals(prop_version)) {
              throw new PluginException("inconsistent versions [file=" + filename_version + ", prop=" + prop_version + "]");
          }

        }
       
        if ( id == null ){
         
          // see if plugin is already loaded, if so we can get the id from it
         
          String  plugin_class = properties.getProperty("plugin.class");
         
          if ( plugin_class == null ){
           
            String  plugin_classes = properties.getProperty( "plugin.classes" );
           
            if ( plugin_classes != null ){
             
              int  semi_pos = plugin_classes.indexOf(";");
             
              if ( semi_pos == -1 ){
               
                plugin_class  = plugin_classes;
               
              }else{
               
                plugin_class = plugin_classes.substring( 0, semi_pos );
              }
            }
          }
         
          if ( plugin_class != null ){
           
            try{
              PluginInterface pi = installer.getPluginManager().getPluginInterfaceByClass( plugin_class );
             
              if ( pi != null ){
               
                id  = pi.getPluginID();
              }
            }catch( Throwable ignore ){
             
            }
          }
        }
       
        pos = prefix.lastIndexOf("_");
   
        if ( pos != -1 ){
   
          id       = id==null?prefix.substring(0,pos):id;

            // see if we can normalise the ID based on SF values
         
          try{
            SFPluginDetailsLoader  loader = SFPluginDetailsLoaderFactory.getSingleton();
         
            String[]  ids = loader.getPluginIDs();
           
            for (int i=0;i<ids.length;i++){
             
              if ( ids[i].equalsIgnoreCase(id)){
               
                id = ids[i];
               
                break;
              }
            }
          }catch( Throwable e ){
           
            Debug.printStackTrace(e);
          }

          version    = version == null?prefix.substring(pos+1):version;

        }
       
        this.name = id;
       
        if ( properties != null ){
         
          String plugin_name = properties.getProperty( "plugin.name" );
         
          if ( plugin_name != null ){
           
            this.name = plugin_name;
          }
        }
       
        ok  = id != null && version != null;
      }
    }
   
    if ( !ok ){
     
      throw( new PluginException( "Invalid plugin file name: must be of form <pluginid>_<version>.[jar|zip]" ));
    }
  }
View Full Code Here

Examples of org.gudy.azureus2.plugins.PluginException

    unload( false );
  }
 
  protected void unload( boolean for_reload ) throws PluginException {
    if (!isUnloadable()) {
      throw new PluginException("Plugin isn't unloadable");
    }
       
    String dir = pi.getPluginDirectoryName();
       
    // if not dir based then just test this one
View Full Code Here

Examples of org.hyperic.hq.product.PluginException

    try {
      targetDomainPattern = new ObjectName(getMandatoryProperty(this,
          TalendHqConstants.PROP_TARGET_DOMAIN) + ":*");
    } catch (MalformedObjectNameException e) {
      throw new PluginException(e);
    }

    try {
      String objName = getOptionalProperty(this,
          TalendHqConstants.PROP_ABSENT_DOMAIN);
      if (objName != null) {
        absentDomainPattern = new ObjectName(objName + ":*");
      }
    } catch (MalformedObjectNameException e) {
      throw new PluginException(e);
    }
  }
View Full Code Here

Examples of org.jnode.plugin.PluginException

            fileSystemService.getApi().mkDir(MOUNT_ROOT);

            devMan = InitialNaming.lookup(DeviceManager.NAME);
            devMan.addListener(this);
        } catch (NameNotFoundException ex) {
            throw new PluginException("Cannot find DeviceManager", ex);
        } catch (IOException ex) {
            throw new PluginException("Cannot create devices directory");
        }

    }
View Full Code Here

Examples of org.jnode.plugin.PluginException

            VMIOUtils.setAPI(getApi(), this);
            mounter = new FileSystemMounter(this);
            InitialNaming.bind(NAME, this);
            mounter.start();
        } catch (NamingException ex) {
            throw new PluginException(ex);
        } catch (DeviceAlreadyRegisteredException ex) {
            throw new PluginException(ex);
        } catch (DriverException ex) {
            throw new PluginException(ex);
        }
    }
View Full Code Here

Examples of org.jnode.plugin.PluginException

    public void start() throws PluginException {
        providersEP.addListener(this);
        try {
            InitialNaming.bind(NAME, this);
        } catch (NamingException ex) {
            throw new PluginException(ex);
        }
        updateFontProviders();
    }
View Full Code Here

Examples of org.jnode.plugin.PluginException

    @Override
    protected void startPlugin() throws PluginException {
        try {
            InitialNaming.bind(NAME, this);
        } catch (NamingException ex) {
            throw new PluginException(ex);
        }
    }
View Full Code Here

Examples of org.jnode.plugin.PluginException

    protected void startPlugin() throws PluginException {
        try {
            ShellManager mgr = InitialNaming.lookup(ShellManager.NAME);
            mgr.registerInterpreterFactory(FACTORY);
        } catch (NamingException ex) {
            throw new PluginException("Cannot find the shell manager", ex);
        }
    }
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.