Examples of ExtensionFilter


Examples of org.parosproxy.paros.extension.filter.ExtensionFilter

   *
   * @param filter Instance receives payloads and is able to change it.
   */
  public void addWebSocketFilter(WebSocketFilter filter) {
    ExtensionLoader extLoader = Control.getSingleton().getExtensionLoader();
    ExtensionFilter extFilter = (ExtensionFilter) extLoader.getExtension(ExtensionFilter.NAME);
    if (extFilter != null) {
      filter.initView(getView());
      extFilter.addFilter(filter);
     
      wsFilterListener.addFilter(filter);
    } else {
      logger.warn("Filter '" + filter.getClass().toString() + "' couldn't be added as the filter extension is not available!");
    }
View Full Code Here

Examples of org.parosproxy.paros.extension.filter.ExtensionFilter

    }
  }
 
  public void removeWebSocketFilter(WebSocketFilter filter) {
    ExtensionLoader extLoader = Control.getSingleton().getExtensionLoader();
    ExtensionFilter extFilter = (ExtensionFilter) extLoader.getExtension(ExtensionFilter.NAME);
    if (extFilter != null) {
      extFilter.removeFilter(filter);
      wsFilterListener.removeFilter(filter);
    }
  }
View Full Code Here

Examples of org.parosproxy.paros.extension.filter.ExtensionFilter

    // should be the first ext to load
    getExtensionLoader().addExtension(new ExtensionOption());
    getExtensionLoader().addExtension(new ExtensionEdit());

    getExtensionLoader().addExtension(new ExtensionFilter());
    getExtensionLoader().addExtension(new ExtensionState());
   
   
    // ZAP: Moved report extension above history so Generate Report is above the Exports
        getExtensionLoader().addExtension(new ExtensionReport());
View Full Code Here

Examples of org.tanukisoftware.wrapper.demo.ExtensionFilter

                fd.setMultiSelectionEnabled( false );
                fd.setCurrentDirectory( new File( "." ) );
                fd.setDialogTitle( DemoApp.getRes().getString( "Select Executable for customization" ) );
                fd.setFileHidingEnabled( true );
                fd.setApproveButtonText( DemoApp.getRes().getString( "Load Executable" ) );
                FileFilter filter = new ExtensionFilter( DemoApp.getRes().getString( "Wrapper Executable (*.exe)" ), new String[] { "exe" } );
                fd.setFileFilter( filter );
                int returnVal = fd.showOpenDialog( CustomizeDialog.this );

                if ( returnVal == JFileChooser.APPROVE_OPTION )
                {
                    try
                    {
                        selectedSource = fd.getSelectedFile().getCanonicalPath();
                        jTextField1.setText( selectedSource );
                    }
                    catch ( IOException e1 )
                    {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
                    }
                }
            }
        } );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        jPanel1.add( jButton1, gridBagConstraints );

        jButton2.setText( "..." );
        jButton2.addActionListener( new ActionListener()
        {
            public void actionPerformed( ActionEvent e )
            {
                JFileChooser fd = new JFileChooser();
                fd.setMultiSelectionEnabled( false );
                fd.setCurrentDirectory( new File( "." ) );
                fd.setDialogTitle( DemoApp.getRes().getString( "Select Icon for customization" ) );
                fd.setFileHidingEnabled( true );
                fd.setApproveButtonText( DemoApp.getRes().getString( "Load Icon" ) );
                FileFilter filter = new ExtensionFilter( DemoApp.getRes().getString( "Icon File (*.ico)" ), new String[] { "ico" } );
                fd.setFileFilter( filter );
                int returnVal = fd.showOpenDialog( CustomizeDialog.this );

                if ( returnVal == JFileChooser.APPROVE_OPTION )
                {
                    try
                    {
                        selectedIcon = fd.getSelectedFile().getCanonicalPath();
                        jTextField2.setText( selectedIcon );
                    }
                    catch ( IOException e1 )
                    {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
                    }
                }
            }
        } );
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        jPanel1.add( jButton2, gridBagConstraints );

        jButton3.setText( "..." );
        jButton3.addActionListener( new ActionListener()
        {
            public void actionPerformed( ActionEvent e )
            {
                JFileChooser fd = new JFileChooser();
                fd.setMultiSelectionEnabled( false );
                fd.setCurrentDirectory( new File( "." ) );
                fd.setDialogTitle( DemoApp.getRes().getString( "Select splash screen for customization" ) );
                fd.setFileHidingEnabled( true );
                fd.setApproveButtonText( DemoApp.getRes().getString( "Load splash screen" ) );
                FileFilter filter = new ExtensionFilter( DemoApp.getRes().getString( "Splash screen File (*.bmp)" ), new String[] { "bmp" } );
                fd.setFileFilter( filter );
                int returnVal = fd.showOpenDialog( CustomizeDialog.this );

                if ( returnVal == JFileChooser.APPROVE_OPTION )
                {
                    try
                    {
                        selectedSplashScreen = fd.getSelectedFile().getCanonicalPath();
                        jTextField3.setText( selectedSplashScreen );
                    }
                    catch ( IOException e1 )
                    {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
                    }
                }
            }
        } );
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        jPanel1.add( jButton3, gridBagConstraints );

        jButton4.setText( DemoApp.getRes().getString( "Customize" ) );
        jButton4.addActionListener( new ActionListener()
        {
            public void actionPerformed( ActionEvent e )
            {
                String errorMsg = "";
                if ( jTextField1.getText().length() == 0 || !new File( jTextField1.getText() ).exists() )
                {
                    jTextField1.setBackground( Color.red );
                    errorMsg = errorMsg.concat( DemoApp.getRes().getString( "No valid Source Binary Specified\n" ) );
                }

                if ( jTextField2.getText().length() != 0 && !new File( jTextField2.getText() ).exists() )
                {
                    jTextField2.setBackground( Color.red );
                    errorMsg = errorMsg.concat( DemoApp.getRes().getString( "No valid Icon File Specified\n" ) );
                }
                if ( jTextField3.getText().length() != 0 && !new File( jTextField3.getText() ).exists() )
                {
                    jTextField3.setBackground( Color.red );
                    errorMsg = errorMsg.concat( DemoApp.getRes().getString( "No valid Splash Screen File Specified\n" ) );
                }
                if ( jTextField2.getText().length() == 0 && jTextField3.getText().length() == 0 )
                {
                    errorMsg = errorMsg.concat( DemoApp.getRes().getString( "Please select at least one Icon or Splash Screen File.\n" ) );
                    jTextField2.setBackground( Color.yellow );
                    jTextField3.setBackground( Color.yellow );
                }

                if ( errorMsg.length() > 0 )
                {
                    JOptionPane.showMessageDialog( CustomizeDialog.this, DemoApp.getRes().getString( "See the following list of errors:\n" ) + errorMsg, DemoApp.getRes().getString( "Error" ), JOptionPane.ERROR_MESSAGE );
                    return;
                }

                JFileChooser fd = new JFileChooser();
                fd.setMultiSelectionEnabled( false );

                fd.setCurrentDirectory( new File( "." ) );
                fd.setDialogTitle( DemoApp.getRes().getString( "Select destination file of the customization" ) );
                fd.setFileHidingEnabled( true );

                fd.setApproveButtonText( DemoApp.getRes().getString( "Custimize Binary" ) );
                FileFilter filter = new ExtensionFilter( DemoApp.getRes().getString( "Executable File (*.exe)" ), new String[] { "exe" } );
                fd.setFileFilter( filter );

                int returnVal = fd.showSaveDialog( CustomizeDialog.this );

                if ( returnVal == JFileChooser.APPROVE_OPTION )
View Full Code Here

Examples of railo.loader.util.ExtensionFilter

 
    private boolean removeLatestUpdateOld(CFMLEngineFactory factory, String password) throws IOException, ServletException {
      File patchDir = new File(factory.getResourceRoot(),"patches");
        if(!patchDir.exists())patchDir.mkdirs();
       
      File[] patches=patchDir.listFiles(new ExtensionFilter(new String[]{"."+getCoreExtension()}));
        File patch=null;
        for(int i=0;i<patches.length;i++) {
           if(patch==null || isNewerThan(railo.loader.util.Util.toInVersion(patches[i].getName()),railo.loader.util.Util.toInVersion(patch.getName()))) {
                 patch=patches[i];
             }
View Full Code Here

Examples of railo.loader.util.ExtensionFilter

        }
        catch (IOException e) {
           throw new ServletException(e);
        }
       
        File[] patches=PATCH_ENABLED?patcheDir.listFiles(new ExtensionFilter(new String[]{"."+getCoreExtension()})):null;
        File railo=null;
        if(patches!=null) {
            for(int i=0;i<patches.length;i++) {
                if(patches[i].getName().startsWith("tmp.rc")) {
                    patches[i].delete();
View Full Code Here

Examples of railo.loader.util.ExtensionFilter

     * @throws IOException
     * @throws ServletException
     */
    private boolean removeUpdate() throws IOException, ServletException {
        File patchDir=getPatchDirectory();
        File[] patches=patchDir.listFiles(new ExtensionFilter(new String[]{"railo","rc","rcs"}));
       
        for(int i=0;i<patches.length;i++) {
          if(!patches[i].delete())patches[i].deleteOnExit();
        }
        _restart();
View Full Code Here

Examples of railo.loader.util.ExtensionFilter

    }
   

    private boolean removeLatestUpdate() throws IOException, ServletException {
        File patchDir=getPatchDirectory();
        File[] patches=patchDir.listFiles(new ExtensionFilter(new String[]{"."+getCoreExtension()}));
        File patch=null;
        for(int i=0;i<patches.length;i++) {
           if(patch==null || isNewerThan(Util.toInVersion(patches[i].getName()),Util.toInVersion(patch.getName()))) {
                 patch=patches[i];
             }
View Full Code Here

Examples of railo.loader.util.ExtensionFilter

    }
   

  public String[] getInstalledPatches() throws ServletException, IOException {
    File patchDir=getPatchDirectory();
        File[] patches=patchDir.listFiles(new ExtensionFilter(new String[]{"."+getCoreExtension()}));
       
        List<String> list=new ArrayList<String>();
        String name;
        int extLen=getCoreExtension().length()+1;
        for(int i=0;i<patches.length;i++) {
View Full Code Here

Examples of railo.loader.util.ExtensionFilter

 
  private String[] getInstalledPatchesOld(CFMLEngineFactory factory) throws IOException {
    File patchDir = new File(factory.getResourceRoot(),"patches");
        if(!patchDir.exists())patchDir.mkdirs();
       
    File[] patches=patchDir.listFiles(new ExtensionFilter(new String[]{"."+getCoreExtension()}));
       
        List<String> list=new ArrayList<String>();
        String name;
        int extLen=getCoreExtension().length()+1;
        for(int i=0;i<patches.length;i++) {
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.