01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18:
19: package org.apache.jmeter.testelement.property;
20:
21: import java.io.Serializable;
22:
23: import org.apache.jmeter.testelement.TestElement;
24:
25: public interface JMeterProperty extends Serializable, Cloneable,
26: Comparable {
27: /**
28: * Returns whether the property is a running version.
29: *
30: * @return boolean
31: */
32: public boolean isRunningVersion();
33:
34: /**
35: * The name of the property. Typically this should match the name that keys
36: * the property's location in the test elements Map.
37: *
38: * @return String
39: */
40: public String getName();
41:
42: /**
43: * Set the property name.
44: *
45: * @param name
46: */
47: public void setName(String name);
48:
49: /**
50: * Make the property a running version or turn it off as the running
51: * version. A property that is made a running version will preserve the
52: * current state in such a way that it is retrievable by a future call to
53: * 'recoverRunningVersion()'. Additionally, a property that is a running
54: * version will resolve all functions prior to returning it's property
55: * value. A non-running version property will return functions as their
56: * uncompiled string representation.
57: *
58: * @param runningVersion
59: */
60: public void setRunningVersion(boolean runningVersion);
61:
62: /**
63: * Tell the property to revert to the state at the time
64: * setRunningVersion(true) was called.
65: */
66: public void recoverRunningVersion(TestElement owner);
67:
68: /**
69: * Take the given property object and merge it's value with the current
70: * property object. For most property types, this will simply be ignored.
71: * But for collection properties and test element properties, more complex
72: * behavior is required.
73: *
74: * @param prop
75: */
76: public void mergeIn(JMeterProperty prop);
77:
78: public int getIntValue();
79:
80: public long getLongValue();
81:
82: public double getDoubleValue();
83:
84: public float getFloatValue();
85:
86: public boolean getBooleanValue();
87:
88: public String getStringValue();
89:
90: public Object getObjectValue();
91:
92: public void setObjectValue(Object value);
93:
94: public Object clone();
95: }
|