org.springframework.cloud.dataflow.shell.command

## Class StreamCommands

- java.lang.Object
- - org.springframework.cloud.dataflow.shell.command.StreamCommands

- All Implemented Interfaces:
    org.springframework.shell.core.CommandMarker

      @Component
      public class StreamCommands
      extends Object
      implements org.springframework.shell.core.CommandMarker

  Stream commands.
  Author:
    Ilayaperumal Gopinathan, Mark Fisher, Gunnar Hillert, Glenn Renfro, Janne Valkealahti, Christian Tzolov

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DataFlowShell` | `dataFlowShell`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamCommands()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `availableWithCreateRole()`
    `boolean` | `availableWithDeployRole()`
    `boolean` | `availableWithDestroyRole()`
    `boolean` | `availableWithModifyRole()`
    `boolean` | `availableWithViewRole()`
    `String` | `createStream(String name, String dsl, String description, boolean deploy)`
    `String` | `deployStream(String name, String deploymentProperties, File propertiesFile, String packageVersion, String platformName, String repoName)`
    `String` | `destroyAllStreams(boolean force)`
    `String` | `destroyStream(String name)`
    `String` | `getManifest(String name, int releaseVersion)`
    `Table` | `history(String name)`
    `Table` | `listPlatforms()`
    `Table` | `listStreams()`
    `String` | `rollbackStreamUsingSkipper(String name, int releaseVersion)`
    `String` | `scaleStream(String name, String applicationName, Integer count, String scaleProperties)`
    `void` | `setDataFlowShell(DataFlowShell dataFlowShell)`
    `void` | `setUserInput(UserInput userInput)`
    `List<Object>` | `streamInfo(String name)`
    `protected StreamOperations` | `streamOperations()`
    `String` | `undeployAllStreams(boolean force)`
    `String` | `undeployStream(String name)`
    `String` | `updateStream(String name, String properties, File propertiesFile, String packageVersion, String repoName, boolean force, String appNames)`
    `List<Object>` | `validateStream(String name)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### dataFlowShell

          protected DataFlowShell dataFlowShell

  - ### Constructor Detail

    - #### StreamCommands

          public StreamCommands()

  - ### Method Detail

    - #### setDataFlowShell

          @Autowired
          public void setDataFlowShell(DataFlowShell dataFlowShell)

    - #### setUserInput

          @Autowired
          public void setUserInput(UserInput userInput)

    - #### availableWithCreateRole

          @CliAvailabilityIndicator(value="stream create")
          public boolean availableWithCreateRole()

    - #### availableWithDeployRole

          @CliAvailabilityIndicator(value={"stream deploy","stream undeploy","stream all undeploy"})
          public boolean availableWithDeployRole()

    - #### availableWithDestroyRole

          @CliAvailabilityIndicator(value={"stream destroy","stream all destroy"})
          public boolean availableWithDestroyRole()

    - #### availableWithModifyRole

          @CliAvailabilityIndicator(value={"stream rollback","stream update","stream scale app instances"})
          public boolean availableWithModifyRole()

    - #### availableWithViewRole

          @CliAvailabilityIndicator(value={"stream info","stream list","stream history","stream manifest","stream platform-list","stream validate"})
          public boolean availableWithViewRole()

    - #### deployStream

          @CliCommand(value="stream deploy",
                      help="Deploy a previously created stream using Skipper")
          public String deployStream(@CliOption(key={"","name"},help="the name of the stream to deploy",mandatory=true,optionContext="existing-stream disable-string-converter")
                                                                                                                                             String name,
                                                                                                                                             @CliOption(key="properties",help="the properties for this deployment")
                                                                                                                                             String deploymentProperties,
                                                                                                                                             @CliOption(key="propertiesFile",help="the properties for this deployment (as a File)")
                                                                                                                                             File propertiesFile,
                                                                                                                                             @CliOption(key="packageVersion",help="the package version of the package to deploy.  Default is 1.0.0",unspecifiedDefaultValue="1.0.0")
                                                                                                                                             String packageVersion,
                                                                                                                                             @CliOption(key="platformName",help="the name of the target platform to deploy to")
                                                                                                                                             String platformName,
                                                                                                                                             @CliOption(key="repoName",help="the name of the local repository to upload the package to")
                                                                                                                                             String repoName)
                                                                                                                                      throws IOException

      Throws:
        `IOException`

    - #### getManifest

          @CliCommand(value="stream manifest",
                      help="Get manifest for the stream deployed using Skipper")
          public String getManifest(@CliOption(key={"","name"},help="the name of the stream",mandatory=true,optionContext="existing-stream disable-string-converter")
                                                                                                                                                String name,
                                                                                                                                                @CliOption(key="releaseVersion",help="the Skipper release version to get the manifest for",unspecifiedDefaultValue="0")
                                                                                                                                                int releaseVersion)

    - #### history

          @CliCommand(value="stream history",
                      help="Get history for the stream deployed using Skipper")
          public Table history(@CliOption(key={"","name"},help="the name of the stream",mandatory=true,optionContext="existing-stream disable-string-converter")
                                                                                                                                         String name)

    - #### listPlatforms

          @CliCommand(value="stream platform-list",
                      help="List Skipper platforms")
          public Table listPlatforms()

    - #### updateStream

          @CliCommand(value="stream update",
                      help="Update a previously created stream using Skipper")
          public String updateStream(@CliOption(key={"","name"},help="the name of the stream to update",mandatory=true,optionContext="existing-stream disable-string-converter")
                                                                                                                                             String name,
                                                                                                                                             @CliOption(key="properties",help="Flattened YAML style properties to update the stream",mandatory=false)
                                                                                                                                             String properties,
                                                                                                                                             @CliOption(key="propertiesFile",help="the properties for the stream update (as a File)",mandatory=false)
                                                                                                                                             File propertiesFile,
                                                                                                                                             @CliOption(key="packageVersion",help="the package version of the package to update when using Skipper")
                                                                                                                                             String packageVersion,
                                                                                                                                             @CliOption(key="repoName",help="the name of the local repository to upload the package when using Skipper")
                                                                                                                                             String repoName,
                                                                                                                                             @CliOption(key="force",help="force the update",mandatory=false,specifiedDefaultValue="true",unspecifiedDefaultValue="false")
                                                                                                                                             boolean force,
                                                                                                                                             @CliOption(key="appNames",help="the application names to force update",mandatory=false)
                                                                                                                                             String appNames)
                                                                                                                                      throws IOException

      Throws:
        `IOException`

    - #### scaleStream

          @CliCommand(value="stream scale app instances",
                      help="Scale app instances in a stream")
          public String scaleStream(@CliOption(key={"","name"},help="the name of the stream to scale",mandatory=true,optionContext="existing-stream disable-string-converter")
                                                                                                                                        String name,
                                                                                                                                        @CliOption(key="applicationName",help="the name/label of the application to scale",mandatory=true)
                                                                                                                                        String applicationName,
                                                                                                                                        @CliOption(key="count",help="desired number of application instances",mandatory=true)
                                                                                                                                        Integer count,
                                                                                                                                        @CliOption(key="properties",help="the properties for this scale")
                                                                                                                                        String scaleProperties)
                                                                                                                                 throws IOException

      Throws:
        `IOException`

    - #### rollbackStreamUsingSkipper

          @CliCommand(value="stream rollback",
                      help="Rollback a stream using Skipper")
          public String rollbackStreamUsingSkipper(@CliOption(key={"","name"},help="the name of the stream to rollback",mandatory=true,optionContext="existing-stream disable-string-converter")
                                                                                                                                            String name,
                                                                                                                                            @CliOption(key="releaseVersion",help="the Skipper release version to rollback to",unspecifiedDefaultValue="0")
                                                                                                                                            int releaseVersion)

    - #### createStream

          @CliCommand(value="stream create",
                      help="Create a new stream definition")
          public String createStream(@CliOption(mandatory=true,key={"","name"},help="the name to give to the stream")
                                                                                                                           String name,
                                                                                                                           @CliOption(mandatory=true,key="definition",help="a stream definition, using the DSL (e.g. \"http --port=9000 | hdfs\")",optionContext="disable-string-converter completion-stream")
                                                                                                                           String dsl,
                                                                                                                           @CliOption(mandatory=false,key="description",help="a short description about the stream",unspecifiedDefaultValue="")
                                                                                                                           String description,
                                                                                                                           @CliOption(key="deploy",help="whether to deploy the stream immediately",unspecifiedDefaultValue="false",specifiedDefaultValue="true")
                                                                                                                           boolean deploy)

    - #### listStreams

          @CliCommand(value="stream list",
                      help="List created streams")
          public Table listStreams()

    - #### streamInfo

          @CliCommand(value="stream info",
                      help="Show information about a specific stream")
          public List<Object> streamInfo(@CliOption(key={"","name"},help="the name of the stream to show",mandatory=true,optionContext="existing-stream disable-string-converter")
                                                                                                                                       String name)

    - #### undeployStream

          @CliCommand(value="stream undeploy",
                      help="Un-deploy a previously deployed stream")
          public String undeployStream(@CliOption(key={"","name"},help="the name of the stream to un-deploy",mandatory=true,optionContext="existing-stream disable-string-converter")
                                                                                                                                       String name)

    - #### undeployAllStreams

          @CliCommand(value="stream all undeploy",
                      help="Un-deploy all previously deployed stream")
          public String undeployAllStreams(@CliOption(key="force",help="bypass confirmation prompt",unspecifiedDefaultValue="false",specifiedDefaultValue="true")
                                                                                                                                                 boolean force)

    - #### destroyStream

          @CliCommand(value="stream destroy",
                      help="Destroy an existing stream")
          public String destroyStream(@CliOption(key={"","name"},help="the name of the stream to destroy",mandatory=true,optionContext="existing-stream disable-string-converter")
                                                                                                                         String name)

    - #### destroyAllStreams

          @CliCommand(value="stream all destroy",
                      help="Destroy all existing streams")
          public String destroyAllStreams(@CliOption(key="force",help="bypass confirmation prompt",unspecifiedDefaultValue="false",specifiedDefaultValue="true")
                                                                                                                                   boolean force)

    - #### validateStream

          @CliCommand(value="stream validate",
                      help="Verify that apps contained in the stream are valid.")
          public List<Object> validateStream(@CliOption(key={"","name"},help="the name of the stream to validate",mandatory=true,optionContext="existing-stream disable-string-converter")
                                                                                                                                                          String name)
                                                                                                                                                   throws OperationNotSupportedException

      Throws:
        `OperationNotSupportedException`

    - #### streamOperations

          protected StreamOperations streamOperations()

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.