com.ibm.rational.test.lt.datacorrelation.testgen

Interface IDCStringLocator



  • public interface IDCStringLocator
    • Field Detail

      • beginOffset

        static final int beginOffset
        offset of where the string of interest starts at
      • length

        static final int length
        length of the string of interest
      • dataString

        static final String dataString
        the entire data string that contains the string of interest
      • regex

        static final String regex
        regular expression used to find string of interest, mostly used for references.
      • propertyType

        static final String propertyType
        property type that will identify which part of the action the dataString is
      • action

        static final CBActionElement action
        the element currently being looked at. It will contain the string of interest
    • Method Detail

      • getBeginOffset

        int getBeginOffset()
        Returns:
        the beginning offset of the substring in the dataString
      • getPat

        Pattern getPat()
        Returns:
        - the pattern which is the "compiled" regular expression
      • getDataString

        String getDataString()
        Returns:
        the dataString to act upon
      • getLength

        int getLength()
        Returns:
        the length of the substring in the dataString
      • getRegex

        String getRegex()
        Returns:
        the regular expression associated with this string
      • setBeginOffset

        void setBeginOffset(int i)
        Parameters:
        i - the begin offset of the substring of interest within the dataString
      • setDataString

        void setDataString(String string)
        Parameters:
        string - the dataString where reg expressions and offsets are applied
      • setLength

        void setLength(int i)
        This sets the length of the string being pointed at
        Parameters:
        i - the length of the substring of interest
      • findRegex

        void findRegex()
        must have propertyType, offset and len set and this will find a regular expression that will locate the dataString.
      • getAction

        CBActionElement getAction()
        Returns:
        - the element that this string locator is pointing in to
      • getPropertyType

        String getPropertyType()
        Returns:
        - the property that is being looked at in the CBActionElement returned from getAction()
      • setRegex

        void setRegex(String buffer)
        Parameters:
        buffer - - the regular expression to be set
      • setPropertyType

        void setPropertyType(String buffer)
        Parameters:
        buffer - - the property type is string used to identify which piece of the action is being looked at.
      • checkValid

        void checkValid()
                        throws com.ibm.rational.test.lt.datacorrelation.testgen.DCException
        checks to make sure data in string locator is valid before creating a element in the behavior model
        Throws:
        com.ibm.rational.test.lt.datacorrelation.testgen.DCException
      • getPropString

        String getPropString()
        This will take the propertyType and get it's corresponding string from the action
        Returns:
        - the string of type propertyType
      • setEncoding

        void setEncoding(boolean encode)
        Parameters:
        encode - - whether to encode a substitution candidate or not. default is false
      • setEncoding

        void setEncoding()
        This will ask the protocol whether or not the encoding flag should be set for this StringLocator
      • getEncoding

        boolean getEncoding()
        Returns:
        - whether encoding is on or not
      • setOcc

        void setOcc(int occ)
        Parameters:
        occ - - the number of times to execute a regex before getting to the string you're looking for
      • getOcc

        int getOcc()
        Returns:
        - the occurence which is the # of times a regex needs to be executed before you get to the string you're looking for
      • getIsUI

        boolean getIsUI()
        Returns:
        - true if UI DCStringLocator, false if not. If this is a UI DCStringLocator then the offsets and lengths are represented in display string format which means the data has been converted using a charset.
      • setIsUI

        void setIsUI(boolean isUI)
        Parameters:
        isUI - - true if UI DCStringLocator with UI offsets
      • toModel

        void toModel()
        converts strings and offsets and lengths from UI form to model form. Model form means the data will be asciified.
      • toDisplay

        boolean toDisplay()
        converts strings and offsets and lengths from model form to UI form
      • getHandler

        String getHandler()
        Returns:
        - the uniqueID of the plugin that wants to handle this string locator
      • setHandler

        void setHandler(String uniqueID)
        Parameters:
        uniqueID - - the uniqueID of the plugin that wants to handle this string locator
IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2013. All rights reserved.