soapui-4.5.2

16:25:13.177 INFO  jd.cli.Main - Decompiling soapui-4.5.2.jar
package com.eviware.soapui.actions;

class AnnotatedSettingsPrefs$1 {}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.AnnotatedSettingsPrefs.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.soapui.SoapUI;
import com.eviware.soapui.model.settings.Settings;
import com.eviware.soapui.settings.Setting;
import com.eviware.soapui.support.components.DirectoryFormComponent;
import com.eviware.soapui.support.components.FileFormComponent;
import com.eviware.soapui.support.components.FileListFormComponent;
import com.eviware.soapui.support.components.SimpleForm;
import com.eviware.soapui.support.components.StringListFormComponent;
import com.eviware.soapui.support.types.StringToStringMap;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

public class AnnotatedSettingsPrefs
  implements Prefs
{
  private SimpleForm simpleForm;
  private Class<?> settingsClass;
  private final String title;
  
  public AnnotatedSettingsPrefs(Class<?> settingsClass, String title)
  {
    this.settingsClass = settingsClass;
    this.title = title;
  }
  
  public SimpleForm getForm()
  {
    if (simpleForm == null)
    {
      simpleForm = new SimpleForm();
      simpleForm.addSpace(5);
      
      buildForm(simpleForm);
      
      simpleForm.addSpace(5);
    }
    return simpleForm;
  }
  
  public List<Setting> getSettings()
  {
    ArrayList<Setting> settings = new ArrayList();
    for (Field field : settingsClass.getFields())
    {
      Setting annotation = (Setting)field.getAnnotation(Setting.class);
      if (annotation != null) {
        settings.add(annotation);
      }
    }
    return settings;
  }
  
  private void buildForm(SimpleForm form)
  {
    List<Setting> settings = getSettings();
    for (Setting annotation : settings) {
      switch (annotation.type())
      {
      case BOOLEAN: 
        form.appendCheckBox(annotation.name(), annotation.description(), false);
        break;
      case FILE: 
        form.append(annotation.name(), new FileFormComponent(annotation.description()));
        break;
      case FILELIST: 
        form.append(annotation.name(), new FileListFormComponent(annotation.description()));
        break;
      case STRINGLIST: 
        form.append(annotation.name(), new StringListFormComponent(annotation.description()));
        break;
      case FOLDER: 
        form.append(annotation.name(), new DirectoryFormComponent(annotation.description()));
        break;
      case ENUMERATION: 
        form.appendComboBox(annotation.name(), annotation.values(), annotation.description());
        break;
      case PASSWORD: 
        form.appendPasswordField(annotation.name(), annotation.description());
        break;
      default: 
        form.appendTextField(annotation.name(), annotation.description());
      }
    }
  }
  
  public StringToStringMap getValues(Settings settings)
  {
    StringToStringMap result = new StringToStringMap();
    for (Field field : settingsClass.getFields())
    {
      Setting annotation = (Setting)field.getAnnotation(Setting.class);
      if (annotation != null) {
        try
        {
          result.put(annotation.name(), settings.getString(field.get(null).toString(), annotation.defaultValue()));
        }
        catch (Exception e)
        {
          SoapUI.logError(e);
        }
      }
    }
    return result;
  }
  
  public void setFormValues(Settings settings)
  {
    getForm().setValues(getValues(settings));
  }
  
  public void getFormValues(Settings settings)
  {
    StringToStringMap values = new StringToStringMap();
    getForm().getValues(values);
    storeValues(values, settings);
  }
  
  public void storeValues(StringToStringMap values, Settings settings)
  {
    for (Field field : settingsClass.getFields())
    {
      Setting annotation = (Setting)field.getAnnotation(Setting.class);
      if (annotation != null) {
        try
        {
          settings.setString(field.get(null).toString(), (String)values.get(annotation.name()));
        }
        catch (IllegalArgumentException e)
        {
          SoapUI.logError(e);
        }
        catch (IllegalAccessException e)
        {
          SoapUI.logError(e);
        }
      }
    }
  }
  
  public String getTitle()
  {
    return title;
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.AnnotatedSettingsPrefs
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.soapui.SoapUI;
import com.eviware.soapui.impl.WorkspaceImpl;
import com.eviware.soapui.model.project.Project;
import com.eviware.soapui.support.UISupport;
import com.eviware.soapui.support.action.support.AbstractSoapUIAction;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class CloseOpenProjectsAction
  extends AbstractSoapUIAction<WorkspaceImpl>
{
  public static final String SOAPUI_ACTION_ID = "CloseOpenProjectsAction";
  
  public CloseOpenProjectsAction()
  {
    super("Close All Open Projects", "Closes all open projects in the current Workspace");
  }
  
  public void perform(WorkspaceImpl workspace, Object param)
  {
    List<Project> openProjects = new ArrayList();
    for (Project project : workspace.getProjectList()) {
      if (project.isOpen()) {
        openProjects.add(project);
      }
    }
    if (openProjects.isEmpty())
    {
      UISupport.showErrorMessage("No open projects in workspace");
      return;
    }
    Boolean coc = UISupport.confirmOrCancel("Save projects before closing?", getName());
    if (coc == null) {
      return;
    }
    for (Project project : openProjects) {
      try
      {
        if (coc.booleanValue()) {
          project.save();
        }
        workspace.closeProject(project);
      }
      catch (IOException e)
      {
        SoapUI.logError(e);
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.CloseOpenProjectsAction
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.soapui.support.UISupport;
import com.l2fprod.common.swing.JFontChooser;
import java.awt.Font;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JTextField;

class EditorPrefs$1
  extends AbstractAction
{
  EditorPrefs$1(EditorPrefs paramEditorPrefs, String x0)
  {
    super(x0);
  }
  
  public void actionPerformed(ActionEvent e)
  {
    Font font = JFontChooser.showDialog(UISupport.getMainFrame(), "Select XML Editor Font", Font.decode(EditorPrefs.access$000(this$0).getText()));
    if (font != null) {
      EditorPrefs.access$000(this$0).setText(EditorPrefs.encodeFont(font));
    }
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.EditorPrefs.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JCheckBox;

class EditorPrefs$2
  implements ActionListener
{
  EditorPrefs$2(EditorPrefs paramEditorPrefs) {}
  
  public void actionPerformed(ActionEvent e)
  {
    EditorPrefs.access$200(this$0).setEnabled(EditorPrefs.access$100(this$0).isSelected());
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.EditorPrefs.2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.soapui.model.settings.Settings;
import com.eviware.soapui.settings.UISettings;
import com.eviware.soapui.support.UISupport;
import com.eviware.soapui.support.components.SimpleForm;
import com.eviware.soapui.support.types.StringToStringMap;
import com.jgoodies.forms.builder.ButtonBarBuilder;
import com.l2fprod.common.swing.JFontChooser;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.AbstractAction;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JTextField;

public class EditorPrefs
  implements Prefs
{
  public static final String NO_RESIZE_REQUEST_EDITOR = "Disable auto-resize";
  public static final String START_WITH_REQUEST_TABS = "Tabbed request view";
  public static final String AUTO_VALIDATE_REQUEST = "Validate Requests";
  public static final String ABORT_ON_INVALID_REQUEST = "Abort on invalid";
  public static final String AUTO_VALIDATE_RESPONSE = "Validate Responses";
  public static final String XML_LINE_NUMBERS = "XML Line Numbers";
  public static final String GROOVY_LINE_NUMBERS = "Groovy Line Numbers";
  private JTextField editorFontTextField;
  private SimpleForm editorForm;
  private final String title;
  private JCheckBox abortCheckBox;
  private JCheckBox autoValidateCheckBox;
  
  public EditorPrefs(String title)
  {
    this.title = title;
  }
  
  public String getTitle()
  {
    return title;
  }
  
  public SimpleForm getForm()
  {
    if (editorForm == null)
    {
      ButtonBarBuilder builder = new ButtonBarBuilder();
      editorFontTextField = new JTextField(20);
      editorFontTextField.setEnabled(false);
      builder.addFixed(editorFontTextField);
      builder.addRelatedGap();
      builder.addFixed(new JButton(new AbstractAction("Select Font..")
      {
        public void actionPerformed(ActionEvent e)
        {
          Font font = JFontChooser.showDialog(UISupport.getMainFrame(), "Select XML Editor Font", Font.decode(editorFontTextField.getText()));
          if (font != null) {
            editorFontTextField.setText(EditorPrefs.encodeFont(font));
          }
        }
      }));
      editorForm = new SimpleForm();
      editorForm.addSpace(5);
      editorForm.append("Editor Font", builder.getPanel());
      editorForm.appendSeparator();
      editorForm.appendCheckBox("XML Line Numbers", "Show line numbers in XML editors by default", true);
      editorForm.appendCheckBox("Groovy Line Numbers", "Show line numbers in Groovy editors by default", true);
      editorForm.appendSeparator();
      editorForm.appendCheckBox("Disable auto-resize", "Disables automatic resizing of Request editors", true);
      editorForm.appendCheckBox("Tabbed request view", "Defaults the Request editor to the tabbed layout", true);
      editorForm.appendSeparator();
      
      autoValidateCheckBox = editorForm.appendCheckBox("Validate Requests", "Always validate request messages before they are sent", true);
      
      abortCheckBox = editorForm.appendCheckBox("Abort on invalid", "Abort invalid requests", true);
      editorForm.appendCheckBox("Validate Responses", "Always validate response messages", true);
      
      autoValidateCheckBox.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent e)
        {
          abortCheckBox.setEnabled(autoValidateCheckBox.isSelected());
        }
      });
    }
    return editorForm;
  }
  
  public void getFormValues(Settings settings)
  {
    StringToStringMap values = new StringToStringMap();
    editorForm.getValues(values);
    storeValues(values, settings);
  }
  
  public void storeValues(StringToStringMap values, Settings settings)
  {
    if (editorFontTextField != null) {
      settings.setString(UISettings.EDITOR_FONT, editorFontTextField.getText());
    }
    settings.setBoolean(UISettings.NO_RESIZE_REQUEST_EDITOR, values.getBoolean("Disable auto-resize"));
    settings.setBoolean(UISettings.START_WITH_REQUEST_TABS, values.getBoolean("Tabbed request view"));
    settings.setBoolean(UISettings.AUTO_VALIDATE_REQUEST, values.getBoolean("Validate Requests"));
    settings.setBoolean(UISettings.ABORT_ON_INVALID_REQUEST, values.getBoolean("Abort on invalid"));
    settings.setBoolean(UISettings.AUTO_VALIDATE_RESPONSE, values.getBoolean("Validate Responses"));
    settings.setBoolean(UISettings.SHOW_XML_LINE_NUMBERS, values.getBoolean("XML Line Numbers"));
    settings.setBoolean(UISettings.SHOW_GROOVY_LINE_NUMBERS, values.getBoolean("Groovy Line Numbers"));
  }
  
  public static String encodeFont(Font font)
  {
    String editorFont = font.getFontName() + " ";
    if (font.isBold()) {
      editorFont = editorFont + "bold ";
    }
    if (font.isItalic()) {
      editorFont = editorFont + "italic ";
    }
    editorFont = editorFont + font.getSize();
    
    return editorFont;
  }
  
  public void setFormValues(Settings settings)
  {
    editorFontTextField.setText(encodeFont(UISupport.getEditorFont()));
    editorForm.setValues(getValues(settings));
    
    abortCheckBox.setEnabled(settings.getBoolean(UISettings.AUTO_VALIDATE_REQUEST));
  }
  
  public StringToStringMap getValues(Settings settings)
  {
    StringToStringMap values = new StringToStringMap();
    values.put("Disable auto-resize", settings.getBoolean(UISettings.NO_RESIZE_REQUEST_EDITOR));
    values.put("Tabbed request view", settings.getBoolean(UISettings.START_WITH_REQUEST_TABS));
    values.put("Validate Requests", settings.getBoolean(UISettings.AUTO_VALIDATE_REQUEST));
    values.put("Abort on invalid", settings.getBoolean(UISettings.ABORT_ON_INVALID_REQUEST));
    values.put("Validate Responses", settings.getBoolean(UISettings.AUTO_VALIDATE_RESPONSE));
    values.put("XML Line Numbers", settings.getBoolean(UISettings.SHOW_XML_LINE_NUMBERS));
    values.put("Groovy Line Numbers", settings.getBoolean(UISettings.SHOW_GROOVY_LINE_NUMBERS));
    
    return values;
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.EditorPrefs
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.soapui.impl.wsdl.WsdlProject;
import com.eviware.soapui.integration.exporter.ProjectExporter;
import com.eviware.soapui.support.UISupport;
import com.eviware.soapui.support.action.support.AbstractSoapUIAction;
import com.eviware.x.dialogs.XFileDialogs;
import java.io.File;

public class ExportProjectAction
  extends AbstractSoapUIAction<WsdlProject>
{
  public ExportProjectAction()
  {
    super("Export Project", "Export Project");
  }
  
  public void perform(WsdlProject project, Object param)
  {
    ProjectExporter exporter = new ProjectExporter(project);
    try
    {
      String path = project.getPath();
      if (path == null)
      {
        project.save();
      }
      else
      {
        File file = UISupport.getFileDialogs().saveAs(this, "Select file to export project", "zip", "zip", new File(System.getProperty("user.home")));
        if (file == null) {
          return;
        }
        String fileName = file.getAbsolutePath();
        if (fileName == null) {
          return;
        }
        exporter.exportProject(fileName);
      }
    }
    catch (Exception e1)
    {
      UISupport.showErrorMessage("Failed to export project; " + e1);
    }
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.ExportProjectAction
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.soapui.impl.wsdl.panels.teststeps.support.PropertyHolderTable;
import com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils;
import com.eviware.soapui.model.settings.Settings;
import com.eviware.soapui.settings.GlobalPropertySettings;
import com.eviware.soapui.support.components.SimpleForm;
import com.eviware.soapui.support.types.StringToStringMap;
import java.awt.Dimension;

public class GlobalPropertiesPrefs
  implements Prefs
{
  public static final String ENABLE_OVERRIDE = "Enable Override";
  private SimpleForm globalPropertiesForm;
  
  public SimpleForm getForm()
  {
    if (globalPropertiesForm == null)
    {
      globalPropertiesForm = new SimpleForm();
      
      PropertyHolderTable propertyHolderTable = new PropertyHolderTable(PropertyExpansionUtils.getGlobalProperties());
      
      propertyHolderTable.setPreferredSize(new Dimension(200, 300));
      globalPropertiesForm.addComponent(propertyHolderTable);
      globalPropertiesForm.addSpace();
      globalPropertiesForm.appendCheckBox("Enable Override", "Enables overriding of any property-reference with global properties", false);
    }
    return globalPropertiesForm;
  }
  
  public void getFormValues(Settings settings)
  {
    StringToStringMap values = new StringToStringMap();
    globalPropertiesForm.getValues(values);
    storeValues(values, settings);
  }
  
  public String getTitle()
  {
    return "Global Properties";
  }
  
  public StringToStringMap getValues(Settings settings)
  {
    StringToStringMap values = new StringToStringMap();
    values.put("Enable Override", settings.getBoolean(GlobalPropertySettings.ENABLE_OVERRIDE));
    return values;
  }
  
  public void setFormValues(Settings settings)
  {
    globalPropertiesForm.setValues(getValues(settings));
  }
  
  public void storeValues(StringToStringMap values, Settings settings)
  {
    settings.setBoolean(GlobalPropertySettings.ENABLE_OVERRIDE, values.getBoolean("Enable Override"));
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.GlobalPropertiesPrefs
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.soapui.model.settings.Settings;
import com.eviware.soapui.settings.HttpSettings;
import com.eviware.soapui.support.components.SimpleForm;
import com.eviware.soapui.support.types.StringToStringMap;
import java.util.TreeMap;

public class HttpPrefs
  implements Prefs
{
  public static final String AUTHENTICATE_PREEMPTIVELY = "Authenticate Preemptively";
  public static final String EXPECT_CONTINUE = "Expect Continue";
  public static final String INCLUDE_REQUEST_IN_TIME_TAKEN = "Include request in time taken";
  public static final String INCLUDE_RESPONSE_IN_TIME_TAKEN = "Include response in time taken";
  public static final String REQUEST_COMPRESSION = "Request compression";
  public static final String RESPONSE_COMPRESSION = "Response compression";
  public static final String CLOSE_CONNECTIONS_AFTER_REQUEST = "Close connections after request";
  public static final String USER_AGENT_HEADER = "User-Agent Header";
  public static final String SOCKET_TIMEOUT = "Socket Timeout";
  public static final String MAX_RESPONSE_SIZE = "Max response size";
  public static final String ENCODED_URLS = "Pre-encoded Endpoints";
  public static final String MAX_CONNECTIONS_PER_HOST = "Max Connections Per Host";
  public static final String MAX_TOTAL_CONNECTIONS = "Max Total Connections";
  public static final String BIND_ADDRESS = "Bind Address";
  public static final String LEAVE_MOCKENGINE = "Leave MockEngine";
  public static final String CHUNKING_THRESHOLD = "Chunking Threshold";
  public static final String HTTP_VERSION = "HTTP Version";
  public static final String ENABLE_MOCK_WIRE_LOG = "Enable Mock HTTP Log";
  public static final String DISABLE_RESPONSE_DECOMPRESSION = "Disable Response Decompression";
  public static final String FORWARD_SLASHES = "Normalize Forward Slashes";
  private static TreeMap<String, String> compressionAlgs = new TreeMap();
  private SimpleForm httpForm;
  private final String title;
  
  static
  {
    compressionAlgs.put("None", "None");
    compressionAlgs.put("gzip", "GZIP");
    compressionAlgs.put("deflate", "DEFLATE");
  }
  
  public HttpPrefs(String title)
  {
    this.title = title;
  }
  
  public SimpleForm getForm()
  {
    if (httpForm == null)
    {
      httpForm = new SimpleForm();
      httpForm.addSpace(5);
      httpForm.appendComboBox("HTTP Version", new String[] { "1.1", "1.0" }, "Select HTTP Version to use");
      
      httpForm.appendTextField("User-Agent Header", "User-Agent HTTP header to send, blank will send default");
      
      httpForm.appendComboBox("Request compression", compressionAlgs);
      httpForm.appendCheckBox("Response compression", "Accept compressed responses from hosts", true);
      httpForm.appendCheckBox("Disable Response Decompression", "Disable decompression of compressed responses", true);
      
      httpForm.appendCheckBox("Close connections after request", "Closes the HTTP connection after each HTTP request", true);
      
      httpForm.appendTextField("Chunking Threshold", "Uses content-chunking for requests larger than threshold, blank to disable");
      
      httpForm.appendCheckBox("Authenticate Preemptively", "Adds authentication information to outgoing request", true);
      
      httpForm.appendCheckBox("Expect Continue", "Activates 'Expect: 100-Continue' handshake for the entity enclosing methods", true);
      
      httpForm.appendCheckBox("Pre-encoded Endpoints", "Do not URL-escape service endpoints", true);
      httpForm.appendCheckBox("Normalize Forward Slashes", "Replaces duplicate forward slashes in HTTP request endpoints with a single slash", false);
      
      httpForm.appendTextField("Bind Address", "Default local address to bind to when sending requests");
      httpForm.appendSeparator();
      httpForm.appendCheckBox("Include request in time taken", "Includes the time it took to write the request in time-taken", true);
      
      httpForm.appendCheckBox("Include response in time taken", "Includes the time it took to read the entire response in time-taken", true);
      
      httpForm.appendTextField("Socket Timeout", "Socket timeout in milliseconds");
      httpForm.appendTextField("Max response size", "Maximum size to read from response (0 = no limit)");
      httpForm.appendTextField("Max Connections Per Host", "Maximum number of Connections Per Host");
      httpForm.appendTextField("Max Total Connections", "Maximum number of Total Connections");
      httpForm.appendSeparator();
      httpForm.appendCheckBox("Leave MockEngine", "Leave MockEngine running when stopping MockServices", false);
      
      httpForm.appendCheckBox("Enable Mock HTTP Log", "Logs wire content of all mock requests", false);
      httpForm.addSpace(5);
    }
    return httpForm;
  }
  
  public void getFormValues(Settings settings)
  {
    StringToStringMap httpValues = new StringToStringMap();
    httpForm.getValues(httpValues);
    storeValues(httpValues, settings);
  }
  
  public void storeValues(StringToStringMap httpValues, Settings settings)
  {
    settings.setString(HttpSettings.HTTP_VERSION, (String)httpValues.get("HTTP Version"));
    
    settings.setString(HttpSettings.CHUNKING_THRESHOLD, (String)httpValues.get("Chunking Threshold"));
    settings.setString(HttpSettings.USER_AGENT, (String)httpValues.get("User-Agent Header"));
    settings.setString(HttpSettings.REQUEST_COMPRESSION, (String)httpValues.get("Request compression"));
    settings.setString(HttpSettings.RESPONSE_COMPRESSION, (String)httpValues.get("Response compression"));
    settings.setString(HttpSettings.EXPECT_CONTINUE, (String)httpValues.get("Expect Continue"));
    settings.setString(HttpSettings.DISABLE_RESPONSE_DECOMPRESSION, (String)httpValues.get("Disable Response Decompression"));
    
    settings.setString(HttpSettings.CLOSE_CONNECTIONS, (String)httpValues.get("Close connections after request"));
    settings.setString(HttpSettings.AUTHENTICATE_PREEMPTIVELY, (String)httpValues.get("Authenticate Preemptively"));
    settings.setString(HttpSettings.SOCKET_TIMEOUT, (String)httpValues.get("Socket Timeout"));
    settings.setString(HttpSettings.ENCODED_URLS, (String)httpValues.get("Pre-encoded Endpoints"));
    settings.setString(HttpSettings.FORWARD_SLASHES, (String)httpValues.get("Normalize Forward Slashes"));
    settings.setString(HttpSettings.MAX_RESPONSE_SIZE, (String)httpValues.get("Max response size"));
    settings.setString(HttpSettings.INCLUDE_REQUEST_IN_TIME_TAKEN, (String)httpValues.get("Include request in time taken"));
    settings.setString(HttpSettings.INCLUDE_RESPONSE_IN_TIME_TAKEN, (String)httpValues.get("Include response in time taken"));
    
    settings.setString(HttpSettings.MAX_CONNECTIONS_PER_HOST, (String)httpValues.get("Max Connections Per Host"));
    settings.setString(HttpSettings.MAX_TOTAL_CONNECTIONS, (String)httpValues.get("Max Total Connections"));
    settings.setString(HttpSettings.BIND_ADDRESS, (String)httpValues.get("Bind Address"));
    settings.setString(HttpSettings.LEAVE_MOCKENGINE, (String)httpValues.get("Leave MockEngine"));
    settings.setString(HttpSettings.ENABLE_MOCK_WIRE_LOG, (String)httpValues.get("Enable Mock HTTP Log"));
  }
  
  public void setFormValues(Settings settings)
  {
    getForm().setValues(getValues(settings));
  }
  
  public StringToStringMap getValues(Settings settings)
  {
    StringToStringMap httpValues = new StringToStringMap();
    httpValues.put("HTTP Version", settings.getString(HttpSettings.HTTP_VERSION, "1.1"));
    
    httpValues.put("Chunking Threshold", settings.getString(HttpSettings.CHUNKING_THRESHOLD, null));
    httpValues.put("User-Agent Header", settings.getString(HttpSettings.USER_AGENT, null));
    httpValues.put("Request compression", compressionAlgs.get(settings.getString(HttpSettings.REQUEST_COMPRESSION, "None")));
    
    httpValues.put("Response compression", settings.getString(HttpSettings.RESPONSE_COMPRESSION, null));
    httpValues.put("Disable Response Decompression", settings.getString(HttpSettings.DISABLE_RESPONSE_DECOMPRESSION, null));
    
    httpValues.put("Expect Continue", settings.getString(HttpSettings.EXPECT_CONTINUE, null));
    httpValues.put("Close connections after request", settings.getString(HttpSettings.CLOSE_CONNECTIONS, null));
    httpValues.put("Authenticate Preemptively", settings.getString(HttpSettings.AUTHENTICATE_PREEMPTIVELY, null));
    httpValues.put("Include request in time taken", settings.getString(HttpSettings.INCLUDE_REQUEST_IN_TIME_TAKEN, null));
    
    httpValues.put("Include response in time taken", settings.getString(HttpSettings.INCLUDE_RESPONSE_IN_TIME_TAKEN, null));
    
    httpValues.put("Socket Timeout", settings.getString(HttpSettings.SOCKET_TIMEOUT, null));
    httpValues.put("Pre-encoded Endpoints", settings.getString(HttpSettings.ENCODED_URLS, null));
    httpValues.put("Max response size", settings.getString(HttpSettings.MAX_RESPONSE_SIZE, "0"));
    httpValues.put("Max Connections Per Host", settings.getString(HttpSettings.MAX_CONNECTIONS_PER_HOST, "500"));
    httpValues.put("Max Total Connections", settings.getString(HttpSettings.MAX_TOTAL_CONNECTIONS, "2000"));
    httpValues.put("Bind Address", settings.getString(HttpSettings.BIND_ADDRESS, ""));
    httpValues.put("Normalize Forward Slashes", settings.getString(HttpSettings.FORWARD_SLASHES, ""));
    httpValues.put("Leave MockEngine", settings.getString(HttpSettings.LEAVE_MOCKENGINE, null));
    httpValues.put("Enable Mock HTTP Log", settings.getString(HttpSettings.ENABLE_MOCK_WIRE_LOG, null));
    return httpValues;
  }
  
  public String getTitle()
  {
    return title;
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.HttpPrefs
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.soapui.impl.WorkspaceImpl;
import com.eviware.soapui.impl.actions.ImportWsdlProjectAction;
import com.eviware.soapui.integration.exporter.ProjectExporter;
import com.eviware.soapui.support.UISupport;
import com.eviware.soapui.support.action.support.AbstractSoapUIAction;
import com.eviware.x.dialogs.XFileDialogs;
import java.io.File;
import java.util.List;

public class ImportPackedProject
  extends AbstractSoapUIAction<WorkspaceImpl>
{
  public ImportPackedProject()
  {
    super("Import Packed Project", "Import Packed Project");
  }
  
  public void perform(WorkspaceImpl workspace, Object param)
  {
    try
    {
      File target = UISupport.getFileDialogs().open(this, "Select file to unpack project", "zip", "zip", System.getProperty("user.home"));
      if (target == null) {
        return;
      }
      String fileName = target.getAbsolutePath();
      if (fileName == null) {
        return;
      }
      File dest = UISupport.getFileDialogs().saveAsDirectory(this, "Select where to unpack it", new File(System.getProperty("user.home")));
      if (dest.getAbsoluteFile() == null) {
        return;
      }
      ProjectExporter.unpackageAll(fileName, dest.getAbsolutePath());
      List<String> contents = ProjectExporter.getZipContents(fileName);
      for (String fName : dest.list()) {
        if ((contents.contains(fName)) && (fName.endsWith("-soapui-project.xml")))
        {
          new ImportWsdlProjectAction().perform(workspace, new File(dest, fName).getAbsoluteFile());
          break;
        }
      }
    }
    catch (Exception e1)
    {
      UISupport.showErrorMessage("Failed to export project; " + e1);
    }
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.ImportPackedProject
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.soapui.model.settings.Settings;
import com.eviware.soapui.settings.LoadUISettings;
import com.eviware.soapui.support.components.DirectoryFormComponent;
import com.eviware.soapui.support.components.SimpleForm;
import com.eviware.soapui.support.types.StringToStringMap;
import java.io.File;

public class LoadUIPrefs
  implements Prefs
{
  public static final String LOADUI_PATH = "loadUI.bat(.sh) folder";
  public static final String LOADUI_CAJO_PORT = "loadUI integration port";
  public static final String SOAPUI_CAJO_PORT = "soapUI integration port";
  private final String title;
  private SimpleForm editorForm;
  
  public LoadUIPrefs(String title)
  {
    this.title = title;
  }
  
  public SimpleForm getForm()
  {
    if (editorForm == null)
    {
      editorForm = new SimpleForm();
      editorForm.addSpace(5);
      DirectoryFormComponent directoryFormComponent = new DirectoryFormComponent("Folder containing loadUI.bat(.sh) ");
      
      directoryFormComponent.setInitialFolder(System.getProperty("soapui.home") + File.separator + ".." + File.separator + "..");
      
      editorForm.append("loadUI.bat(.sh) folder", directoryFormComponent);
      editorForm.appendTextField("loadUI integration port", "Client port for loadUI integration");
      editorForm.appendTextField("soapUI integration port", "Server port of soapUI integration (change requires restart of soapUI)");
    }
    return editorForm;
  }
  
  public void getFormValues(Settings settings)
  {
    StringToStringMap values = new StringToStringMap();
    editorForm.getValues(values);
    storeValues(values, settings);
  }
  
  public String getTitle()
  {
    return title;
  }
  
  public StringToStringMap getValues(Settings settings)
  {
    StringToStringMap values = new StringToStringMap();
    values.put("loadUI.bat(.sh) folder", settings.getString(LoadUISettings.LOADUI_PATH, ""));
    values.put("loadUI integration port", settings.getString(LoadUISettings.LOADUI_CAJO_PORT, "1199"));
    values.put("soapUI integration port", settings.getString(LoadUISettings.SOAPUI_CAJO_PORT, "1198"));
    return values;
  }
  
  public void setFormValues(Settings settings)
  {
    editorForm.setValues(getValues(settings));
  }
  
  public void storeValues(StringToStringMap values, Settings settings)
  {
    settings.setString(LoadUISettings.LOADUI_PATH, (String)values.get("loadUI.bat(.sh) folder"));
    settings.setString(LoadUISettings.LOADUI_CAJO_PORT, (String)values.get("loadUI integration port"));
    settings.setString(LoadUISettings.SOAPUI_CAJO_PORT, (String)values.get("soapUI integration port"));
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.LoadUIPrefs
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.x.form.XFormDialog;
import com.eviware.x.form.XFormField;
import com.eviware.x.form.XFormFieldListener;

class MockAsWarAction$1
  implements XFormFieldListener
{
  MockAsWarAction$1(MockAsWarAction paramMockAsWarAction) {}
  
  public void valueChanged(XFormField sourceField, String newValue, String oldValue)
  {
    MockAsWarAction.access$000(this$0).getFormField("Settings").setEnabled(Boolean.valueOf(newValue).booleanValue());
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.MockAsWarAction.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.x.form.support.AField;
import com.eviware.x.form.support.AField.AFieldType;
import com.eviware.x.form.support.AForm;

@AForm(description="Configure what to include in generated WAR", name="Deploy Project as WAR", helpUrl="http://www.soapui.org/userguide/mock/mock_as_war.html")
public abstract interface MockAsWarAction$MockAsWarDialog
{
  @AField(description="Specify if global settings should be included", name="Include Global Settings", type=AField.AFieldType.BOOLEAN)
  public static final String GLOBAL_SETTINGS = "Include Global Settings";
  @AField(description="Specify Settings File", name="Settings", type=AField.AFieldType.FILE)
  public static final String SETTINGS_FILE = "Settings";
  @AField(description="Specify if action extensions should be included", name="Include Actions", type=AField.AFieldType.BOOLEAN)
  public static final String ACTIONS = "Include Actions";
  @AField(description="Specify if listener extensions should be included", name="Include Listeners", type=AField.AFieldType.BOOLEAN)
  public static final String LISTENERS = "Include Listeners";
  @AField(description="Include jar files from ext folder", name="Include External Jar Files", type=AField.AFieldType.BOOLEAN)
  public static final String EXT_LIBS = "Include External Jar Files";
  @AField(description="Check to enable WebUI", name="WebUI", type=AField.AFieldType.BOOLEAN)
  public static final String ENABLE_WEBUI = "WebUI";
  @AField(description="Local endpoint that will be used for WSDL endpoints/includes/imports", name="MockService Endpoint", type=AField.AFieldType.STRING)
  public static final String MOCKSERVICE_ENDPOINT = "MockService Endpoint";
  @AField(description="Specify name of target War File", name="War File", type=AField.AFieldType.FILE)
  public static final String WAR_FILE = "War File";
  @AField(description="Specify a directory where War file structure will be created", name="War Directory", type=AField.AFieldType.FOLDER)
  public static final String WAR_DIRECTORY = "War Directory";
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.MockAsWarAction.MockAsWarDialog
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.soapui.DefaultSoapUICore;
import com.eviware.soapui.SoapUI;
import com.eviware.soapui.impl.settings.XmlBeansSettingsImpl;
import com.eviware.soapui.impl.wsdl.WsdlProject;
import com.eviware.soapui.settings.ProjectSettings;
import com.eviware.soapui.support.UISupport;
import com.eviware.soapui.support.action.support.AbstractSoapUIAction;
import com.eviware.soapui.tools.MockAsWar;
import com.eviware.x.form.XFormDialog;
import com.eviware.x.form.XFormField;
import com.eviware.x.form.XFormFieldListener;
import com.eviware.x.form.support.ADialogBuilder;
import com.eviware.x.form.support.AField;
import com.eviware.x.form.support.AField.AFieldType;
import com.eviware.x.form.support.AForm;
import com.eviware.x.form.validators.RequiredValidator;
import java.io.IOException;
import org.apache.log4j.Logger;

public class MockAsWarAction
  extends AbstractSoapUIAction<WsdlProject>
{
  private XFormDialog dialog;
  private Logger log = Logger.getLogger(MockAsWarAction.class);
  
  public MockAsWarAction()
  {
    super("Deploy As War", "Deploys Project MockServices as a WAR file");
  }
  
  public void perform(WsdlProject project, Object param)
  {
    if (project.getMockServiceCount() == 0)
    {
      UISupport.showErrorMessage("Project does not have any MockServices to deploy");
      return;
    }
    if (dialog == null)
    {
      dialog = ADialogBuilder.buildDialog(MockAsWarDialog.class);
      dialog.getFormField("Include Global Settings").addFormFieldListener(new XFormFieldListener()
      {
        public void valueChanged(XFormField sourceField, String newValue, String oldValue)
        {
          dialog.getFormField("Settings").setEnabled(Boolean.valueOf(newValue).booleanValue());
        }
      });
      dialog.getFormField("War Directory").addFormFieldValidator(new RequiredValidator("WAR Directory is required"));
    }
    XFormField settingFile = dialog.getFormField("Settings");
    settingFile.setValue(((DefaultSoapUICore)SoapUI.getSoapUICore()).getSettingsFile());
    settingFile.setEnabled(dialog.getBooleanValue("Include Global Settings"));
    
    XFormField warDirectory = dialog.getFormField("War Directory");
    XFormField warFile = dialog.getFormField("War File");
    
    String passwordForEncryption = project.getSettings().getString(ProjectSettings.SHADOW_PASSWORD, null);
    project.getSettings().setString(ProjectSettings.SHADOW_PASSWORD, null);
    if (dialog.show())
    {
      project.beforeSave();
      try
      {
        project.save();
      }
      catch (IOException e)
      {
        log.error(e.getMessage(), e);
      }
      finally
      {
        project.getSettings().setString(ProjectSettings.SHADOW_PASSWORD, passwordForEncryption);
      }
      MockAsWar mockAsWar = new MockAsWar(project.getPath(), dialog.getBooleanValue("Include Global Settings") ? settingFile.getValue() : "", warDirectory.getValue(), warFile.getValue(), dialog.getBooleanValue("Include External Jar Files"), dialog.getBooleanValue("Include Actions"), dialog.getBooleanValue("Include Listeners"), dialog.getValue("MockService Endpoint"), dialog.getBooleanValue("WebUI"));
      
      mockAsWar.createMockAsWarArchive();
    }
  }
  
  @AForm(description="Configure what to include in generated WAR", name="Deploy Project as WAR", helpUrl="http://www.soapui.org/userguide/mock/mock_as_war.html")
  protected static abstract interface MockAsWarDialog
  {
    @AField(description="Specify if global settings should be included", name="Include Global Settings", type=AField.AFieldType.BOOLEAN)
    public static final String GLOBAL_SETTINGS = "Include Global Settings";
    @AField(description="Specify Settings File", name="Settings", type=AField.AFieldType.FILE)
    public static final String SETTINGS_FILE = "Settings";
    @AField(description="Specify if action extensions should be included", name="Include Actions", type=AField.AFieldType.BOOLEAN)
    public static final String ACTIONS = "Include Actions";
    @AField(description="Specify if listener extensions should be included", name="Include Listeners", type=AField.AFieldType.BOOLEAN)
    public static final String LISTENERS = "Include Listeners";
    @AField(description="Include jar files from ext folder", name="Include External Jar Files", type=AField.AFieldType.BOOLEAN)
    public static final String EXT_LIBS = "Include External Jar Files";
    @AField(description="Check to enable WebUI", name="WebUI", type=AField.AFieldType.BOOLEAN)
    public static final String ENABLE_WEBUI = "WebUI";
    @AField(description="Local endpoint that will be used for WSDL endpoints/includes/imports", name="MockService Endpoint", type=AField.AFieldType.STRING)
    public static final String MOCKSERVICE_ENDPOINT = "MockService Endpoint";
    @AField(description="Specify name of target War File", name="War File", type=AField.AFieldType.FILE)
    public static final String WAR_FILE = "War File";
    @AField(description="Specify a directory where War file structure will be created", name="War Directory", type=AField.AFieldType.FOLDER)
    public static final String WAR_DIRECTORY = "War Directory";
  }
}

/* Location:
 * Qualified Name:     com.eviware.soapui.actions.MockAsWarAction
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.eviware.soapui.actions;

import com.eviware.soa
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd