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.CamelContextAware,org.apache.camel.LineNumberAware,org.apache.camel.NamedNode,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.spi.IdAware
- Direct Known Subclasses:
FromDefinition,InputTypeDefinition,OutputTypeDefinition,ProcessorDefinition,RestBindingDefinition,RestDefinition,RestsDefinition,RouteConfigurationDefinition,RoutesDefinition,RouteTemplateDefinition,RouteTemplatesDefinition,TemplatedRoutesDefinition,ThreadPoolProfileDefinition,VerbDefinition
public abstract class OptionalIdentifiedDefinition<T extends OptionalIdentifiedDefinition<T>>
extends Object
implements org.apache.camel.NamedNode, org.apache.camel.spi.IdAware, org.apache.camel.CamelContextAware
Allows an element to have an optional ID specified
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondescription(String description) Sets the description of this nodeorg.apache.camel.CamelContextReturns the description text or null if there is no description text associated with this nodegetId()intorg.apache.camel.NamedNodebooleanReturns whether a custom id has been assignedSets the id of this node.idOrCreate(org.apache.camel.spi.NodeIdFactory factory) Gets the node id, creating one if not already set.voidsetCamelContext(org.apache.camel.CamelContext camelContext) voidsetCustomId(Boolean customId) Whether the node id was explicit set, or was auto generated by Camel.voidsetDescription(String description) Sets the description of this nodevoidsetGeneratedId(String id) voidSets the id of this nodevoidsetLineNumber(int lineNumber) voidsetLocation(String location) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.NamedNode
getLabel, getShortName
-
Constructor Details
-
OptionalIdentifiedDefinition
public OptionalIdentifiedDefinition()
-
-
Method Details
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()- Specified by:
getCamelContextin interfaceorg.apache.camel.spi.HasCamelContext
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext) - Specified by:
setCamelContextin interfaceorg.apache.camel.CamelContextAware
-
getId
- Specified by:
getIdin interfaceorg.apache.camel.spi.HasId- Specified by:
getIdin interfaceorg.apache.camel.NamedNode
-
setId
Sets the id of this node- Specified by:
setIdin interfaceorg.apache.camel.spi.IdAware
-
setGeneratedId
- Specified by:
setGeneratedIdin interfaceorg.apache.camel.spi.IdAware
-
getDescription
-
setDescription
@Metadata(description="The description for this node") public void setDescription(String 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:
getParentin interfaceorg.apache.camel.NamedNode
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumberin interfaceorg.apache.camel.LineNumberAware
-
setLineNumber
public void setLineNumber(int lineNumber) - Specified by:
setLineNumberin interfaceorg.apache.camel.LineNumberAware
-
getLocation
- Specified by:
getLocationin interfaceorg.apache.camel.LineNumberAware
-
setLocation
- Specified by:
setLocationin interfaceorg.apache.camel.LineNumberAware
-
description
Sets the description of this node- Parameters:
description- sets the text description, use null to not set a text- Returns:
- the builder
-
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
Gets the node id, creating one if not already set. -
getCustomId
-
setCustomId
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
Returns the description text or null if there is no description text associated with this node- Specified by:
getDescriptionTextin interfaceorg.apache.camel.NamedNode
-