org.identityconnectors.contract.data.groovy
Class Lazy

java.lang.Object
  extended by org.identityconnectors.contract.data.groovy.Lazy
Direct Known Subclasses:
Get, Random

public abstract class Lazy
extends Object

Support for lazy evaluation. "Lazy evaluation" means that property value is evaluated just when get(String) query is called in GroovyDataProvider.

Methods get(Object), random(Object) and random(Object, Class) are ones used in contract tests' configuration.

More detailed information is on web https://identityconnectors.dev.java.net/contract-tests-groovy/index.html

Author:
Zdenek Louzensky

Field Summary
protected  List<Object> successors
           
protected  Object value
           
 
Constructor Summary
Lazy()
           
 
Method Summary
static Lazy get(Object prop)
          retrieve value of another property dynamically
 List<Object> getSuccessors()
           
 Object getValue()
           
 Lazy plus(Lazy lazy)
           
 Lazy plus(String s)
           overriding plus operation to be able to concatenate Lazy objects to others.
static Lazy random(Object pattern)
           
static Lazy random(Object pattern, Class<?> clazz)
          generate a random object based on given pattern.
 void setSuccessors(List<Object> successors)
           
 void setValue(Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

successors

protected List<Object> successors

value

protected Object value
Constructor Detail

Lazy

public Lazy()
Method Detail

plus

public Lazy plus(String s)

overriding plus operation to be able to concatenate Lazy objects to others.

(not intented for programmer use)

Parameters:
s -
Returns:

plus

public Lazy plus(Lazy lazy)
See Also:
plus(String)

get

public static Lazy get(Object prop)
retrieve value of another property dynamically

Parameters:
prop - property name
Returns:
property value

random

public static Lazy random(Object pattern)
See Also:
random(Object, Class)

random

public static Lazy random(Object pattern,
                          Class<?> clazz)
generate a random object based on given pattern. Object's constructor will be initialized with the string generated by pattern.

Parameters:
pattern -
clazz -
Returns:
See Also:
org.identityconnectors.contract.data.RandomGenerator#generate(String)}

getSuccessors

public List<Object> getSuccessors()

setSuccessors

public void setSuccessors(List<Object> successors)

getValue

public Object getValue()

setValue

public void setValue(Object value)


Copyright © 2011. All Rights Reserved.