Class ConfigurationMetadataProperty
- java.lang.Object
- org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty
- All Implemented Interfaces:
Serializable
public class ConfigurationMetadataProperty extends Object implements Serializable
Define a configuration property. Each property is fully identified by itsid
which is composed of a namespace prefix (thegroup id
), if any and thename
of the property.- Since:
- 1.3.0
- See Also:
- Serialized Form
Constructor Summary
Constructors Constructor Description ConfigurationMetadataProperty()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getDefaultValue()
The default value, if any.Deprecation
getDeprecation()
TheDeprecation
for this property, if any.String
getDescription()
A description of the property, if any.Hints
getHints()
Return the hints of this item.String
getId()
The full identifier of the property, in lowercase dashed form (e.g.String
getName()
The name of the property, in lowercase dashed form (e.g.String
getShortDescription()
A single-line, single-sentence description of this property, if any.String
getType()
The class name of the data type of the property.boolean
isDeprecated()
Specify if the property is deprecated.void
setDefaultValue(Object defaultValue)
void
setDeprecation(Deprecation deprecation)
void
setDescription(String description)
void
setId(String id)
void
setName(String name)
void
setShortDescription(String shortDescription)
void
setType(String type)
Constructor Detail
ConfigurationMetadataProperty
public ConfigurationMetadataProperty()
Method Detail
getId
public String getId()
The full identifier of the property, in lowercase dashed form (e.g. my.group.simple-property)- Returns:
- the property id
getName
public String getName()
The name of the property, in lowercase dashed form (e.g. simple-property). If this item does not belong to any group, the id is returned.- Returns:
- the property name
getType
public String getType()
The class name of the data type of the property. For example,java.lang.String
.For consistency, the type of a primitive is specified using its wrapper counterpart, i.e.
boolean
becomesjava.lang.Boolean
. If the type holds generic information, these are provided as well, i.e. aHashMap
of String to Integer would be defined asjava.util.HashMap <java.lang.String,java.lang.Integer>
.Note that this class may be a complex type that gets converted from a String as values are bound.
- Returns:
- the property type
getDescription
public String getDescription()
A description of the property, if any. Can be multi-lines.- Returns:
- the property description
- See Also:
getShortDescription()
setDescription
public void setDescription(String description)
getShortDescription
public String getShortDescription()
A single-line, single-sentence description of this property, if any.- Returns:
- the property short description
- See Also:
getDescription()
setShortDescription
public void setShortDescription(String shortDescription)
getDefaultValue
public Object getDefaultValue()
The default value, if any.- Returns:
- the default value
setDefaultValue
public void setDefaultValue(Object defaultValue)
getDeprecation
public Deprecation getDeprecation()
TheDeprecation
for this property, if any.- Returns:
- the deprecation
- See Also:
isDeprecated()
setDeprecation
public void setDeprecation(Deprecation deprecation)
isDeprecated
public boolean isDeprecated()
Specify if the property is deprecated.- Returns:
- if the property is deprecated
- See Also:
getDeprecation()