|
IBM Rational Performance Tester SDK | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.rational.test.lt.testeditor.common.DataCorrelationUtil
public class DataCorrelationUtil
Utility class with various methods related to manipulation of Datacorrelation model elements.
| Field Summary | |
|---|---|
static String |
ORIGINAL_REGEX_KEY
|
| Fields inherited from interface com.ibm.rational.test.lt.testeditor.main.LoadTestLoggingConstants |
|---|
prefix_RPTN, RPTNE0001_INIT_ERROR, RPTNE0002_INTERNAL_ERROR, RPTNE0003_CREATE_DATAPOOL, RPTNE0004_EXTENSION_ERROR, RPTNE0005_MARKER_NOT_FOUND, RPTNE0017_CREATE_REFERENCE, RPTNE0020_CREATE_DATAPOOL_SUBST, RPTNE0040_OPEN_FILE, RPTNE0050_DISPLAY_RULES_FAILED, RPTNI0009_COLUMNS_REFRESHED, RPTNW0006_DC_ERROR, RPTNW0007_DATAPOOL_REMOVED, RPTNW0008_COLUMNS_REMOVED, RPTNW0016_CREATE_REFERENCE |
| Constructor Summary | |
|---|---|
DataCorrelationUtil()
|
|
| Method Summary | |
|---|---|
static void |
addDcOwnershipResolver(com.ibm.rational.test.lt.testeditor.dc.IDcOwnershipResolver resolver)
This method should be used to store datacorrelation resolvers. |
static void |
addFileContentsSubstitutionField(String fieldName,
boolean onlyFileContents)
Registers the field (identified by name) as supporting File Contents Substituter. |
static com.ibm.rational.test.common.models.behavior.cbdata.CorrelationHarvester |
createCorrelationHarvester(IDCStringLocator sl,
LoadTestEditor editor)
Creates CorrelationHarvester. |
static com.ibm.rational.test.common.models.behavior.cbdata.Substituter |
createSubstituter(IDCStringLocator strLoc,
com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds,
LoadTestEditor editor)
Creates Substituter. |
static Button |
displayLinkWithDSVOption(org.eclipse.hyades.test.ui.internal.editor.form.base.FormWidgetFactory factory,
Composite parent,
int cols)
|
static HashMap |
getAttributeDisplayNames()
|
static String |
getDatasourceCategory(com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds)
Return ICategoriesIDs constant for a given DataSource |
static int |
getDcSize(CBActionElement element)
|
static String |
getErrorMessage()
|
static List |
getHarvestersFor(com.ibm.rational.test.common.models.behavior.cbdata.DataSourceHost host,
String attrName,
Comparator comparator)
Returns list of harvesters for the given host. |
static List |
getHarvestersFor(com.ibm.rational.test.common.models.behavior.cbdata.DataSourceHost host,
String attrName,
Comparator comparator,
IProgressMonitor monitor)
|
static String |
getLabelForAttribute(String name)
Returns display name for a given datacorrelation attribute. |
static List |
getSubstitutersFor(com.ibm.rational.test.common.models.behavior.cbdata.SubstituterHost host,
String attrName,
Comparator comparator)
Returns list of Substituter objects. |
static List |
getSubstitutersFor(com.ibm.rational.test.common.models.behavior.cbdata.SubstituterHost host,
String attrName,
Comparator comparator,
IProgressMonitor monitor)
|
static boolean |
isReadOnly(com.ibm.rational.test.common.models.behavior.cbdata.CoreHarvester ch,
String feature)
|
static boolean |
isShowMoreSubstitutionOptions()
|
static boolean |
okToRemove(com.ibm.rational.test.common.models.behavior.cbdata.Arbitrary a,
LoadTestEditor editor)
|
static boolean |
okToRemove(com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds,
LoadTestEditor editor)
|
static boolean |
okToRemove(com.ibm.rational.test.lt.testeditor.common.LTTextStructuredSelection s,
LoadTestEditor editor)
|
static boolean |
okToRemove(com.ibm.rational.test.common.models.behavior.cbdata.Substituter su,
LoadTestEditor editor)
|
protected static IDCStringLocator |
promptForHarvesterType(List list,
IDCStringLocator sl)
|
static boolean |
promptToRemove(Datapool datapool,
LoadTestEditor editor)
|
static boolean |
promptToRemove(com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds,
LoadTestEditor editor)
|
static boolean |
promptToRemove(List dataSourcesLIst,
LoadTestEditor editor)
|
static boolean |
promptToRemove(com.ibm.rational.test.lt.testeditor.common.LTTextStructuredSelection sel,
LoadTestEditor editor)
|
static boolean |
promptToRemove(com.ibm.rational.test.common.models.behavior.cbdata.Substituter su,
LoadTestEditor editor)
|
static com.ibm.rational.test.common.models.behavior.cbdata.Substituter |
replaceDataSource(com.ibm.rational.test.common.models.behavior.cbdata.Substituter subst,
com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds)
Deprecated. Use DataCorrelationUtil.replaceDataSource(Substituter, DataSource, DataSource) |
static com.ibm.rational.test.common.models.behavior.cbdata.Substituter |
replaceDataSource(com.ibm.rational.test.common.models.behavior.cbdata.Substituter subst,
com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds,
com.ibm.rational.test.common.models.behavior.cbdata.DataSource _oldDs)
Replaces DataSource in the given Substituter. |
static void |
replaceSubstitutersInMatches(com.ibm.rational.test.common.models.behavior.cbdata.Substituter oldSub,
com.ibm.rational.test.common.models.behavior.cbdata.Substituter newSub)
|
static CBActionElement |
resolveDcOwnership(com.ibm.rational.test.common.models.behavior.cbdata.CoreHarvester ch)
Finds IDcWonershipResolver based on the argument DataSource. |
static CBActionElement |
resolveDcOwnership(String attribute,
CBActionElement action)
|
static CBActionElement |
resolveDcOwnership(com.ibm.rational.test.common.models.behavior.cbdata.Substituter substituter)
Finds IDcWonershipResolver based on the argument DataSource. |
static void |
setErrorMessage(String errorMessage)
|
static void |
setLabelForAttribute(String name,
com.ibm.rational.test.lt.testeditor.dc.DataCorrelationLabelProvider.LabelFormatter formatter)
Stores a human-readable LabelFormatter for a given attribute name. |
static void |
setLabelForAttribute(String name,
String displayName)
Stores a human-readable display name for a given attribute name. |
static void |
setShowMoreSubstitutionOptions(boolean b)
|
static void |
showLinkWithDSVMessage(Shell shell,
LoadTestEditor editor,
com.ibm.rational.test.lt.testeditor.views.ISubstitutionTargetProvider targetProvider)
Enables link with Data Sources View. |
static Boolean |
supportsFileContentsSubstitution(String fieldName)
Checks if the field identified by supplied fieldName supports FileContents Substituters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ORIGINAL_REGEX_KEY
| Constructor Detail |
|---|
public DataCorrelationUtil()
| Method Detail |
|---|
public static com.ibm.rational.test.common.models.behavior.cbdata.CorrelationHarvester createCorrelationHarvester(IDCStringLocator sl,
LoadTestEditor editor)
throws com.ibm.rational.test.lt.datacorrelation.testgen.DCException
This method is called from ExtendedStyledText in response of user's selecting of various menu options.
This method collects available datacorrelation provider that are capable of creating Harvester for selected text.
If more than one handler is found, the method presents a dialog box with selection.
sl - IDCStringLocator description of the selected text.editor - LoadTestEditor
null.
com.ibm.rational.test.lt.datacorrelation.testgen.DCExceptionDataCorrelator
protected static IDCStringLocator promptForHarvesterType(List list,
IDCStringLocator sl)
list -
public static String getErrorMessage()
public static void setErrorMessage(String errorMessage)
errorMessage - The errorMessage to set.
public static com.ibm.rational.test.common.models.behavior.cbdata.Substituter replaceDataSource(com.ibm.rational.test.common.models.behavior.cbdata.Substituter subst,
com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds,
com.ibm.rational.test.common.models.behavior.cbdata.DataSource _oldDs)
BuiltInDataSource.
subst - Substituter. Substituter in which the DataSource needs to be replaced, or set.ds - DataSource to correlate with._oldDs - previous data source, if any
public static com.ibm.rational.test.common.models.behavior.cbdata.Substituter replaceDataSource(com.ibm.rational.test.common.models.behavior.cbdata.Substituter subst,
com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds)
DataCorrelationUtil.replaceDataSource(Substituter, DataSource, DataSource)
BuiltInDataSource.
subst - Substituter. Substituter in which the DataSource needs to be replaced, or set.ds - DataSource to correlate with.
public static com.ibm.rational.test.common.models.behavior.cbdata.Substituter createSubstituter(IDCStringLocator strLoc,
com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds,
LoadTestEditor editor)
throws com.ibm.rational.test.lt.datacorrelation.testgen.DCException
This method is called from ExtendedStyledText in response of user's selecting of various menu options.
This method collects available datacorrelation providers that are capable of creating Substituters
for selected text.
If more than one handler is found, the method presents a dialog box with selection.
strLoc - IDCStringLocator description of the selected text.ds - DataSource to use for substitution.editor - LoadTestEditor
null.
com.ibm.rational.test.lt.datacorrelation.testgen.DCExceptionDataCorrelator
public static boolean okToRemove(com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds,
LoadTestEditor editor)
ds - editor -
public static boolean promptToRemove(com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds,
LoadTestEditor editor)
ds - editor -
public static boolean promptToRemove(com.ibm.rational.test.lt.testeditor.common.LTTextStructuredSelection sel,
LoadTestEditor editor)
ds - editor -
public static boolean promptToRemove(List dataSourcesLIst,
LoadTestEditor editor)
ds - editor -
public static boolean okToRemove(com.ibm.rational.test.common.models.behavior.cbdata.Arbitrary a,
LoadTestEditor editor)
a - Arbitraryeditor - LoadTestEditor
public static boolean okToRemove(com.ibm.rational.test.common.models.behavior.cbdata.Substituter su,
LoadTestEditor editor)
su - editor -
public static boolean promptToRemove(com.ibm.rational.test.common.models.behavior.cbdata.Substituter su,
LoadTestEditor editor)
su - editor -
public static String getLabelForAttribute(String name)
DataCorrelationLabelProvider#setLabelForAttribute(String, LabelFormatter) or
DataCorrelationLabelProvider#setLabelForAttribute(String, String).
name - String attribute name
public static void setLabelForAttribute(String name,
String displayName)
name - String Attribute name.displayName - Display NameExtendedStyledText
public static void setLabelForAttribute(String name,
com.ibm.rational.test.lt.testeditor.dc.DataCorrelationLabelProvider.LabelFormatter formatter)
LabelFormatter for a given attribute name. Protocol extension plugin must
register its attribute names/display names if it supports datacorrelation/datapooling. LabelFormatter is responsible
for formatting and returning correct display name for a given attribute name
name - String Datacorrelation Attribute Name.formatter - Class implementing DataCorrelationLabelProvider.LabelFormatterExtendedStyledText,
DataCorrelationLabelProvider.LabelFormatterpublic static HashMap getAttributeDisplayNames()
public static void addDcOwnershipResolver(com.ibm.rational.test.lt.testeditor.dc.IDcOwnershipResolver resolver)
IDcOwnershipResolver
returns real parent of DataSource or Substituter based on the
attribute name.
resolver - IDcOwnershipResolver, must not be null.public static CBActionElement resolveDcOwnership(com.ibm.rational.test.common.models.behavior.cbdata.CoreHarvester ch)
IDcWonershipResolver based on the argument DataSource.
ch - CorrelationHarvester
public static CBActionElement resolveDcOwnership(com.ibm.rational.test.common.models.behavior.cbdata.Substituter substituter)
IDcWonershipResolver based on the argument DataSource.
substituter - Substituter
public static CBActionElement resolveDcOwnership(String attribute,
CBActionElement action)
public static List getSubstitutersFor(com.ibm.rational.test.common.models.behavior.cbdata.SubstituterHost host,
String attrName,
Comparator comparator,
IProgressMonitor monitor)
public static List getSubstitutersFor(com.ibm.rational.test.common.models.behavior.cbdata.SubstituterHost host,
String attrName,
Comparator comparator)
Substituter objects. The list contains only substituters
that with a given attributeName. In addition, the comparator is used to further
filter the list.
host - SubstituterHost host.attrName - String. Attribute namecomparator - Comparator. This can be either a class that implements Comparator directly
or an instance of DefaultAttributeMatcher.
public static List getHarvestersFor(com.ibm.rational.test.common.models.behavior.cbdata.DataSourceHost host,
String attrName,
Comparator comparator,
IProgressMonitor monitor)
public static List getHarvestersFor(com.ibm.rational.test.common.models.behavior.cbdata.DataSourceHost host,
String attrName,
Comparator comparator)
host. The list contains only harvesters
with a given attributeName. In addition, the comparator is used to further
filter the list.
host - DataSourceHost host.attrName - String. Attribute namecomparator - Comparator. This can be either a class that implements Comparator directly
or an instance of DefaultAttributeMatcher.
public static boolean promptToRemove(Datapool datapool,
LoadTestEditor editor)
public static boolean okToRemove(com.ibm.rational.test.lt.testeditor.common.LTTextStructuredSelection s,
LoadTestEditor editor)
public static Button displayLinkWithDSVOption(org.eclipse.hyades.test.ui.internal.editor.form.base.FormWidgetFactory factory,
Composite parent,
int cols)
public static void showLinkWithDSVMessage(Shell shell,
LoadTestEditor editor,
com.ibm.rational.test.lt.testeditor.views.ISubstitutionTargetProvider targetProvider)
LoadTestEditorPlugin.isAutoLinkWithDsv(). When this value is true,
the UI is expected to update the Test Data Sources View with substitutable locations where appropriate (by using ISubstitutionTargetProvider.
shell - Shell for any popup dialogs that may be displayed by this method.editor - LoadTestEditor the editor. If not null the Data Source View will be displayed.targetProvider - ISubstitutionTargetProvider. If not null, the Data Sources View will display this targetISubstitutionTargetProvider,
LoadTestEditorPlugin.isAutoLinkWithDsv(),
LoadTestEditorPlugin.setAutoLinkWithDsv(boolean),
ShowDataSourceViewActionpublic static Boolean supportsFileContentsSubstitution(String fieldName)
fieldName - String
null if not supported. Otherwise, the value of the returned Boolean is true
if this field supports file contents substitution only, or false if both types.ToggleFileSubstitutionAction,
DataCorrelationUtil.addFileContentsSubstitutionField(String, boolean)
public static void addFileContentsSubstitutionField(String fieldName,
boolean onlyFileContents)
DataCorrelatingTextAttrField.getAttributeName().NOTE: The use case where the same field can have both file contents and regular substitution, based on some external criteria is not supported. For example, HTTP POST data chunks, if binary, can have only file contents substitution, and, if text, both types.
fieldName - String field Name.onlyFileContents - boolean. If true then the field supports file contents substitution only, if
false both regular and file contents substitution types are supported in this field.ToggleFileSubstitutionAction,
DataCorrelationUtil.addFileContentsSubstitutionField(String, boolean)public static int getDcSize(CBActionElement element)
element - CBActionElement. Expected to be instance of DataSourceHost and/or SubstituterHost
DataSource (if the element is DataSourceHost) and/or Substituter (if the
element is SubstituterHost)public static String getDatasourceCategory(com.ibm.rational.test.common.models.behavior.cbdata.DataSource ds)
ICategoriesIDs constant for a given DataSource
ds - DataSource
null if ds is unknown type.
public static boolean isReadOnly(com.ibm.rational.test.common.models.behavior.cbdata.CoreHarvester ch,
String feature)
public static boolean isShowMoreSubstitutionOptions()
public static void setShowMoreSubstitutionOptions(boolean b)
public static void replaceSubstitutersInMatches(com.ibm.rational.test.common.models.behavior.cbdata.Substituter oldSub,
com.ibm.rational.test.common.models.behavior.cbdata.Substituter newSub)
|
IBM Rational Performance Tester SDK | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||