|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.rundeck.plugins.util.PropertyBuilder
public class PropertyBuilder
A builder for Property objects
Method Summary | |
---|---|
PropertyBuilder |
booleanType(java.lang.String name)
Return a new PropertyBuilder of type Property.Type.Boolean |
Property |
build()
Build the Property object |
static PropertyBuilder |
builder()
|
static PropertyBuilder |
builder(Property orig)
Return a new instance preconfigured with a previously defined Property |
PropertyBuilder |
defaultValue(java.lang.String value)
Set the default value |
PropertyBuilder |
description(java.lang.String description)
Set the description |
PropertyBuilder |
freeSelect(java.lang.String name)
Return a new PropertyBuilder of type Property.Type.FreeSelect |
Property.Type |
getType()
Return the type already defined for the builder |
PropertyBuilder |
integer(java.lang.String name)
Return a new PropertyBuilder of type Property.Type.Integer |
PropertyBuilder |
longType(java.lang.String name)
Return a new PropertyBuilder of type Property.Type.Long |
PropertyBuilder |
name(java.lang.String name)
Set the name (identifier) |
PropertyBuilder |
renderingOption(java.lang.String optionKey,
java.lang.Object optionValue)
Adds the given renderingOption |
PropertyBuilder |
renderingOptions(java.util.Map<java.lang.String,java.lang.Object> renderingOptions)
Adds all rendering options from the given renderingOptions |
PropertyBuilder |
required(boolean required)
Set required |
PropertyBuilder |
scope(PropertyScope scope)
Set the property scope |
PropertyBuilder |
select(java.lang.String name)
Return a new PropertyBuilder of type Property.Type.Select |
PropertyBuilder |
string(java.lang.String name)
Return a new PropertyBuilder of type Property.Type.String |
PropertyBuilder |
title(java.lang.String title)
Set the title (display name) |
PropertyBuilder |
type(Property.Type type)
Set the type |
PropertyBuilder |
validator(PropertyValidator validator)
Set the property validator, only applies to String, Integer, Long, and FreeSelect types |
PropertyBuilder |
values(java.util.List<java.lang.String> values)
Set the select values |
PropertyBuilder |
values(java.lang.String... values)
Set the select values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PropertyBuilder builder()
public static PropertyBuilder builder(Property orig)
public PropertyBuilder string(java.lang.String name)
Property.Type.String
public PropertyBuilder booleanType(java.lang.String name)
Property.Type.Boolean
public PropertyBuilder integer(java.lang.String name)
Property.Type.Integer
public PropertyBuilder longType(java.lang.String name)
Property.Type.Long
public PropertyBuilder select(java.lang.String name)
Property.Type.Select
public PropertyBuilder freeSelect(java.lang.String name)
Property.Type.FreeSelect
public PropertyBuilder type(Property.Type type)
public PropertyBuilder name(java.lang.String name)
public PropertyBuilder title(java.lang.String title)
public PropertyBuilder description(java.lang.String description)
public PropertyBuilder required(boolean required)
public PropertyBuilder defaultValue(java.lang.String value)
public PropertyBuilder values(java.util.List<java.lang.String> values)
public PropertyBuilder values(java.lang.String... values)
public PropertyBuilder validator(PropertyValidator validator)
public PropertyBuilder scope(PropertyScope scope)
public PropertyBuilder renderingOptions(java.util.Map<java.lang.String,java.lang.Object> renderingOptions)
public PropertyBuilder renderingOption(java.lang.String optionKey, java.lang.Object optionValue)
public Property build()
java.lang.IllegalStateException
- if type or name is not setpublic Property.Type getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |