org.rhq.core.domain.configuration.definition
Class PropertyDefinitionSimple

java.lang.Object
  extended by org.rhq.core.domain.configuration.definition.PropertyDefinition
      extended by org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple
All Implemented Interfaces:
Serializable

public class PropertyDefinitionSimple
extends PropertyDefinition

Defines a simple property.

See Also:
Serialized Form

Constructor Summary
protected PropertyDefinitionSimple()
           
  PropertyDefinitionSimple(String name, String description, boolean required, PropertySimpleType type)
           
 
Method Summary
 void addConstraints(Constraint... constraintsToAdd)
           
 void addEnumeratedValues(PropertyDefinitionEnumeration... enumerations)
           
 boolean getAllowCustomEnumeratedValue()
          If false and this simple property has enumerated values defined, then the value of the simple property must be one of the enumerated values.
 Set<Constraint> getConstraints()
          Return all the constraints on this simple-property no matter how they are grouped together in the XML.
 String getDefaultValue()
          Deprecated. 
 List<PropertyDefinitionEnumeration> getEnumeratedValues()
          Get the <options> within <property-options> for a <simple-property>
 PropertySimpleType getType()
           
 MeasurementUnits getUnits()
           
 void setAllowCustomEnumeratedValue(boolean allowCustomEnumValue)
          See getAllowCustomEnumeratedValue() for a description of this flag.
 void setConstraints(Set<Constraint> constraints)
           
 void setDefaultValue(String defaultValue)
          Deprecated. 
 void setEnumeratedValues(List<PropertyDefinitionEnumeration> enumeratedValues, boolean allowCustomEnumValue)
           
 void setType(PropertySimpleType type)
           
 void setUnits(MeasurementUnits units)
           
 String toString()
           
 
Methods inherited from class org.rhq.core.domain.configuration.definition.PropertyDefinition
getActivationPolicy, getConfigurationDefinition, getDescription, getDisplayName, getId, getName, getOrder, getParentPropertyListDefinition, getParentPropertyMapDefinition, getPropertyGroupDefinition, getVersion, isReadOnly, isRequired, isSummary, setActivationPolicy, setConfigurationDefinition, setDescription, setDisplayName, setId, setName, setOrder, setParentPropertyListDefinition, setParentPropertyMapDefinition, setPropertyGroupDefinition, setReadOnly, setRequired, setSummary, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyDefinitionSimple

public PropertyDefinitionSimple(@NotNull
                                String name,
                                String description,
                                boolean required,
                                @NotNull
                                PropertySimpleType type)

PropertyDefinitionSimple

protected PropertyDefinitionSimple()
Method Detail

getType

public PropertySimpleType getType()

setType

public void setType(PropertySimpleType type)

getConstraints

@NotNull
public Set<Constraint> getConstraints()
Return all the constraints on this simple-property no matter how they are grouped together in the XML.

Returns:

setConstraints

public void setConstraints(Set<Constraint> constraints)

addConstraints

public void addConstraints(Constraint... constraintsToAdd)

getEnumeratedValues

@NotNull
public List<PropertyDefinitionEnumeration> getEnumeratedValues()
Get the <options> within <property-options> for a <simple-property>


setEnumeratedValues

public void setEnumeratedValues(List<PropertyDefinitionEnumeration> enumeratedValues,
                                boolean allowCustomEnumValue)

addEnumeratedValues

public void addEnumeratedValues(PropertyDefinitionEnumeration... enumerations)

getAllowCustomEnumeratedValue

public boolean getAllowCustomEnumeratedValue()
If false and this simple property has enumerated values defined, then the value of the simple property must be one of the enumerated values. If true, then the value of this simple property is not required to be one of the enumerated values - a user can opt to set the value to some other custom value. This is useful, for example, when a property has an enumerated list of common JDBC drivers but allows a user to enter their own custom JDBC driver if not one of the common drivers given in the enumerated list.

Note that this flag has no effect if there are no enumerated values defined for this simple property.

Returns:
flag to indicate if the property value is not restricted to one of the enumerated values

setAllowCustomEnumeratedValue

public void setAllowCustomEnumeratedValue(boolean allowCustomEnumValue)
See getAllowCustomEnumeratedValue() for a description of this flag.

Parameters:
allowCustomEnumValue -

getDefaultValue

@Deprecated
public String getDefaultValue()
Deprecated. 


setDefaultValue

@Deprecated
public void setDefaultValue(String defaultValue)
Deprecated. 


getUnits

public MeasurementUnits getUnits()

setUnits

public void setUnits(MeasurementUnits units)

toString

public String toString()
Overrides:
toString in class PropertyDefinition


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.