You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2004/09/25 22:58:16 UTC

cvs commit: jakarta-jmeter/src/core/org/apache/jmeter/util JMeterUtils.java

sebb        2004/09/25 13:58:16

  Modified:    src/core/org/apache/jmeter/util Tag: rel-2_0
                        JMeterUtils.java
  Log:
  Add two property access methods
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.66.2.2  +34 -2     jakarta-jmeter/src/core/org/apache/jmeter/util/JMeterUtils.java
  
  Index: JMeterUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/util/JMeterUtils.java,v
  retrieving revision 1.66.2.1
  retrieving revision 1.66.2.2
  diff -u -r1.66.2.1 -r1.66.2.2
  --- JMeterUtils.java	2 Jun 2004 01:07:40 -0000	1.66.2.1
  +++ JMeterUtils.java	25 Sep 2004 20:58:15 -0000	1.66.2.2
  @@ -650,6 +650,38 @@
           return ans;
       }
       /**
  +     *  Get a String value with NO default if not present.
  +     *
  +     *@param  propName    the name of the property.
  +     *@return             The PropDefault value
  +     */
  +    public static String getProperty(String propName)
  +    {
  +        String ans = null;
  +        try
  +        {
  +            ans = appProperties.getProperty(propName);
  +        }
  +        catch (Exception e)
  +        {
  +            ans = null;
  +        }
  +        return ans;
  +    }
  +
  +    /**
  +     *  Set a String value
  +     *
  +     *@param  propName    the name of the property.
  +     *@param propValue    the value of the property
  +     *@return             the previous value of the property
  +     */
  +    public static Object setProperty(String propName, String propValue)
  +    {
  +         return appProperties.setProperty(propName,propValue);
  +    }
  +
  +    /**
        * Sets the selection of the JComboBox to the Object 'name' from the list
        * in namVec.
        */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org