com.atlassian.bamboo.ant.task.property
Class AbstractBeanTaskPropertyConfigurator<T>
java.lang.Object
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
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 |
AbstractBeanTaskPropertyConfigurator
protected AbstractBeanTaskPropertyConfigurator(java.lang.Class<T> beanType)
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 typename
- property namevalues
- relevant property values from configurationtaskContext
- 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 populatename
- property namevalues
- relevant property values from configurationtaskContext
- current task context
instantiate
protected T instantiate(java.lang.Class<? extends T> propertyType)
Copyright © 2012 Atlassian. All Rights Reserved.