public final class LocalTypeDescriptor extends TypeDescriptor
LocalTypePropertyDescriptor.
Both connected system and integration templates must have at least one local type at the root of their ConfigurationDescriptor. This root type represents the top level properties for that object.
| Modifier and Type | Class and Description |
|---|---|
static class |
LocalTypeDescriptor.Builder
Builder for the
LocalTypeDescriptor class |
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
static String |
PROPERTIES |
| Modifier and Type | Method and Description |
|---|---|
static LocalTypeDescriptor.Builder |
builder()
Not Needed for Partner Preview
Builder for the
LocalTypeDescriptor class |
void |
clearProperties()
Removes all properties
|
List<PropertyDescriptor> |
getProperties()
The list of properties that compose the local type.
|
Optional<PropertyDescriptor> |
getProperty(String key)
Gets a property by its key
|
List<String> |
getPropertyKeys()
Keys of the
PropertyDescriptors |
void |
removeProperties(Predicate<PropertyDescriptor> filter)
Removes all properties that meet the supplied condition
For Example:
myType.removeProperties(p -> "PROP_TO_REMOVE".equals(p.getKey()))
|
void |
updateProperties(Predicate<PropertyDescriptor> filter,
UnaryOperator<PropertyDescriptorBuilder> update)
Iterates through the list of properties, applying the operator to each property that meets the filter condition.
|
void |
updateProperties(UnaryOperator<PropertyDescriptorBuilder> update)
Iterates through the list of properties, applying the operator to each.
|
getNamepublic static final String NAME
public static final String PROPERTIES
public List<PropertyDescriptor> getProperties()
public Optional<PropertyDescriptor> getProperty(String key)
key - Key of the PropertyDescriptor to retrievePropertyDescriptor with the provided key, if it exists. Otherwise, returns Optional.empty().public List<String> getPropertyKeys()
PropertyDescriptorspublic void updateProperties(UnaryOperator<PropertyDescriptorBuilder> update)
For Example:
myType.updateProperties(p -> p.isReadOnly(true))
update - A UnaryOperator to be applied to each PropertyDescriptorpublic void updateProperties(Predicate<PropertyDescriptor> filter, UnaryOperator<PropertyDescriptorBuilder> update)
For Example:
myType.updateProperties(p -> "PROP_TO_UPDATE".equals(p.getKey()), p -> p.isReadOnly(true))
filter - Predicate that determines which PropertyDescriptor to apply the update function toupdate - A UnaryOperator to apply to each PropertyDescriptor that meets the filter conditionpublic void removeProperties(Predicate<PropertyDescriptor> filter)
For Example:
myType.removeProperties(p -> "PROP_TO_REMOVE".equals(p.getKey()))
filter - Predicate to determine which properties to remove. Properties that return true when supplied to this predicate will be removed.public void clearProperties()
public static LocalTypeDescriptor.Builder builder()
Builder for the LocalTypeDescriptor class
Copyright © 2018-present Appian Corporation. All Rights Reserved.