org.oddjob.arooa.types
Class IdentifiableValueType

java.lang.Object
  extended by org.oddjob.arooa.types.IdentifiableValueType
All Implemented Interfaces:
ArooaValue, ArooaLifeAware, ArooaSessionAware

public class IdentifiableValueType
extends Object
implements ArooaValue, ArooaSessionAware, ArooaLifeAware

Description

Register the a value with an Id.

Unlike components, values can't have an Id. This type allows values to be registered so they can be referenced via the given Id elsewhere in the configuration.

Components are registered when the configuration is parsed but the given value will only be registered during the configuration phase, such as when a job runs in Oddjob.

Example

Register a value.
<oddjob>
    <job>
        <sequential>
            <jobs>
                <variables id="vars">
                    <test>
                        <identify id="our-value">
                            <value>
                                <value value="Apples"/>
                            </value>
                        </identify>
                    </test>
                </variables>
                <echo>Checking ${vars.test} is ${our-value}</echo>
                <check value="${vars.test}" eq="${our-value}"/>
            </jobs>
        </sequential>
    </job>
</oddjob>
Author:
rob

Nested Class Summary
static class IdentifiableValueType.Conversions
           
 
Field Summary
static ArooaElement ELEMENT
           
 
Constructor Summary
IdentifiableValueType()
           
 
Method Summary
 void configured()
          The configuration for the bean has been fully configured.
 void destroy()
          The configuration for the bean is about to be destroyed.
 String getId()
           
 ArooaValue getValue()
           
 void initialised()
          The configuration for the bean has been initialised.
 void setArooaSession(ArooaSession session)
           
 void setId(String id)
           
 void setValue(ArooaValue value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT

public static final ArooaElement ELEMENT
Constructor Detail

IdentifiableValueType

public IdentifiableValueType()
Method Detail

setArooaSession

public void setArooaSession(ArooaSession session)
Specified by:
setArooaSession in interface ArooaSessionAware

getId

public String getId()

setId

public void setId(String id)

getValue

public ArooaValue getValue()

setValue

public void setValue(ArooaValue value)

initialised

public void initialised()
Description copied from interface: ArooaLifeAware
The configuration for the bean has been initialised. Constant properties and element properties will have been injected.

Specified by:
initialised in interface ArooaLifeAware

configured

public void configured()
Description copied from interface: ArooaLifeAware
The configuration for the bean has been fully configured. Runtime properties will have been injected.

Specified by:
configured in interface ArooaLifeAware

destroy

public void destroy()
Description copied from interface: ArooaLifeAware
The configuration for the bean is about to be destroyed. A bean can use this method to free resources.

Specified by:
destroy in interface ArooaLifeAware