public class NestedRouteDeclarer extends Declarer<NestedRouteDeclaration> implements HasModelProperties<NestedRouteDeclarer>, HasNestedComponentsDeclarer, HasParametersDeclarer
NestedComponentDeclaration
through a fluent API.
Keep in mind that Routes are required to have at least one child component,
which translate to almost always having to invoke the withChain()
method of this declarer.
declaration
Constructor and Description |
---|
NestedRouteDeclarer(NestedRouteDeclaration declaration)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
NestedRouteDeclarer |
describedAs(String description)
Adds a description
|
NestedRouteDeclaration |
getDeclaration() |
ParameterGroupDeclarer |
onDefaultParameterGroup()
Provides the default
ParameterGroupDeclarer . |
ParameterGroupDeclarer |
onParameterGroup(String name)
Provides a
ParameterGroupDeclarer for adding parameters
into a group of the given name . |
NestedChainDeclarer |
withChain()
Adds a component of the given
name |
NestedChainDeclarer |
withChain(String chainName)
Adds a component of the given
name |
NestedComponentDeclarer |
withComponent(String nestedComponentName)
Adds a component of the given
name |
NestedRouteDeclarer |
withMaxOccurs(Integer maxOccurs)
Sets the maximum amount of times that this route can be present on the owning
component
|
NestedRouteDeclarer |
withMinOccurs(int minOccurs)
Sets the minimum amount of times that this route can be present on the owning
component
|
NestedRouteDeclarer |
withModelProperty(ModelProperty modelProperty)
Adds the given
modelProperty |
NestedComponentDeclarer |
withOptionalComponent(String nestedComponentName)
Adds a component of the given
name |
public NestedRouteDeclarer(NestedRouteDeclaration declaration)
declaration
- the NestedComponentDeclaration
to be configuredpublic NestedRouteDeclarer withMinOccurs(int minOccurs)
minOccurs
- a value equal or greater than zerothis
declarerpublic NestedRouteDeclarer withMaxOccurs(Integer maxOccurs)
maxOccurs
- a value greater or equal than zerothis
declarerpublic NestedRouteDeclaration getDeclaration()
getDeclaration
in class Declarer<NestedRouteDeclaration>
public NestedComponentDeclarer withOptionalComponent(String nestedComponentName)
name
withOptionalComponent
in interface HasNestedComponentsDeclarer
nestedComponentName
- a non blank nameNestedComponentDeclarer
which allows describing the created componentpublic NestedComponentDeclarer withComponent(String nestedComponentName)
name
withComponent
in interface HasNestedComponentsDeclarer
nestedComponentName
- a non blank nameNestedComponentDeclarer
which allows describing the created componentpublic NestedChainDeclarer withChain()
name
withChain
in interface HasNestedComponentsDeclarer
NestedComponentDeclarer
which allows describing the created componentpublic NestedChainDeclarer withChain(String chainName)
name
withChain
in interface HasNestedComponentsDeclarer
chainName
- a non blank nameNestedComponentDeclarer
which allows describing the created componentpublic ParameterGroupDeclarer onParameterGroup(String name)
ParameterGroupDeclarer
for adding parameters
into a group of the given name
. Use this if you wish to
declare a parameter which should belong to a specific group.onParameterGroup
in interface HasParametersDeclarer
name
- the name of the group to declareParameterGroupDeclarer
public ParameterGroupDeclarer onDefaultParameterGroup()
ParameterGroupDeclarer
. Use this if you wish
to add a parameter which shouldn't belong to any specific group.onDefaultParameterGroup
in interface HasParametersDeclarer
ParameterGroupDeclarer
public NestedRouteDeclarer withModelProperty(ModelProperty modelProperty)
HasModelProperties
modelProperty
withModelProperty
in interface HasModelProperties<NestedRouteDeclarer>
modelProperty
- a ModelProperty
this
declarerpublic NestedRouteDeclarer describedAs(String description)
description
- a descriptionthis
declarerCopyright © 2018. All rights reserved.