Package org.apache.camel.model
Class OptionalIdentifiedDefinition<T extends OptionalIdentifiedDefinition<T>>
- java.lang.Object
-
- org.apache.camel.model.OptionalIdentifiedDefinition<T>
-
- All Implemented Interfaces:
org.apache.camel.NamedNode
,org.apache.camel.spi.HasId
,org.apache.camel.spi.IdAware
- Direct Known Subclasses:
FromDefinition
,InputTypeDefinition
,OutputTypeDefinition
,ProcessorDefinition
,RestBindingDefinition
,RestDefinition
,RestsDefinition
,RoutesDefinition
,RouteTemplateDefinition
,RouteTemplatesDefinition
,ThreadPoolProfileDefinition
,VerbDefinition
public abstract class OptionalIdentifiedDefinition<T extends OptionalIdentifiedDefinition<T>> extends Object implements org.apache.camel.NamedNode, org.apache.camel.spi.IdAware
Allows an element to have an optional ID specified
-
-
Constructor Summary
Constructors Constructor Description OptionalIdentifiedDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
description(String text)
Sets the description of this nodeT
description(String id, String text, String lang)
Sets the description of this nodeBoolean
getCustomId()
DescriptionDefinition
getDescription()
String
getDescriptionText()
Returns the description text or null if there is no description text associated with this nodeString
getId()
org.apache.camel.NamedNode
getParent()
boolean
hasCustomIdAssigned()
Returns whether a custom id has been assignedT
id(String id)
Sets the id of this node.String
idOrCreate(org.apache.camel.spi.NodeIdFactory factory)
Gets the node id, creating one if not already set.void
setCustomId(Boolean customId)
Whether the node id was explicit set, or was auto generated by Camel.void
setDescription(DescriptionDefinition description)
Sets the description of this nodevoid
setGeneratedId(String id)
void
setId(String id)
Sets the id of this node
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getId
in interfaceorg.apache.camel.spi.HasId
- Specified by:
getId
in interfaceorg.apache.camel.NamedNode
-
setId
@Metadata(description="The id of this node") public void setId(String id)
Sets the id of this node- Specified by:
setId
in interfaceorg.apache.camel.spi.IdAware
-
setGeneratedId
public void setGeneratedId(String id)
- Specified by:
setGeneratedId
in interfaceorg.apache.camel.spi.IdAware
-
getDescription
public DescriptionDefinition getDescription()
-
setDescription
@Metadata(description="The description for this node") public void setDescription(DescriptionDefinition description)
Sets the description of this node- Parameters:
description
- sets the text description, use null to not set a text
-
getParent
public org.apache.camel.NamedNode getParent()
- Specified by:
getParent
in interfaceorg.apache.camel.NamedNode
-
description
public T description(String text)
Sets the description of this node- Parameters:
text
- sets the text description, use null to not set a text- Returns:
- the builder
-
description
public T description(String id, String text, String lang)
Sets the description of this node- Parameters:
id
- sets the id, use null to not set an idtext
- sets the text description, use null to not set a textlang
- sets the language for the description, use null to not set a language- Returns:
- the builder
-
id
public T id(String id)
Sets the id of this node. Important: If you want to set the id of the route, then you must use routeId(String) instead.- Parameters:
id
- the id- Returns:
- the builder
-
idOrCreate
public String idOrCreate(org.apache.camel.spi.NodeIdFactory factory)
Gets the node id, creating one if not already set.
-
getCustomId
public Boolean getCustomId()
-
setCustomId
public void setCustomId(Boolean customId)
Whether the node id was explicit set, or was auto generated by Camel.
-
hasCustomIdAssigned
public boolean hasCustomIdAssigned()
Returns whether a custom id has been assigned
-
getDescriptionText
public String getDescriptionText()
Returns the description text or null if there is no description text associated with this node- Specified by:
getDescriptionText
in interfaceorg.apache.camel.NamedNode
-
-