Package com.eviware.soapui.support.components

Examples of com.eviware.soapui.support.components.SimpleBindingForm


  private JButton validateButton;

  @Override
  protected JComponent buildUI()
  {
    SimpleBindingForm form = new SimpleBindingForm( new PresentationModel<MerlinCrypto>( this ) );

    form.appendTextField( "keystore", "Keystore", "The keystore file" );
    form.appendPasswordField( "password", "Password", "The keystore password" );
    form.appendComboBox( "type", "Type", new String[] { "JKS", "PKCS12" }, "The keystore type" );

    form.addRightComponent( validateButton = new JButton( "Validate" ) );

    validateButton.addActionListener( new ActionListener()
    {

      public void actionPerformed( ActionEvent e )
      {
        if( StringUtils.isNullOrEmpty( getPassword() ) )
        {
          UISupport.showErrorMessage( "Missing password" );
          return;
        }

        try
        {
          Crypto crypto = getCrypto();
          UISupport.showInfoMessage( "Loaded keystore of type: " + crypto.getKeyStore().getType() );
        }
        catch( Throwable t )
        {
          UISupport.showErrorMessage( t );
        }

      }
    } );

    return form.getPanel();
  }
View Full Code Here


        super.init(config, container, TYPE);
    }

    @Override
    protected JComponent buildUI() {
        SimpleBindingForm form = new SimpleBindingForm(new PresentationModel<SignatureEntry>(this));
        form.addSpace(5);
        wssContainerListener = new InternalWssContainerListener();
        getWssContainer().addWssContainerListener(wssContainerListener);

        form.appendComboBox("crypto", "Keystore",
                new KeystoresComboBoxModel(getWssContainer(), getWssContainer().getCryptoByName(crypto), true),
                "Selects the Keystore containing the key to use for signing").addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                keyAliasComboBoxModel.update(getWssContainer().getCryptoByName(crypto));
            }
        });

        keyAliasComboBoxModel = new KeyAliasComboBoxModel(getWssContainer().getCryptoByName(crypto));
        form.appendComboBox("username", "Alias", keyAliasComboBoxModel, "The alias for the key to use for encryption");

        form.appendPasswordField("password", "Password", "The certificate password");

        form.appendComboBox("keyIdentifierType", "Key Identifier Type", new Integer[]{1, 2, 3, 4, 8},
                "Sets which key identifier to use").setRenderer(new KeyIdentifierTypeRenderer());
        form.appendComboBox("signatureAlgorithm", "Signature Algorithm", new String[]{DEFAULT_OPTION, WSConstants.RSA,
                WSConstants.DSA, XMLSignature.ALGO_ID_MAC_HMAC_SHA1, XMLSignature.ALGO_ID_MAC_HMAC_SHA256,
                XMLSignature.ALGO_ID_MAC_HMAC_SHA384, XMLSignature.ALGO_ID_MAC_HMAC_SHA512,
                XMLSignature.ALGO_ID_MAC_HMAC_RIPEMD160, XMLSignature.ALGO_ID_MAC_HMAC_NOT_RECOMMENDED_MD5,
                XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA1, XMLSignature.ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5,
                XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1, XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA256,
                XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA384, XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA512,
                XMLSignature.ALGO_ID_SIGNATURE_RSA_RIPEMD160}, "Set the name of the signature encryption algorithm to use");
        form.appendComboBox("signatureCanonicalization", "Signature Canonicalization", new String[]{DEFAULT_OPTION,
                WSConstants.C14N_OMIT_COMMENTS, WSConstants.C14N_WITH_COMMENTS, WSConstants.C14N_EXCL_OMIT_COMMENTS,
                WSConstants.C14N_EXCL_WITH_COMMENTS}, "Set the canonicalization method to use.");

        form.appendComboBox("digestAlgorithm", "Digest Algorithm", new String[]{DEFAULT_OPTION,
                MessageDigestAlgorithm.ALGO_ID_DIGEST_NOT_RECOMMENDED_MD5, MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA1,
                MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA256, MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA384,
                MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA512, MessageDigestAlgorithm.ALGO_ID_DIGEST_RIPEMD160},
                "Set the digest algorithm to use");

        form.appendCheckBox("useSingleCert", "Use Single Certificate", "Use single certificate for signing");

        form.append("Parts", new WSPartsTable(parts, this));

        return new JScrollPane(form.getPanel());
    }
View Full Code Here

        super.init(config, container, TYPE);
    }

    @Override
    protected JComponent buildUI() {
        SimpleBindingForm form = new SimpleBindingForm(new PresentationModel<TimestampEntry>(this));
        form.addSpace(5);
        form.appendTextField("timeToLive", "Time To Live", "Sets the TimeToLive value for the Timestamp Token");
        form.appendCheckBox("strictTimestamp", "Millisecond Precision", "Sets precision of timestamp to milliseconds");

        return form.getPanel();
    }
View Full Code Here

        super.init(config, container, TYPE);
    }

    @Override
    protected JComponent buildUI() {
        SimpleBindingForm form = new SimpleBindingForm(new PresentationModel<SignatureEntry>(this));

        form.addSpace(5);
        wssContainerListener = new InternalWssContainerListener();
        getWssContainer().addWssContainerListener(wssContainerListener);

        KeystoresComboBoxModel keystoresComboBoxModel = new KeystoresComboBoxModel(getWssContainer(), getWssContainer()
                .getCryptoByName(crypto), true);
        form.appendComboBox("crypto", "Keystore", keystoresComboBoxModel,
                "Selects the Keystore containing the key to use for signing").addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                keyAliasComboBoxModel.update(getWssContainer().getCryptoByName(crypto));
            }
        });

        keyAliasComboBoxModel = new KeyAliasComboBoxModel(getWssContainer().getCryptoByName(crypto));
        form.appendComboBox("username", "Alias", keyAliasComboBoxModel, "The alias for the key to use for encryption");

        form.appendPasswordField("password", "Password",
                "The password for the key to use for encryption (if it is private)");

        form.appendComboBox("keyIdentifierType", "Key Identifier Type", new Integer[]{1, 2, 3, 4, 5, 6, 8},
                "Sets which key identifier to use").setRenderer(new KeyIdentifierTypeRenderer());

        (embeddedKeyNameTextField = form.appendTextField("embeddedKeyName", "Embedded Key Name",
                "The embedded key name")).setEnabled(keyIdentifierType == WSConstants.EMBEDDED_KEYNAME);
        (embeddedKeyNamePassword = form.appendPasswordField("embeddedKeyPassword", "Embedded Key Password",
                "The embedded key password")).setEnabled(keyIdentifierType == WSConstants.EMBEDDED_KEYNAME);

        form.appendComboBox("symmetricEncAlgorithm", "Symmetric Encoding Algorithm", new String[]{DEFAULT_OPTION,
                WSConstants.AES_128, WSConstants.AES_192, WSConstants.AES_256, WSConstants.TRIPLE_DES},
                "Set the name of the symmetric encryption algorithm to use");

        form.appendComboBox("encKeyTransport", "Key Encryption Algorithm", new String[]{DEFAULT_OPTION,
                WSConstants.KEYTRANSPORT_RSA15, WSConstants.KEYTRANSPORT_RSAOEP},
                "Sets the algorithm to encode the symmetric key");

        form.appendCheckBox("encryptSymmetricKey", "Create Encrypted Key",
                "Indicates whether to encrypt the symmetric key into an EncryptedKey or not");

        form.append("Parts", new WSPartsTable(parts, this));

        return new JScrollPane(form.getPanel());
    }
View Full Code Here

    @Override
    protected JComponent buildUI() {
        wssContainerListener = new InternalWssContainerListener();
        getWssContainer().addWssContainerListener(wssContainerListener);

        form = new SimpleBindingForm(new PresentationModel<SignatureEntry>(this));

        form.addSpace(5);

        form.appendComboBox("samlVersion", "SAML version", new String[]{SAML_VERSION_1, SAML_VERSION_2},
                "Choose the SAML version");
View Full Code Here

        token.build(doc, secHeader);
    }

    @Override
    protected JComponent buildUI() {
        SimpleBindingForm form = new SimpleBindingForm(new PresentationModel<UsernameEntry>(this));
        form.addSpace(5);
        form.appendTextField("username", "Username", "The username for this token");
        form.appendPasswordField("password", "Password", "The password for this token");

        form.appendCheckBox("addNonce", "Add Nonce", "Adds a nonce");
        form.appendCheckBox("addCreated", "Add Created", "Adds a created");

        form.appendComboBox("passwordType", "Password Type", new String[]{PASSWORD_TEXT, PASSWORD_DIGEST,
                PASSWORD_DIGEST_EXT}, "The password type to generate");

        return form.getPanel();
    }
View Full Code Here

        return toolbar;
    }

    protected Component buildQueryDetailComponent() {
        queryDetailFormPresentationModel = new PresentationModel<Query>(null);
        detailForm = new SimpleBindingForm(queryDetailFormPresentationModel);

        detailForm.setDefaultTextAreaRows(5);
        detailForm.setDefaultTextAreaColumns(50);

        detailForm.append(buildQueryToolbar());
View Full Code Here

    }

    private JComponent buildDetails() {
        paramDetailsModel = new PresentationModel<RestParamProperty>(null);
        detailsForm = new SimpleBindingForm(paramDetailsModel);

        detailsForm.addSpace(5);
        detailsForm.appendCheckBox("required", "Required", "Sets if parameter is required");

        List<QName> types = new ArrayList<QName>();
View Full Code Here

    }

    public JComponent getComponent() {
        if (mainPanel == null) {
            mainPanel = new JPanel(new BorderLayout());
            form = new SimpleBindingForm(new PresentationModel<AbstractHttpRequest<?>>(wsrmContainer.getWsrmConfig()));
            buildContent(form);
            mainPanel.add(new JScrollPane(form.getPanel()), BorderLayout.CENTER);
        }
        return mainPanel;
    }
View Full Code Here

    }

    public JComponent getComponent() {
        if (mainPanel == null) {
            mainPanel = new JPanel(new BorderLayout());
            form = new SimpleBindingForm(new PresentationModel<AbstractHttpRequest<?>>(wsaContainer.getWsaConfig()));
            buildContent(form);
            mainPanel.add(new JScrollPane(form.getPanel()), BorderLayout.CENTER);
        }
        return mainPanel;
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.support.components.SimpleBindingForm

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.