com.dtolabs.rundeck.plugins.util
Class DescriptionBuilder

java.lang.Object
  extended by com.dtolabs.rundeck.plugins.util.DescriptionBuilder

public class DescriptionBuilder
extends java.lang.Object

DescriptionBuilder is a builder for creating a Description object.


Nested Class Summary
static interface DescriptionBuilder.Collaborator
          Allows a class to collaborate in building a Description using a DescriptionBuilder
 
Method Summary
 DescriptionBuilder booleanProperty(java.lang.String name, java.lang.String defaultValue, boolean required, java.lang.String propTitle, java.lang.String propDescription)
          Add a Boolean property
 Description build()
          Build the description
static DescriptionBuilder builder()
          Start a builder
static DescriptionBuilder builder(Description original)
          Start a builder with a given description
 DescriptionBuilder collaborate(DescriptionBuilder.Collaborator colab)
          Allows the Collaborator to assist using this DescriptionBuilder.
 DescriptionBuilder collaborate(java.lang.Object colab)
          Allows any object to collaborate on this DescriptionBuilder if it implements DescriptionBuilder.Collaborator, otherwise simply returns this builder.
 DescriptionBuilder description(java.lang.String description)
          Set a description string
 DescriptionBuilder frameworkMapping(java.util.Map<java.lang.String,java.lang.String> mapping)
          Add all entries to the frameworkMapping
 DescriptionBuilder frameworkMapping(java.lang.String key, java.lang.String name)
          Add a property mapping for framework properties
 DescriptionBuilder freeSelectProperty(java.lang.String name, java.lang.String defaultValue, boolean required, java.lang.String propTitle, java.lang.String propDescription, java.util.List<java.lang.String> selectValues)
          Add a FreeSelect property
 DescriptionBuilder integerProperty(java.lang.String name, java.lang.String defaultValue, boolean required, java.lang.String propTitle, java.lang.String propDescription)
          Add an Integer property
 DescriptionBuilder mapping(java.util.Map<java.lang.String,java.lang.String> mapping)
          Add all entries to the mapping
 DescriptionBuilder mapping(java.lang.String key, java.lang.String name)
          Add a property mapping
 DescriptionBuilder name(java.lang.String name)
          Set the name
 DescriptionBuilder property(Property property)
          Add a new property, or replace an existing property with the same name.
 DescriptionBuilder property(PropertyBuilder property)
          Add a new property, or replace an existing property with the same name by passing in a builder.
 PropertyBuilder property(java.lang.String name)
          Returns a new PropertyBuilder preconfigured with an existing property or a new one to add a new property.
 DescriptionBuilder removeProperty(java.lang.String name)
          Remove a previously defined property by name
 DescriptionBuilder selectProperty(java.lang.String name, java.lang.String defaultValue, boolean required, java.lang.String propTitle, java.lang.String propDescription, java.util.List<java.lang.String> selectValues)
          Add a Select property
 DescriptionBuilder stringProperty(java.lang.String name, java.lang.String defaultValue, boolean required, java.lang.String propTitle, java.lang.String propDescription)
          Add a String property
 DescriptionBuilder title(java.lang.String title)
          Set a title string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

builder

public static DescriptionBuilder builder()
Start a builder


builder

public static DescriptionBuilder builder(Description original)
Start a builder with a given description


name

public DescriptionBuilder name(java.lang.String name)
Set the name


title

public DescriptionBuilder title(java.lang.String title)
Set a title string


description

public DescriptionBuilder description(java.lang.String description)
Set a description string


mapping

public DescriptionBuilder mapping(java.lang.String key,
                                  java.lang.String name)
Add a property mapping


frameworkMapping

public DescriptionBuilder frameworkMapping(java.lang.String key,
                                           java.lang.String name)
Add a property mapping for framework properties


mapping

public DescriptionBuilder mapping(java.util.Map<java.lang.String,java.lang.String> mapping)
Add all entries to the mapping


frameworkMapping

public DescriptionBuilder frameworkMapping(java.util.Map<java.lang.String,java.lang.String> mapping)
Add all entries to the frameworkMapping


stringProperty

public DescriptionBuilder stringProperty(java.lang.String name,
                                         java.lang.String defaultValue,
                                         boolean required,
                                         java.lang.String propTitle,
                                         java.lang.String propDescription)
Add a String property


booleanProperty

public DescriptionBuilder booleanProperty(java.lang.String name,
                                          java.lang.String defaultValue,
                                          boolean required,
                                          java.lang.String propTitle,
                                          java.lang.String propDescription)
Add a Boolean property


integerProperty

public DescriptionBuilder integerProperty(java.lang.String name,
                                          java.lang.String defaultValue,
                                          boolean required,
                                          java.lang.String propTitle,
                                          java.lang.String propDescription)
Add an Integer property


selectProperty

public DescriptionBuilder selectProperty(java.lang.String name,
                                         java.lang.String defaultValue,
                                         boolean required,
                                         java.lang.String propTitle,
                                         java.lang.String propDescription,
                                         java.util.List<java.lang.String> selectValues)
Add a Select property


freeSelectProperty

public DescriptionBuilder freeSelectProperty(java.lang.String name,
                                             java.lang.String defaultValue,
                                             boolean required,
                                             java.lang.String propTitle,
                                             java.lang.String propDescription,
                                             java.util.List<java.lang.String> selectValues)
Add a FreeSelect property


property

public DescriptionBuilder property(PropertyBuilder property)
Add a new property, or replace an existing property with the same name by passing in a builder.


property

public DescriptionBuilder property(Property property)
Add a new property, or replace an existing property with the same name.


removeProperty

public DescriptionBuilder removeProperty(java.lang.String name)
Remove a previously defined property by name


property

public PropertyBuilder property(java.lang.String name)
Returns a new PropertyBuilder preconfigured with an existing property or a new one to add a new property. Be sure to call property(com.dtolabs.rundeck.core.plugins.configuration.Property) to add the result of the final call to PropertyBuilder.build().


build

public Description build()
Build the description


collaborate

public DescriptionBuilder collaborate(DescriptionBuilder.Collaborator colab)
Allows the Collaborator to assist using this DescriptionBuilder.


collaborate

public DescriptionBuilder collaborate(java.lang.Object colab)
Allows any object to collaborate on this DescriptionBuilder if it implements DescriptionBuilder.Collaborator, otherwise simply returns this builder.