public final class ImmutableParameterModel extends AbstractNamedImmutableModel implements ParameterModel
ParameterModel
description, modelProperties
Constructor and Description |
---|
ImmutableParameterModel(String name,
String description,
MetadataType type,
boolean hasDynamicType,
boolean required,
boolean isConfigOverride,
ExpressionSupport expressionSupport,
Object defaultValue,
ParameterRole role,
ParameterDslConfiguration dslConfiguration,
DisplayModel displayModel,
LayoutModel layoutModel,
ValueProviderModel valueProviderModel,
List<StereotypeModel> allowedStereotypeModels,
Set<ModelProperty> modelProperties)
Creates a new instance with the given state
|
Modifier and Type | Method and Description |
---|---|
List<StereotypeModel> |
getAllowedStereotypes() |
Object |
getDefaultValue()
The default value for this parameter.
|
ParameterDslConfiguration |
getDslConfiguration() |
ExpressionSupport |
getExpressionSupport()
The level of support
this parameter has for expressions |
Optional<LayoutModel> |
getLayoutModel()
The value of
LayoutModel.getOrder() is to be consider relative to the owning
ParameterGroupModel |
ParameterRole |
getRole() |
MetadataType |
getType()
Returns the
MetadataType of the Typed component. |
Optional<ValueProviderModel> |
getValueProviderModel() |
boolean |
hasDynamicType()
Returns
true if the type of the Component is
of dynamic kind, and has to be discovered during design time using
the MetadataService service. |
boolean |
isOverrideFromConfig()
|
boolean |
isRequired()
Whether or not this parameter is required.
|
checkArgument, equals, getDisplayModel, getName, hashCode, toString
copy, copy, getDescription, getModelProperties, getModelProperty
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getName
getDescription
getModelProperties, getModelProperty
getDisplayModel
public ImmutableParameterModel(String name, String description, MetadataType type, boolean hasDynamicType, boolean required, boolean isConfigOverride, ExpressionSupport expressionSupport, Object defaultValue, ParameterRole role, ParameterDslConfiguration dslConfiguration, DisplayModel displayModel, LayoutModel layoutModel, ValueProviderModel valueProviderModel, List<StereotypeModel> allowedStereotypeModels, Set<ModelProperty> modelProperties)
name
- the parameter's name. Cannot be blank.description
- the parameter's descriptiontype
- the parameter's MetadataType
. Cannot be null
hasDynamicType
- if the given type
is of dynamic kind and has to be discovered during design timerequired
- whether this parameter is required or notexpressionSupport
- the ExpressionSupport
that applies to this
ParameterModel
defaultValue
- this parameter's default valuerole
- this parameter's purposedslConfiguration
- a model which describes the DSL semantics for this parameterdisplayModel
- a model which contains directive about how the parameter is displayed in the UIlayoutModel
- a model which contains directives about the parameter's layout in the UIallowedStereotypeModels
- A Set
with the stereotypes of the allowed valuesmodelProperties
- A Set
of custom properties which extend this modelIllegalArgumentException
- if required
is true
and defaultValue
is not null
at the same timepublic MetadataType getType()
MetadataType
of the Typed
component.getType
in interface Typed
null
MetadataType
public boolean hasDynamicType()
Typed
true
if the type of the Component
is
of dynamic kind, and has to be discovered during design time using
the MetadataService
service.hasDynamicType
in interface Typed
true
if this
element type is of dynamic kindpublic boolean isRequired()
ParameterModel.getDefaultValue()
in the sense that a required parameter cannot have a default
value. At the same time, if the parameter has a default value, then it makes no sense
to consider it as requiredisRequired
in interface ParameterModel
public boolean isOverrideFromConfig()
this
parameter
is bound to a ParameterModel
of the same name
and type
that exists in the config
associated to the
container
of this
parameter
.
true
, the parameter
will be injected with the same value of the
bound parameter
of the config
that's been associated to the execution.isOverrideFromConfig
in interface ParameterModel
public ExpressionSupport getExpressionSupport()
this
parameter has for expressionsgetExpressionSupport
in interface ParameterModel
ExpressionSupport
public Object getDefaultValue()
ParameterModel.getExpressionSupport()
returns ExpressionSupport.REQUIRED
or ExpressionSupport.SUPPORTED
.
This method is exclusive with ParameterModel.isRequired()
. Check that method's comments for
more information on the semantics of this two methods.
getDefaultValue
in interface ParameterModel
public ParameterDslConfiguration getDslConfiguration()
getDslConfiguration
in interface ParameterModel
ParameterDslConfiguration
which describes the language which
allows configuring this parameterpublic ParameterRole getRole()
getRole
in interface ParameterModel
ParameterModel
's rolepublic Optional<LayoutModel> getLayoutModel()
LayoutModel.getOrder()
is to be consider relative to the owning
ParameterGroupModel
getLayoutModel
in interface HasLayoutModel
getLayoutModel
in interface ParameterModel
Optional
LayoutModel
which contains directives
about how this parameter should be shown in the UIpublic List<StereotypeModel> getAllowedStereotypes()
getAllowedStereotypes
in interface ParameterModel
List
of StereotypeModel
s that this ParameterModel
should accept values of.public Optional<ValueProviderModel> getValueProviderModel()
getValueProviderModel
in interface ParameterModel
ValueProviderModel
to communicate if the this parameter model is capable to provide values
.
an Optional.empty()
if there is no model associate to this parameter.Copyright © 2018. All rights reserved.