Package com.xebialabs.deployit.plugin.api.flow

# Class Preview

java.lang.Object
com.xebialabs.deployit.plugin.api.flow.Preview

All Implemented Interfaces:
  `Serializable`

public final class Preview extends Object implements Serializable
An preview of the script that a step is going to execute, or of the template that will be copied.

See Also:
  - Serialized Form

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getContents()`
  Returns a preview of the script that will be executed or the template that will be copied.
  `String`
  `getSourcePath()`
  Returns the path of the source of the rendered content, e.g.
  `void`
  `setContents(String contents)`
  `void`
  `setSourcePath(String sourcePath)`
  `static Preview`
  `withContents(String contents)`
  `static Preview`
  `withSourcePathAndContents(String sourcePath, String contents)`

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

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

- ## Method Details

  - ### withContents

    public static Preview withContents(String contents)

  - ### withSourcePathAndContents

    public static Preview withSourcePathAndContents(String sourcePath, String contents)

  - ### getSourcePath

    public String getSourcePath()
    Returns the path of the source of the rendered content, e.g. a script or a FreeMarker template on the classpath.
    Returns:
      the path of the source or `null` if that information is not known.

  - ### setSourcePath

    public void setSourcePath(String sourcePath)

  - ### getContents

    public String getContents()
    Returns a preview of the script that will be executed or the template that will be copied. This will be displayed in the GUI using a fixed-width font.
    Returns:
      The preview.

  - ### setContents

    public void setContents(String contents)