com.atlassian.bamboo.ant.task.property
Class AbstractBeanTaskPropertyConfigurator<T>

java.lang.Object
  extended by com.atlassian.bamboo.ant.task.property.AbstractBeanTaskPropertyConfigurator<T>
All Implemented Interfaces:
AntPropertyManipulator, AntTaskPropertyConfigurator<T>
Direct Known Subclasses:
GenericBeanTaskPropertyConfigurator

public abstract class AbstractBeanTaskPropertyConfigurator<T>
extends java.lang.Object
implements AntTaskPropertyConfigurator<T>

Creates Ant task properties of arbitrary type given they support the Ant property model.

Since:
3.4

Constructor Summary
protected AbstractBeanTaskPropertyConfigurator(java.lang.Class<T> beanType)
           
 
Method Summary
 T fromConfig(java.lang.Class<? extends T> propertyType, java.lang.String name, java.util.Map<java.lang.String,java.lang.String> values, TaskContext taskContext)
          Parse property value from configuration string.
 void fromConfig(T propertyObject, java.lang.String name, java.util.Map<java.lang.String,java.lang.String> values, TaskContext taskContext)
          Populate existing property object with values from configuration.
protected  T instantiate(java.lang.Class<? extends T> propertyType)
           
 boolean supports(java.lang.Class<?> propertyType, java.lang.String propertyName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBeanTaskPropertyConfigurator

protected AbstractBeanTaskPropertyConfigurator(java.lang.Class<T> beanType)
Method Detail

supports

public boolean supports(java.lang.Class<?> propertyType,
                        java.lang.String propertyName)
Specified by:
supports in interface AntPropertyManipulator

fromConfig

public T fromConfig(java.lang.Class<? extends T> propertyType,
                    java.lang.String name,
                    java.util.Map<java.lang.String,java.lang.String> values,
                    TaskContext taskContext)
Description copied from interface: AntTaskPropertyConfigurator
Parse property value from configuration string.

Specified by:
fromConfig in interface AntTaskPropertyConfigurator<T>
Parameters:
propertyType - property type
name - property name
values - relevant property values from configuration
taskContext - current task context
Returns:
property value ready to inject into the task bean

fromConfig

public void fromConfig(T propertyObject,
                       java.lang.String name,
                       java.util.Map<java.lang.String,java.lang.String> values,
                       TaskContext taskContext)
Description copied from interface: AntTaskPropertyConfigurator
Populate existing property object with values from configuration.

Specified by:
fromConfig in interface AntTaskPropertyConfigurator<T>
Parameters:
propertyObject - property to populate
name - property name
values - relevant property values from configuration
taskContext - current task context

instantiate

protected T instantiate(java.lang.Class<? extends T> propertyType)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.