com.flexive.shared.scripting.groovy
Class GroovyOptionBuilder

java.lang.Object
  extended by groovy.lang.GroovyObjectSupport
      extended by groovy.util.BuilderSupport
          extended by com.flexive.shared.scripting.groovy.GroovyOptionBuilder
All Implemented Interfaces:
groovy.lang.GroovyObject, java.io.Serializable

public class GroovyOptionBuilder
extends groovy.util.BuilderSupport
implements java.io.Serializable

The GroovyOptionBuilder for FxStructureOptions provides a quick way to generate a List of FxStructureOptions
The Builder always returns a List<FxStructureOption>

General usage:

A list w/ one option:

 new GroovyOptionBuilder().[OPTNAME](value: STRING/BOOLEAN, overridable:BOOLEAN, isInherited:BOOLEAN)
A list w/ several options:
 new GroovyOptionBuilder().[OPTNAME](value: STRING/BOOLEAN, overridable:BOOLEAN, isInherited:BOOLEAN) {
[OPTNAME]([attributes] [OPTNAME]([attributes] ... }


The attributes "overridable" and "isInherited" will default to "true" if not called explicitly

Example:
 new GroovyOptionBuilder().option1(value:"FOO") {
      option2(value: false)
      option3(value: "BAR", overridable: false, isInherited:true)
      option4(value: true, overridable: true, isInherited:true)
 }
 

Since:
3.1
Author:
Christopher Blasnik (cblasnik@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Constructor Summary
GroovyOptionBuilder()
           
 
Method Summary
protected  java.lang.Object createNode(java.lang.Object o)
          
protected  java.lang.Object createNode(java.lang.Object o, java.util.Map map)
          
protected  java.lang.Object createNode(java.lang.Object o, java.util.Map map, java.lang.Object o1)
          
protected  java.lang.Object createNode(java.lang.Object o, java.lang.Object o1)
          
protected  void setParent(java.lang.Object o, java.lang.Object o1)
          
 
Methods inherited from class groovy.util.BuilderSupport
doInvokeMethod, getCurrent, getName, invokeMethod, invokeMethod, nodeCompleted, postNodeCompletion, setClosureDelegate, setCurrent
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, getProperty, setMetaClass, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyOptionBuilder

public GroovyOptionBuilder()
Method Detail

setParent

protected void setParent(java.lang.Object o,
                         java.lang.Object o1)

Specified by:
setParent in class groovy.util.BuilderSupport

createNode

protected java.lang.Object createNode(java.lang.Object o)

Specified by:
createNode in class groovy.util.BuilderSupport

createNode

protected java.lang.Object createNode(java.lang.Object o,
                                      java.lang.Object o1)

Specified by:
createNode in class groovy.util.BuilderSupport

createNode

protected java.lang.Object createNode(java.lang.Object o,
                                      java.util.Map map)

Specified by:
createNode in class groovy.util.BuilderSupport

createNode

protected java.lang.Object createNode(java.lang.Object o,
                                      java.util.Map map,
                                      java.lang.Object o1)

Specified by:
createNode in class groovy.util.BuilderSupport