org.teiid.adminapi.impl
Class PropertyDefinitionMetadata

java.lang.Object
  extended by org.teiid.adminapi.impl.AdminObjectImpl
      extended by org.teiid.adminapi.impl.PropertyDefinitionMetadata
All Implemented Interfaces:
java.io.Serializable, AdminObject, PropertyDefinition

public class PropertyDefinitionMetadata
extends AdminObjectImpl
implements PropertyDefinition

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.teiid.adminapi.PropertyDefinition
PropertyDefinition.RestartType
 
Field Summary
 
Fields inherited from interface org.teiid.adminapi.PropertyDefinition
UNBOUNDED_VALUE
 
Fields inherited from interface org.teiid.adminapi.AdminObject
DELIMITER, DELIMITER_CHAR, ESCAPED_DELIMITER, ESCAPED_WILDCARD, WILDCARD
 
Constructor Summary
PropertyDefinitionMetadata()
           
 
Method Summary
 java.util.Collection getAllowedValues()
          Get the allowed values for this property.
 java.lang.Object getDefaultValue()
          Get the default value for values of this property, or an empty String if there is no default value.
 java.lang.String getDescription()
          Get the description of this property.
 java.lang.String getDisplayName()
          Get the localized display name of this property.
 java.lang.String getPropertyTypeClassName()
          Get the name of the java class that best represents the property type.
 PropertyDefinition.RestartType getRequiresRestart()
          Get whether this property requires the system to be restarted before it takes effect.
 boolean isAdvanced()
          The "expert" flag is used to distinguish between features that are intended for expert users from those that are intended for normal users.
 boolean isConstrainedToAllowedValues()
          Return whether the value or values for this property are constrained to be only those in the AllowedValues list.
 boolean isMasked()
          The "masked" flag is used to tell whether the value should be masked when displayed to users.
 boolean isModifiable()
          The modifiable flag is used to identify features that may not be changed once they are set.
 boolean isRequired()
          The "required" flag is used to identify features that require at least one value (possibly a default value) by the consumer of the property.
 void setAdvanced(boolean expert)
           
 void setAllowedValues(java.util.Collection allowedValues)
           
 void setDefaultValue(java.io.Serializable defaultValue)
           
 void setDescription(java.lang.String description)
           
 void setDisplayName(java.lang.String displayName)
           
 void setMasked(boolean masked)
           
 void setModifiable(boolean modifiable)
           
 void setPropertyTypeClassName(java.lang.String propertyTypeClassName)
           
 void setRequired(boolean required)
           
 void setRequiresRestart(PropertyDefinition.RestartType requiresRestart)
           
 java.lang.String toString()
           
 
Methods inherited from class org.teiid.adminapi.impl.AdminObjectImpl
addAttchment, addAttchment, addProperty, getAttachment, getAttachment, getJAXBProperties, getName, getProperties, getPropertyValue, removeAttachment, removeAttachment, setJAXBProperties, setName, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.teiid.adminapi.AdminObject
getName, getProperties, getPropertyValue
 

Constructor Detail

PropertyDefinitionMetadata

public PropertyDefinitionMetadata()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getAllowedValues

public java.util.Collection getAllowedValues()
Description copied from interface: PropertyDefinition
Get the allowed values for this property.

Specified by:
getAllowedValues in interface PropertyDefinition
Returns:
the list of allowed values for this property, or an empty set if the values do not have to conform to a fixed set.
See Also:
PropertyDefinition.getAllowedValues()

getDefaultValue

public java.lang.Object getDefaultValue()
Description copied from interface: PropertyDefinition
Get the default value for values of this property, or an empty String if there is no default value.

Specified by:
getDefaultValue in interface PropertyDefinition
Returns:
the default value for this property, or an empty String if there is no default value.
See Also:
PropertyDefinition.getDefaultValue()

getDescription

public java.lang.String getDescription()
Description copied from interface: PropertyDefinition
Get the description of this property.

Specified by:
getDescription in interface PropertyDefinition
Returns:
the description for this property
See Also:
PropertyDefinition.getDescription()

getDisplayName

public java.lang.String getDisplayName()
Description copied from interface: PropertyDefinition
Get the localized display name of this property.

Specified by:
getDisplayName in interface PropertyDefinition
Returns:
the displayable name for this property
See Also:
PropertyDefinition.getDisplayName()

getPropertyTypeClassName

public java.lang.String getPropertyTypeClassName()
Description copied from interface: PropertyDefinition
Get the name of the java class that best represents the property type.

Specified by:
getPropertyTypeClassName in interface PropertyDefinition
Returns:
the name of the java class that best represents the property type.
See Also:
PropertyDefinition.getPropertyTypeClassName()

getRequiresRestart

public PropertyDefinition.RestartType getRequiresRestart()
Description copied from interface: PropertyDefinition
Get whether this property requires the system to be restarted before it takes effect.

Specified by:
getRequiresRestart in interface PropertyDefinition
Returns:
true if this property requires the system to be restarted before it takes effect.
See Also:
PropertyDefinition.getRequiresRestart()

isAdvanced

public boolean isAdvanced()
Description copied from interface: PropertyDefinition
The "expert" flag is used to distinguish between features that are intended for expert users from those that are intended for normal users.

Specified by:
isAdvanced in interface PropertyDefinition
Returns:
true if this property is to be marked with the expert flag, or false otherwise.
Since:
4.3
See Also:
org.teiid.adminapi.PropertyDefinition#isExpert()

isMasked

public boolean isMasked()
Description copied from interface: PropertyDefinition
The "masked" flag is used to tell whether the value should be masked when displayed to users.

Specified by:
isMasked in interface PropertyDefinition
Returns:
true if this property value is to be masked, or false otherwise.
See Also:
PropertyDefinition.isMasked()

isModifiable

public boolean isModifiable()
Description copied from interface: PropertyDefinition
The modifiable flag is used to identify features that may not be changed once they are set.

Specified by:
isModifiable in interface PropertyDefinition
Returns:
true if this property is marked with the modifyable flag, or false otherwise.
See Also:
PropertyDefinition.isModifiable()

isRequired

public boolean isRequired()
Description copied from interface: PropertyDefinition
The "required" flag is used to identify features that require at least one value (possibly a default value) by the consumer of the property. Whether a property definition is required or not can be determined entirely from the multiplicity: if the multiplicity includes '0', then the property is not required.

Whether a property is required by the consumer is unrelated to whether there is a default value, which only simplifies the task of the property provider. A property may be required, meaning it must have at least one value, but that same property definition may or may not have a default. The combination of required and whether it has a default will determine whether the user must supply a value.

Specified by:
isRequired in interface PropertyDefinition
Returns:
true if this property requires at least one value.
See Also:
PropertyDefinition.isRequired()

setAllowedValues

public void setAllowedValues(java.util.Collection allowedValues)
Parameters:
allowedValues - The allowedValues to set.

setDefaultValue

public void setDefaultValue(java.io.Serializable defaultValue)
Parameters:
defaultValue - The defaultValue to set.

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - The description to set.

setDisplayName

public void setDisplayName(java.lang.String displayName)
Parameters:
displayName - The displayName to set.

setAdvanced

public void setAdvanced(boolean expert)
Parameters:
expert - The value of expert to set.

setMasked

public void setMasked(boolean masked)
Parameters:
masked - The value of masked to set.

setModifiable

public void setModifiable(boolean modifiable)
Parameters:
modifiable - The value of modifiable to set.

setPropertyTypeClassName

public void setPropertyTypeClassName(java.lang.String propertyTypeClassName)
Parameters:
propertyTypeClassName - The propertyTypeName to set.

setRequired

public void setRequired(boolean required)
Parameters:
required - The value of required to set.

setRequiresRestart

public void setRequiresRestart(PropertyDefinition.RestartType requiresRestart)
Parameters:
requiresRestart - The value of requiresRestart to set.

isConstrainedToAllowedValues

public boolean isConstrainedToAllowedValues()
Description copied from interface: PropertyDefinition
Return whether the value or values for this property are constrained to be only those in the AllowedValues list.

Specified by:
isConstrainedToAllowedValues in interface PropertyDefinition
Returns:
true if this property's value must be with the list of AllowedValues.
See Also:
PropertyDefinition.getAllowedValues()


Copyright © 2010. All Rights Reserved.