Class Node
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.aws.awsprototypingsdk.cdkgraph.BaseEntity
-
- software.aws.awsprototypingsdk.cdkgraph.Node
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,ISerializableEntity,ISerializableNode
- Direct Known Subclasses:
AppNode,CfnResourceNode,OutputNode,ParameterNode,ResourceNode,RootNode,StackNode,StageNode
@Generated(value="jsii-pacmak/1.82.0 (build 2d2ddd7)", date="2023-08-24T23:07:44.455Z") @Stability(Experimental) public class Node extends BaseEntity implements ISerializableNode
(experimental) Node class is the base definition of node entities in the graph, as in standard graph theory.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface software.aws.awsprototypingsdk.cdkgraph.ISerializableEntity
ISerializableEntity.Jsii$Default
-
Nested classes/interfaces inherited from interface software.aws.awsprototypingsdk.cdkgraph.ISerializableNode
ISerializableNode.Jsii$Default, ISerializableNode.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedNode(software.amazon.jsii.JsiiObjectRef objRef)Node(INodeProps props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(Node node)(experimental) Add child node.voidaddLink(Edge edge)(experimental) Add link to another node.voidaddReverseLink(Edge edge)(experimental) Add link from another node.BooleandoesDependOn(Node node)(experimental) Indicates if this node depends on another node.BooleandoesReference(Node node)(experimental) Indicates if this node references another node.Nodefind(INodePredicate predicate)(experimental) Recursively find the nearest sub-node matching predicate.List<Node>findAll()(experimental) Return this construct and all of its sub-nodes in the given order.List<Node>findAll(IFindNodeOptions options)(experimental) Return this construct and all of its sub-nodes in the given order.List<Edge>findAllLinks()(experimental) Return all direct links of this node and that of all sub-nodes.List<Edge>findAllLinks(IFindEdgeOptions options)(experimental) Return all direct links of this node and that of all sub-nodes.NodefindAncestor(INodePredicate predicate)(experimental) Find nearest ancestor of this node matching given predicate.NodefindAncestor(INodePredicate predicate, Number max)(experimental) Find nearest ancestor of this node matching given predicate.NodefindChild(String id)(experimental) Find child with given id.EdgefindLink(IEdgePredicate predicate)(experimental) Find link of this node based on predicate.EdgefindLink(IEdgePredicate predicate, Boolean reverse)(experimental) Find link of this node based on predicate.EdgefindLink(IEdgePredicate predicate, Boolean reverse, Boolean follow)(experimental) Find link of this node based on predicate.EdgefindLink(IEdgePredicate predicate, Boolean reverse, Boolean follow, Boolean direct)(experimental) Find link of this node based on predicate.List<Edge>findLinks(IEdgePredicate predicate)(experimental) Find all links of this node based on predicate.List<Edge>findLinks(IEdgePredicate predicate, Boolean reverse)(experimental) Find all links of this node based on predicate.List<Edge>findLinks(IEdgePredicate predicate, Boolean reverse, Boolean follow)(experimental) Find all links of this node based on predicate.List<Edge>findLinks(IEdgePredicate predicate, Boolean reverse, Boolean follow, Boolean direct)(experimental) Find all links of this node based on predicate.BooleangetAllowDestructiveMutations()(experimental) Indicates if this node allows destructive mutations.ObjectgetCfnProp(String key)(experimental) Get specific CloudFormation property.PlainObjectgetCfnProps()(experimental) Gets CloudFormation properties for this node.StringgetCfnType()(experimental) Get the CloudFormation resource type for this node.NodegetChild(String id)(experimental) Get child node with given id.List<Node>getChildren()(experimental) Get all direct child nodes.ConstructInfogetConstructInfo()(experimental) Synthesized construct information defining jii resolution data.StringgetConstructInfoFqn()(experimental) Synthesized construct information defining jii resolution data.List<Node>getDependedOnBy()(experimental) Get list of Nodes that depend on this node.List<Node>getDependencies()(experimental) Get list of Nodes that this node depends on.List<Dependency>getDependencyLinks()(experimental) Gets list ofDependencylinks (edges) where this node is the **source**.NumbergetDepth()(experimental) Indicates the depth of the node relative to root (0).StringgetId()(experimental) Node id, which is only unique within parent scope.BooleangetIsAsset()(experimental) Indicates if this node is considered aFlagEnum.ASSET.BooleangetIsCfnFqn()(experimental) Indicates if node ConstructInfoFqn denotes aaws-cdk-lib.*.Cfn*construct.BooleangetIsCluster()(experimental) Indicates if this node is considered aFlagEnum.CLUSTER.BooleangetIsCustomResource()(experimental) Indicates if node is a Custom Resource.BooleangetIsExtraneous()(experimental) Indicates if this node is considered aFlagEnum.EXTRANEOUSnode or determined to be extraneous: - Clusters that contain no children.BooleangetIsGraphContainer()(experimental) Indicates if this node is considered aFlagEnum.GRAPH_CONTAINER.BooleangetIsLeaf()(experimental) Indicates if this node is a leaf node, which means it does not have children.BooleangetIsTopLevel()(experimental) Indicates if node is direct child of the graph root node.List<List<Object>>getLinkChains()(experimental) Resolve all link chains.List<List<Object>>getLinkChains(Boolean reverse)(experimental) Resolve all link chains.List<Edge>getLinks()(experimental) Gets all links (edges) in which this node is the source.StringgetLogicalId()(experimental) Logical id of the node, which is only unique within containing stack.NodegetNearestAncestor(Node node)(experimental) Gets the nearest common ancestor shared between this node and another node.NodeTypeEnumgetNodeType()(experimental) Type of node.NodegetParent()(experimental) Parent node.StringgetPath()(experimental) Path of the node.List<Node>getReferencedBy()(experimental) Get list of Nodes that reference this node.List<Reference>getReferenceLinks()(experimental) Gets list ofReferencelinks (edges) where this node is the **source**.List<Node>getReferences()(experimental) Get list of Nodes that this node references.List<Dependency>getReverseDependencyLinks()(experimental) Gets list ofDependencylinks (edges) where this node is the **target**.List<Edge>getReverseLinks()(experimental) Gets all links (edges) in which this node is the target.List<Reference>getReverseReferenceLinks()(experimental) Gets list ofReferencelinks (edges) where this node is the **target**.StackNodegetRootStack()(experimental) Get root stack.List<Node>getScopes()(experimental) Gets descending ordered list of ancestors from the root.List<Node>getSiblings()(experimental) Get list of siblings of this node.StackNodegetStack()(experimental) Stack the node is contained in.BooleanisAncestor(Node ancestor)(experimental) Indicates if a specific node is an ancestor of this node.BooleanisChild(Node node)(experimental) Indicates if specific node is a child of this node.voidmutateCollapse()(experimental) Collapses all sub-nodes of this node into this node.NodemutateCollapseTo(Node ancestor)(experimental) Collapses this node into an ancestor.NodemutateCollapseToParent()(experimental) Collapses this node into it's parent node.voidmutateDestroy()(experimental) Destroys this node by removing all references and removing this node from the store.voidmutateDestroy(Boolean strict)(experimental) Destroys this node by removing all references and removing this node from the store.voidmutateHoist(Node newParent)(experimental) Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.voidmutateMove(Node newParent)(experimental) Move this node into a new parent node.BooleanmutateRemoveChild(Node node)(experimental) Remove a child node from this node.BooleanmutateRemoveLink(Edge link)(experimental) Remove a link from this node.BooleanmutateRemoveReverseLink(Edge link)(experimental) Remove a link to this node.voidmutateUncluster()(experimental) Hoist all children to parent and collapse node to parent.StringtoString()(experimental) Get string representation of this node.-
Methods inherited from class software.aws.awsprototypingsdk.cdkgraph.BaseEntity
addAttribute, addFlag, addMetadata, addTag, applyData, applyData, applyData, findMetadata, getAttribute, getAttributes, getFlags, getIsDestroyed, getIsMutated, getMetadata, getStore, getTag, getTags, getUuid, hasAttribute, hasAttribute, hasFlag, hasMetadata, hasTag, hasTag, setAttribute, setTag
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
Node
protected Node(software.amazon.jsii.JsiiObjectRef objRef)
-
Node
protected Node(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
Node
@Stability(Experimental) public Node(@NotNull INodeProps props)- Parameters:
props- This parameter is required.
-
-
Method Detail
-
addChild
@Stability(Experimental) public void addChild(@NotNull Node node)(experimental) Add child node.- Parameters:
node- This parameter is required.
-
addLink
@Stability(Experimental) public void addLink(@NotNull Edge edge)(experimental) Add link to another node.- Parameters:
edge- This parameter is required.
-
addReverseLink
@Stability(Experimental) public void addReverseLink(@NotNull Edge edge)(experimental) Add link from another node.- Parameters:
edge- This parameter is required.
-
doesDependOn
@Stability(Experimental) @NotNull public Boolean doesDependOn(@NotNull Node node)
(experimental) Indicates if this node depends on another node.- Parameters:
node- This parameter is required.
-
doesReference
@Stability(Experimental) @NotNull public Boolean doesReference(@NotNull Node node)
(experimental) Indicates if this node references another node.- Parameters:
node- This parameter is required.
-
find
@Stability(Experimental) @Nullable public Node find(@NotNull INodePredicate predicate)
(experimental) Recursively find the nearest sub-node matching predicate.- Parameters:
predicate- This parameter is required.
-
findAll
@Stability(Experimental) @NotNull public List<Node> findAll(@Nullable IFindNodeOptions options)
(experimental) Return this construct and all of its sub-nodes in the given order.Optionally filter nodes based on predicate.
- Parameters:
options-
-
findAll
@Stability(Experimental) @NotNull public List<Node> findAll()
(experimental) Return this construct and all of its sub-nodes in the given order.Optionally filter nodes based on predicate.
-
findAllLinks
@Stability(Experimental) @NotNull public List<Edge> findAllLinks(@Nullable IFindEdgeOptions options)
(experimental) Return all direct links of this node and that of all sub-nodes.Optionally filter links based on predicate.
- Parameters:
options-
-
findAllLinks
@Stability(Experimental) @NotNull public List<Edge> findAllLinks()
(experimental) Return all direct links of this node and that of all sub-nodes.Optionally filter links based on predicate.
-
findAncestor
@Stability(Experimental) @Nullable public Node findAncestor(@NotNull INodePredicate predicate, @Nullable Number max)
(experimental) Find nearest ancestor of this node matching given predicate.- Parameters:
predicate-- Predicate to match ancestor.
max-
-
findAncestor
@Stability(Experimental) @Nullable public Node findAncestor(@NotNull INodePredicate predicate)
(experimental) Find nearest ancestor of this node matching given predicate.- Parameters:
predicate-- Predicate to match ancestor.
-
findChild
@Stability(Experimental) @Nullable public Node findChild(@NotNull String id)
(experimental) Find child with given id.Similar to
findbut does not throw error if no child found.- Parameters:
id- This parameter is required.
-
findLink
@Stability(Experimental) @Nullable public Edge findLink(@NotNull IEdgePredicate predicate, @Nullable Boolean reverse, @Nullable Boolean follow, @Nullable Boolean direct)
(experimental) Find link of this node based on predicate.By default this will follow link chains to evaluate the predicate against and return the matching direct link of this node.
- Parameters:
predicate- Edge predicate function to match edge. This parameter is required.reverse- Indicates if links are search in reverse order.follow- Indicates if link chain is followed.direct- Indicates that only direct links should be searched.
-
findLink
@Stability(Experimental) @Nullable public Edge findLink(@NotNull IEdgePredicate predicate, @Nullable Boolean reverse, @Nullable Boolean follow)
(experimental) Find link of this node based on predicate.By default this will follow link chains to evaluate the predicate against and return the matching direct link of this node.
- Parameters:
predicate- Edge predicate function to match edge. This parameter is required.reverse- Indicates if links are search in reverse order.follow- Indicates if link chain is followed.
-
findLink
@Stability(Experimental) @Nullable public Edge findLink(@NotNull IEdgePredicate predicate, @Nullable Boolean reverse)
(experimental) Find link of this node based on predicate.By default this will follow link chains to evaluate the predicate against and return the matching direct link of this node.
- Parameters:
predicate- Edge predicate function to match edge. This parameter is required.reverse- Indicates if links are search in reverse order.
-
findLink
@Stability(Experimental) @Nullable public Edge findLink(@NotNull IEdgePredicate predicate)
(experimental) Find link of this node based on predicate.By default this will follow link chains to evaluate the predicate against and return the matching direct link of this node.
- Parameters:
predicate- Edge predicate function to match edge. This parameter is required.
-
findLinks
@Stability(Experimental) @NotNull public List<Edge> findLinks(@NotNull IEdgePredicate predicate, @Nullable Boolean reverse, @Nullable Boolean follow, @Nullable Boolean direct)
(experimental) Find all links of this node based on predicate.By default this will follow link chains to evaluate the predicate against and return the matching direct links of this node.
- Parameters:
predicate- Edge predicate function to match edge. This parameter is required.reverse- Indicates if links are search in reverse order.follow- Indicates if link chain is followed.direct- Indicates that only direct links should be searched.
-
findLinks
@Stability(Experimental) @NotNull public List<Edge> findLinks(@NotNull IEdgePredicate predicate, @Nullable Boolean reverse, @Nullable Boolean follow)
(experimental) Find all links of this node based on predicate.By default this will follow link chains to evaluate the predicate against and return the matching direct links of this node.
- Parameters:
predicate- Edge predicate function to match edge. This parameter is required.reverse- Indicates if links are search in reverse order.follow- Indicates if link chain is followed.
-
findLinks
@Stability(Experimental) @NotNull public List<Edge> findLinks(@NotNull IEdgePredicate predicate, @Nullable Boolean reverse)
(experimental) Find all links of this node based on predicate.By default this will follow link chains to evaluate the predicate against and return the matching direct links of this node.
- Parameters:
predicate- Edge predicate function to match edge. This parameter is required.reverse- Indicates if links are search in reverse order.
-
findLinks
@Stability(Experimental) @NotNull public List<Edge> findLinks(@NotNull IEdgePredicate predicate)
(experimental) Find all links of this node based on predicate.By default this will follow link chains to evaluate the predicate against and return the matching direct links of this node.
- Parameters:
predicate- Edge predicate function to match edge. This parameter is required.
-
getCfnProp
@Stability(Experimental) @Nullable public Object getCfnProp(@NotNull String key)
(experimental) Get specific CloudFormation property.- Parameters:
key- This parameter is required.
-
getChild
@Stability(Experimental) @NotNull public Node getChild(@NotNull String id)
(experimental) Get child node with given id.- Parameters:
id- This parameter is required.
-
getLinkChains
@Stability(Experimental) @NotNull public List<List<Object>> getLinkChains(@Nullable Boolean reverse)
(experimental) Resolve all link chains.- Parameters:
reverse-- See Also:
- EdgeChain
-
getLinkChains
@Stability(Experimental) @NotNull public List<List<Object>> getLinkChains()
(experimental) Resolve all link chains.- See Also:
- EdgeChain
-
getNearestAncestor
@Stability(Experimental) @NotNull public Node getNearestAncestor(@NotNull Node node)
(experimental) Gets the nearest common ancestor shared between this node and another node.- Parameters:
node- This parameter is required.
-
isAncestor
@Stability(Experimental) @NotNull public Boolean isAncestor(@NotNull Node ancestor)
(experimental) Indicates if a specific node is an ancestor of this node.- Parameters:
ancestor- This parameter is required.
-
isChild
@Stability(Experimental) @NotNull public Boolean isChild(@NotNull Node node)
(experimental) Indicates if specific node is a child of this node.- Parameters:
node- This parameter is required.
-
mutateCollapse
@Stability(Experimental) public void mutateCollapse()
(experimental) Collapses all sub-nodes of this node into this node.
-
mutateCollapseTo
@Stability(Experimental) @NotNull public Node mutateCollapseTo(@NotNull Node ancestor)
(experimental) Collapses this node into an ancestor.- Parameters:
ancestor- This parameter is required.
-
mutateCollapseToParent
@Stability(Experimental) @NotNull public Node mutateCollapseToParent()
(experimental) Collapses this node into it's parent node.
-
mutateDestroy
@Stability(Experimental) public void mutateDestroy(@Nullable Boolean strict)(experimental) Destroys this node by removing all references and removing this node from the store.- Specified by:
mutateDestroyin classBaseEntity- Parameters:
strict-- Indicates that this node must not have references.
-
mutateDestroy
@Stability(Experimental) public void mutateDestroy()
(experimental) Destroys this node by removing all references and removing this node from the store.- Specified by:
mutateDestroyin classBaseEntity
-
mutateHoist
@Stability(Experimental) public void mutateHoist(@NotNull Node newParent)(experimental) Hoist this node to an ancestor by removing it from its current parent node and in turn moving it to the ancestor.- Parameters:
newParent- This parameter is required.
-
mutateMove
@Stability(Experimental) public void mutateMove(@NotNull Node newParent)(experimental) Move this node into a new parent node.- Parameters:
newParent-- The parent to move this node to.
-
mutateRemoveChild
@Stability(Experimental) @NotNull public Boolean mutateRemoveChild(@NotNull Node node)
(experimental) Remove a child node from this node.- Parameters:
node- This parameter is required.
-
mutateRemoveLink
@Stability(Experimental) @NotNull public Boolean mutateRemoveLink(@NotNull Edge link)
(experimental) Remove a link from this node.- Parameters:
link- This parameter is required.
-
mutateRemoveReverseLink
@Stability(Experimental) @NotNull public Boolean mutateRemoveReverseLink(@NotNull Edge link)
(experimental) Remove a link to this node.- Parameters:
link- This parameter is required.
-
mutateUncluster
@Stability(Experimental) public void mutateUncluster()
(experimental) Hoist all children to parent and collapse node to parent.
-
toString
@Stability(Experimental) @NotNull public String toString()
(experimental) Get string representation of this node.
-
getAllowDestructiveMutations
@Stability(Experimental) @NotNull public Boolean getAllowDestructiveMutations()
(experimental) Indicates if this node allows destructive mutations.- See Also:
- Store.allowDestructiveMutations
-
getChildren
@Stability(Experimental) @NotNull public List<Node> getChildren()
(experimental) Get all direct child nodes.
-
getDependedOnBy
@Stability(Experimental) @NotNull public List<Node> getDependedOnBy()
(experimental) Get list of Nodes that depend on this node.- See Also:
- Node.reverseDependencyLinks
-
getDependencies
@Stability(Experimental) @NotNull public List<Node> getDependencies()
(experimental) Get list of Nodes that this node depends on.- See Also:
- Node.dependencyLinks
-
getDependencyLinks
@Stability(Experimental) @NotNull public List<Dependency> getDependencyLinks()
(experimental) Gets list ofDependencylinks (edges) where this node is the **source**.
-
getDepth
@Stability(Experimental) @NotNull public Number getDepth()
(experimental) Indicates the depth of the node relative to root (0).
-
getId
@Stability(Experimental) @NotNull public String getId()
(experimental) Node id, which is only unique within parent scope.
-
getIsAsset
@Stability(Experimental) @NotNull public Boolean getIsAsset()
(experimental) Indicates if this node is considered aFlagEnum.ASSET.
-
getIsCfnFqn
@Stability(Experimental) @NotNull public Boolean getIsCfnFqn()
(experimental) Indicates if node ConstructInfoFqn denotes aaws-cdk-lib.*.Cfn*construct.- See Also:
- FlagEnum.CFN_FQN
-
getIsCluster
@Stability(Experimental) @NotNull public Boolean getIsCluster()
(experimental) Indicates if this node is considered aFlagEnum.CLUSTER.
-
getIsCustomResource
@Stability(Experimental) @NotNull public Boolean getIsCustomResource()
(experimental) Indicates if node is a Custom Resource.
-
getIsExtraneous
@Stability(Experimental) @NotNull public Boolean getIsExtraneous()
(experimental) Indicates if this node is considered aFlagEnum.EXTRANEOUSnode or determined to be extraneous: - Clusters that contain no children.
-
getIsGraphContainer
@Stability(Experimental) @NotNull public Boolean getIsGraphContainer()
(experimental) Indicates if this node is considered aFlagEnum.GRAPH_CONTAINER.
-
getIsLeaf
@Stability(Experimental) @NotNull public Boolean getIsLeaf()
(experimental) Indicates if this node is a leaf node, which means it does not have children.
-
getIsTopLevel
@Stability(Experimental) @NotNull public Boolean getIsTopLevel()
(experimental) Indicates if node is direct child of the graph root node.
-
getLinks
@Stability(Experimental) @NotNull public List<Edge> getLinks()
(experimental) Gets all links (edges) in which this node is the source.
-
getNodeType
@Stability(Experimental) @NotNull public NodeTypeEnum getNodeType()
(experimental) Type of node.
-
getPath
@Stability(Experimental) @NotNull public String getPath()
(experimental) Path of the node.
-
getReferencedBy
@Stability(Experimental) @NotNull public List<Node> getReferencedBy()
(experimental) Get list of Nodes that reference this node.- See Also:
- Node.reverseReferenceLinks
-
getReferenceLinks
@Stability(Experimental) @NotNull public List<Reference> getReferenceLinks()
(experimental) Gets list ofReferencelinks (edges) where this node is the **source**.
-
getReferences
@Stability(Experimental) @NotNull public List<Node> getReferences()
(experimental) Get list of Nodes that this node references.- See Also:
- Node.referenceLinks
-
getReverseDependencyLinks
@Stability(Experimental) @NotNull public List<Dependency> getReverseDependencyLinks()
(experimental) Gets list ofDependencylinks (edges) where this node is the **target**.
-
getReverseLinks
@Stability(Experimental) @NotNull public List<Edge> getReverseLinks()
(experimental) Gets all links (edges) in which this node is the target.
-
getReverseReferenceLinks
@Stability(Experimental) @NotNull public List<Reference> getReverseReferenceLinks()
(experimental) Gets list ofReferencelinks (edges) where this node is the **target**.
-
getScopes
@Stability(Experimental) @NotNull public List<Node> getScopes()
(experimental) Gets descending ordered list of ancestors from the root.
-
getSiblings
@Stability(Experimental) @NotNull public List<Node> getSiblings()
(experimental) Get list of siblings of this node.
-
getCfnProps
@Stability(Experimental) @Nullable public PlainObject getCfnProps()
(experimental) Gets CloudFormation properties for this node.
-
getCfnType
@Stability(Experimental) @Nullable public String getCfnType()
(experimental) Get the CloudFormation resource type for this node.
-
getConstructInfo
@Stability(Experimental) @Nullable public ConstructInfo getConstructInfo()
(experimental) Synthesized construct information defining jii resolution data.
-
getConstructInfoFqn
@Stability(Experimental) @Nullable public String getConstructInfoFqn()
(experimental) Synthesized construct information defining jii resolution data.
-
getLogicalId
@Stability(Experimental) @Nullable public String getLogicalId()
(experimental) Logical id of the node, which is only unique within containing stack.
-
getParent
@Stability(Experimental) @Nullable public Node getParent()
(experimental) Parent node.Only the root node should not have parent.
-
getRootStack
@Stability(Experimental) @Nullable public StackNode getRootStack()
(experimental) Get root stack.
-
getStack
@Stability(Experimental) @Nullable public StackNode getStack()
(experimental) Stack the node is contained in.
-
-