Package org.oddjob.arooa.types
Class IdentifiableValueType
java.lang.Object
org.oddjob.arooa.types.IdentifiableValueType
- All Implemented Interfaces:
ArooaValue,ArooaLifeAware,ArooaSessionAware
public class IdentifiableValueType
extends Object
implements ArooaValue, ArooaSessionAware, ArooaLifeAware
- Author:
- rob
Description
Register 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>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThe configuration for the bean has been fully configured.voiddestroy()The configuration for the bean is about to be destroyed.getId()getValue()voidThe configuration for the bean has been initialised.voidsetArooaSession(ArooaSession session) Accept the current Arooa Session.voidvoidsetValue(ArooaValue value) toString()
-
Field Details
-
ELEMENT
-
-
Constructor Details
-
IdentifiableValueType
public IdentifiableValueType()
-
-
Method Details
-
setArooaSession
Description copied from interface:ArooaSessionAwareAccept the current Arooa Session.- Specified by:
setArooaSessionin interfaceArooaSessionAware- Parameters:
session- The Arooa Session. Never null.
-
getId
-
setId
-
getValue
-
setValue
-
initialised
public void initialised()Description copied from interface:ArooaLifeAwareThe configuration for the bean has been initialised. Constant properties and element properties will have been injected.- Specified by:
initialisedin interfaceArooaLifeAware
-
configured
public void configured()Description copied from interface:ArooaLifeAwareThe configuration for the bean has been fully configured. Runtime properties will have been injected.- Specified by:
configuredin interfaceArooaLifeAware
-
destroy
public void destroy()Description copied from interface:ArooaLifeAwareThe configuration for the bean is about to be destroyed. A bean can use this method to free resources.- Specified by:
destroyin interfaceArooaLifeAware
-
toString
-