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>
  • Field Details

  • Constructor Details

    • IdentifiableValueType

      public IdentifiableValueType()
  • Method Details

    • setArooaSession

      public void setArooaSession(ArooaSession session)
      Description copied from interface: ArooaSessionAware
      Accept the current Arooa Session.
      Specified by:
      setArooaSession in interface ArooaSessionAware
      Parameters:
      session - The Arooa Session. Never null.
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object