public class StreamDeploymentsPath
extends java.lang.Object
Paths.STREAM_DEPLOYMENTS
. StreamDeploymentsPath
can be used to take a full path and split it into its elements, for example:
StreamDeploymentsPath path = new StreamDeploymentsPath("/xd/streams/deployments/my-stream"); assertEquals("my-stream", path.getStreamName());It can also be used to build a path, for example:
StreamDeploymentsPath path = new StreamDeploymentsPath().setStreamName("my-stream")... assertEquals("/deployments/streams/my-stream", path.build());Note that all fields must be set prior to invoking
build()
.Constructor and Description |
---|
StreamDeploymentsPath()
Construct a
StreamDeploymentsPath . |
StreamDeploymentsPath(java.lang.String path)
Construct a
StreamDeploymentsPath . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
build()
Build the path string using the field values.
|
java.lang.String |
getContainer()
Return the container name.
|
java.lang.String |
getModuleInstanceAsString()
Return the string representation of the module instance that has the following dot limited
values.
|
java.lang.String |
getModuleLabel()
Return the module label.
|
int |
getModuleSequence()
Return the module sequence.
|
java.lang.String |
getModuleSequenceAsString()
Return the module sequence as string.
|
java.lang.String |
getModuleType()
Return the module type.
|
java.lang.String |
getStreamName()
Return the stream name.
|
StreamDeploymentsPath |
setContainer(java.lang.String container)
Set the container name.
|
StreamDeploymentsPath |
setModuleLabel(java.lang.String label)
Set the module label.
|
StreamDeploymentsPath |
setModuleSequence(java.lang.String moduleSequence)
Set the module sequence.
|
StreamDeploymentsPath |
setModuleType(java.lang.String type)
Set the module type.
|
StreamDeploymentsPath |
setStreamName(java.lang.String name)
Set the stream name.
|
java.lang.String |
toString() |
public StreamDeploymentsPath()
StreamDeploymentsPath
. Use of this constructor
means that a path will be created via build()
.public StreamDeploymentsPath(java.lang.String path)
StreamDeploymentsPath
. Use of this constructor
means that an existing path will be provided and this object will
be used to extract the individual elements of the path. Both full
paths (including and excluding the
XD namespace prefix
) are supported.path
- stream deployment pathpublic java.lang.String getModuleInstanceAsString()
public java.lang.String getStreamName()
public StreamDeploymentsPath setStreamName(java.lang.String name)
name
- stream namepublic java.lang.String getModuleType()
public StreamDeploymentsPath setModuleType(java.lang.String type)
type
- module typepublic java.lang.String getModuleLabel()
public StreamDeploymentsPath setModuleLabel(java.lang.String label)
label
- module labelpublic java.lang.String getModuleSequenceAsString()
public int getModuleSequence()
public StreamDeploymentsPath setModuleSequence(java.lang.String moduleSequence)
moduleSequence
- module sequencepublic java.lang.String getContainer()
public StreamDeploymentsPath setContainer(java.lang.String container)
container
- container namepublic java.lang.String build() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if there are missing fieldsPaths.build(java.lang.String...)
public java.lang.String toString()
toString
in class java.lang.Object