Class PropertyMetadata<T>
java.lang.Object
org.apache.sling.caconfig.spi.metadata.PropertyMetadata<T>
- Type Parameters:
T- Property value type
Defines a configuration property.
-
Field Summary
FieldsModifier and TypeFieldDescriptionSet with all types support for property metadata (not including nested configurations). -
Constructor Summary
ConstructorsConstructorDescriptionPropertyMetadata(@NotNull String name, @NotNull Class<T> type) PropertyMetadata(@NotNull String name, T defaultValue) -
Method Summary
Modifier and TypeMethodDescriptionconfigurationMetadata(ConfigurationMetadata configurationMetadata) defaultValue(T value) description(String description) getLabel()@NotNull StringgetName()intgetOrder()getType()booleanorder(int value) properties(Map<String, String> properties) toString()
-
Field Details
-
SUPPORTED_TYPES
Set with all types support for property metadata (not including nested configurations).
-
-
Constructor Details
-
PropertyMetadata
- Parameters:
name- Property nametype- Property type
-
PropertyMetadata
- Parameters:
name- Property namedefaultValue- Default value (also defines property type)
-
-
Method Details
-
getType
- Returns:
- Parameter type
-
getDefaultValue
- Returns:
- Default value if parameter is not set for configuration
-
defaultValue
- Parameters:
value- Default value if parameter is not set for configuration- Returns:
- this;
-
getOrder
public int getOrder()- Returns:
- Number to control property order in configuration editor.
-
order
- Parameters:
value- Number to control property order in configuration editor.- Returns:
- this
-
getConfigurationMetadata
- Returns:
- Metadata for nested configuration
-
configurationMetadata
- Parameters:
configurationMetadata- Metadata for nested configuration- Returns:
- this;
-
isNestedConfiguration
public boolean isNestedConfiguration()- Returns:
- true if this property describes a nested configuration. In this case it is ensured configuration metadata is present, and the type is ConfigurationMetadata or ConfigurationMetadata[].
-
toString
-
getName
- Returns:
- Parameter name
-
getLabel
- Returns:
- Label
-
label
- Parameters:
label- Label- Returns:
- this;
-
getDescription
- Returns:
- Description
-
description
- Parameters:
description- Description- Returns:
- this;
-
getProperties
- Returns:
- Further properties for documentation and configuration of behavior in configuration editor.
-
properties
- Parameters:
properties- Further properties for documentation and configuration of behavior in configuration editor.- Returns:
- this;
-