com.eviware.soapui.security.scan
Class AbstractSecurityScan

java.lang.Object
  extended by com.eviware.soapui.model.support.AbstractModelItem
      extended by com.eviware.soapui.model.support.AbstractAnimatableModelItem<com.eviware.soapui.config.ModelItemConfig>
          extended by com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem<com.eviware.soapui.config.SecurityScanConfig>
              extended by com.eviware.soapui.security.scan.AbstractSecurityScan
All Implemented Interfaces:
ModelItem, SecurityScan, Assertable, ResponseAssertion, PropertyChangeNotifier
Direct Known Subclasses:
AbstractSecurityScanWithProperties, MaliciousAttachmentSecurityScan

public abstract class AbstractSecurityScan
extends AbstractWsdlModelItem<com.eviware.soapui.config.SecurityScanConfig>
implements ResponseAssertion, SecurityScan

Implementation that is common for all security scans. Support for security workflow.

Author:
robert

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.eviware.soapui.model.testsuite.Assertable
Assertable.AssertionStatus
 
Field Summary
protected  AssertionsSupport assertionsSupport
           
 
Fields inherited from interface com.eviware.soapui.model.security.SecurityScan
SECURITY_CHECK_RESPONSE_RESULT, SECURITY_SCAN_REQUEST_RESULT, STATUS_PROPERTY
 
Fields inherited from interface com.eviware.soapui.model.ModelItem
DESCRIPTION_PROPERTY, ICON_PROPERTY, LABEL_PROPERTY, NAME_PROPERTY
 
Constructor Summary
AbstractSecurityScan(TestStep testStep, com.eviware.soapui.config.SecurityScanConfig config, ModelItem parent, java.lang.String icon)
           
 
Method Summary
 TestAssertion addAssertion(java.lang.String label)
           
 void addAssertionsListener(AssertionsListener listener)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addWsdlAssertion(java.lang.String assertionLabel)
           
 Assertable.AssertionStatus assertResponse(MessageExchange messageExchange, SubmitContext context)
           
protected  void clear()
           
 TestAssertion cloneAssertion(TestAssertion source, java.lang.String name)
           
 void copyConfig(com.eviware.soapui.config.SecurityScanConfig config)
           
protected abstract  void execute(SecurityTestRunner runner, TestStep testStep, SecurityTestRunContext context)
          should be implemented in every particular scan it executes one request, modified by securityScan if necessary and internally adds messages for logging to SecurityScanRequestResult
 javax.swing.JComponent getAdvancedSettingsPanel()
          Overide if SecurityScan needs advanced settings
 java.lang.String getAssertableContent()
           
 TestAssertionRegistry.AssertableType getAssertableType()
           
 WsdlMessageAssertion getAssertionAt(int c)
           
 TestAssertion getAssertionByName(java.lang.String name)
           
 int getAssertionCount()
           
 java.util.List<TestAssertion> getAssertionList()
           
 java.util.Map<java.lang.String,TestAssertion> getAssertions()
           
 AssertionsSupport getAssertionsSupport()
           
 Assertable.AssertionStatus getAssertionStatus()
           
 javax.swing.JComponent getComponent()
          Overide if SecurityScan have Optional component
abstract  java.lang.String getConfigDescription()
           
abstract  java.lang.String getConfigName()
           
 java.lang.String getDefaultAssertableContent()
           
 ExecutionStrategyHolder getExecutionStrategy()
           
abstract  java.lang.String getHelpURL()
           
 Interface getInterface()
           
 ModelItem getModelItem()
           
protected  TestRequest getOriginalResult(SecurityTestRunnerImpl securityRunner, TestStep testStep)
           
protected  TestRequest getRequest(TestStep testStep)
           
protected  SecurityScanRequestResult getSecurityScanRequestResult()
           
 SecurityScanResult getSecurityScanResult()
           
 SecurityResult.ResultStatus getSecurityStatus()
           
 TestStep getTestStep()
           
abstract  java.lang.String getType()
          The type of this check
protected abstract  boolean hasNext(TestStep testStep2, SecurityTestRunContext context)
          checks if specific SecurityScan still has modifications left
protected  void initAssertions()
           
 boolean isApplyForFailedStep()
           
 boolean isConfigurable()
           
 boolean isDisabled()
          Checks if the test is disabled
 boolean isRunOnlyOnce()
           
static boolean isSecurable(TestStep testStep)
           
 boolean isSkipFurtherRunning()
           
 TestAssertion moveAssertion(int ix, int offset)
           
 void release()
           
 void removeAssertion(TestAssertion assertion)
           
 void removeAssertionsListener(AssertionsListener listener)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
protected  void reportSecurityScanException(java.lang.String message)
           
 SecurityScanResult run(TestStep testStep, SecurityTestRunContext context, SecurityTestRunner securityTestRunner)
           
 void setApplyForFailedTestStep(boolean apply)
           
 void setDisabled(boolean disabled)
          Disables or Enables the check
 void setExecutionStrategy(ExecutionStrategyHolder executionStrategy)
           
 void setRunOnlyOnce(boolean runOnlyOnce)
           
protected  void setSecurityScanRequestResult(SecurityScanRequestResult securityScanRequestResult)
           
 void setSkipFurtherRunning(boolean skipFurtherRunning)
           
 void setTestStep(TestStep step)
           
 void updateSecurityConfig(com.eviware.soapui.config.SecurityScanConfig config)
           
 
Methods inherited from class com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem
addExternalDependencies, afterLoad, beforeSave, dependsOn, getConfig, getDescription, getExternalDependencies, getIcon, getId, getName, getParent, getSettings, getWsdlModelItemByName, resolve, setConfig, setDescription, setIcon, setName, setSettings
 
Methods inherited from class com.eviware.soapui.model.support.AbstractModelItem
addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, getChildren, notifyPropertyChanged, notifyPropertyChanged, notifyPropertyChanged, notifyPropertyChanged, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.eviware.soapui.model.security.SecurityScan
getConfig
 
Methods inherited from interface com.eviware.soapui.model.ModelItem
getChildren, getDescription, getIcon, getId, getName, getParent, getSettings
 
Methods inherited from interface com.eviware.soapui.support.PropertyChangeNotifier
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

assertionsSupport

protected AssertionsSupport assertionsSupport
Constructor Detail

AbstractSecurityScan

public AbstractSecurityScan(TestStep testStep,
                            com.eviware.soapui.config.SecurityScanConfig config,
                            ModelItem parent,
                            java.lang.String icon)
Method Detail

copyConfig

public void copyConfig(com.eviware.soapui.config.SecurityScanConfig config)
Specified by:
copyConfig in interface SecurityScan

updateSecurityConfig

public void updateSecurityConfig(com.eviware.soapui.config.SecurityScanConfig config)
Specified by:
updateSecurityConfig in interface SecurityScan

initAssertions

protected void initAssertions()

run

public SecurityScanResult run(TestStep testStep,
                              SecurityTestRunContext context,
                              SecurityTestRunner securityTestRunner)
Specified by:
run in interface SecurityScan

clear

protected void clear()

execute

protected abstract void execute(SecurityTestRunner runner,
                                TestStep testStep,
                                SecurityTestRunContext context)
should be implemented in every particular scan it executes one request, modified by securityScan if necessary and internally adds messages for logging to SecurityScanRequestResult


hasNext

protected abstract boolean hasNext(TestStep testStep2,
                                   SecurityTestRunContext context)
checks if specific SecurityScan still has modifications left

Parameters:
testStep2 -
context -

isConfigurable

public boolean isConfigurable()
Specified by:
isConfigurable in interface SecurityScan

getComponent

public javax.swing.JComponent getComponent()
Overide if SecurityScan have Optional component

Specified by:
getComponent in interface SecurityScan
Returns:

getType

public abstract java.lang.String getType()
Description copied from interface: SecurityScan
The type of this check

Specified by:
getType in interface SecurityScan
Returns:

getTestStep

public TestStep getTestStep()
Specified by:
getTestStep in interface SecurityScan
Specified by:
getTestStep in interface Assertable

setTestStep

public void setTestStep(TestStep step)
Specified by:
setTestStep in interface SecurityScan

isDisabled

public boolean isDisabled()
Description copied from interface: SecurityScan
Checks if the test is disabled

Specified by:
isDisabled in interface SecurityScan
Returns:
true if disabled

setDisabled

public void setDisabled(boolean disabled)
Description copied from interface: SecurityScan
Disables or Enables the check

Specified by:
setDisabled in interface SecurityScan

isSecurable

public static boolean isSecurable(TestStep testStep)

getExecutionStrategy

public ExecutionStrategyHolder getExecutionStrategy()
Specified by:
getExecutionStrategy in interface SecurityScan

setExecutionStrategy

public void setExecutionStrategy(ExecutionStrategyHolder executionStrategy)
Specified by:
setExecutionStrategy in interface SecurityScan

getOriginalResult

protected TestRequest getOriginalResult(SecurityTestRunnerImpl securityRunner,
                                        TestStep testStep)

getRequest

protected TestRequest getRequest(TestStep testStep)

addAssertion

public TestAssertion addAssertion(java.lang.String label)
Specified by:
addAssertion in interface Assertable

removeAssertion

public void removeAssertion(TestAssertion assertion)
Specified by:
removeAssertion in interface Assertable

moveAssertion

public TestAssertion moveAssertion(int ix,
                                   int offset)
Specified by:
moveAssertion in interface Assertable

getAssertionAt

public WsdlMessageAssertion getAssertionAt(int c)
Specified by:
getAssertionAt in interface Assertable

addAssertionsListener

public void addAssertionsListener(AssertionsListener listener)
Specified by:
addAssertionsListener in interface Assertable

removeAssertionsListener

public void removeAssertionsListener(AssertionsListener listener)
Specified by:
removeAssertionsListener in interface Assertable

getAssertionCount

public int getAssertionCount()
Specified by:
getAssertionCount in interface Assertable

getAssertionStatus

public Assertable.AssertionStatus getAssertionStatus()
Specified by:
getAssertionStatus in interface Assertable

getSecurityStatus

public SecurityResult.ResultStatus getSecurityStatus()

getAssertableContent

public java.lang.String getAssertableContent()
Specified by:
getAssertableContent in interface Assertable

getAssertableType

public TestAssertionRegistry.AssertableType getAssertableType()
Specified by:
getAssertableType in interface Assertable

getAssertionByName

public TestAssertion getAssertionByName(java.lang.String name)
Specified by:
getAssertionByName in interface Assertable

getAssertionList

public java.util.List<TestAssertion> getAssertionList()
Specified by:
getAssertionList in interface Assertable

getAssertions

public java.util.Map<java.lang.String,TestAssertion> getAssertions()
Specified by:
getAssertions in interface Assertable

getAssertionsSupport

public AssertionsSupport getAssertionsSupport()

cloneAssertion

public TestAssertion cloneAssertion(TestAssertion source,
                                    java.lang.String name)
Specified by:
cloneAssertion in interface Assertable

getDefaultAssertableContent

public java.lang.String getDefaultAssertableContent()
Specified by:
getDefaultAssertableContent in interface Assertable

getInterface

public Interface getInterface()
Specified by:
getInterface in interface Assertable

getModelItem

public ModelItem getModelItem()
Specified by:
getModelItem in interface Assertable

assertResponse

public Assertable.AssertionStatus assertResponse(MessageExchange messageExchange,
                                                 SubmitContext context)
Specified by:
assertResponse in interface ResponseAssertion

getConfigName

public abstract java.lang.String getConfigName()
Specified by:
getConfigName in interface SecurityScan

getConfigDescription

public abstract java.lang.String getConfigDescription()
Specified by:
getConfigDescription in interface SecurityScan

getHelpURL

public abstract java.lang.String getHelpURL()
Specified by:
getHelpURL in interface SecurityScan

setSecurityScanRequestResult

protected void setSecurityScanRequestResult(SecurityScanRequestResult securityScanRequestResult)

getSecurityScanRequestResult

protected SecurityScanRequestResult getSecurityScanRequestResult()

getAdvancedSettingsPanel

public javax.swing.JComponent getAdvancedSettingsPanel()
Overide if SecurityScan needs advanced settings

Specified by:
getAdvancedSettingsPanel in interface SecurityScan
Returns:

getSecurityScanResult

public SecurityScanResult getSecurityScanResult()
Specified by:
getSecurityScanResult in interface SecurityScan

reportSecurityScanException

protected void reportSecurityScanException(java.lang.String message)
Parameters:
message -
testStep -

addWsdlAssertion

public void addWsdlAssertion(java.lang.String assertionLabel)
Specified by:
addWsdlAssertion in interface SecurityScan

isApplyForFailedStep

public boolean isApplyForFailedStep()
Specified by:
isApplyForFailedStep in interface SecurityScan

setApplyForFailedTestStep

public void setApplyForFailedTestStep(boolean apply)
Specified by:
setApplyForFailedTestStep in interface SecurityScan

isRunOnlyOnce

public boolean isRunOnlyOnce()
Specified by:
isRunOnlyOnce in interface SecurityScan

setRunOnlyOnce

public void setRunOnlyOnce(boolean runOnlyOnce)
Specified by:
setRunOnlyOnce in interface SecurityScan

release

public void release()
Specified by:
release in interface SecurityScan
Overrides:
release in class AbstractWsdlModelItem<com.eviware.soapui.config.SecurityScanConfig>

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface PropertyChangeNotifier
Overrides:
addPropertyChangeListener in class AbstractModelItem

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface PropertyChangeNotifier
Overrides:
removePropertyChangeListener in class AbstractModelItem

isSkipFurtherRunning

public boolean isSkipFurtherRunning()
Specified by:
isSkipFurtherRunning in interface SecurityScan

setSkipFurtherRunning

public void setSkipFurtherRunning(boolean skipFurtherRunning)
Specified by:
setSkipFurtherRunning in interface SecurityScan


Copyright © 2005-2011 eviware.com. All Rights Reserved.