com.atlassian.bamboo.fieldvalue
Interface ConfigObjectConverter


public interface ConfigObjectConverter

Interface to define an object that converts a List of FieldValueItem objects to and from an arbitrary type.


Method Summary
 org.apache.commons.configuration.HierarchicalConfiguration fromObjectToConfig(java.lang.Object o)
          Converts the object to a FieldValueItemHolder of FieldValueItems
 java.lang.Class getClassToConvert()
          Returns the class that this converter can convert
 java.lang.Object toObject(org.apache.commons.configuration.HierarchicalConfiguration fieldValueItems, java.lang.Object object)
          Converts a FieldValueItemHolder of FieldValueItem to an Object
 

Method Detail

getClassToConvert

java.lang.Class getClassToConvert()
Returns the class that this converter can convert

Returns:
must not be null

fromObjectToConfig

org.apache.commons.configuration.HierarchicalConfiguration fromObjectToConfig(java.lang.Object o)
Converts the object to a FieldValueItemHolder of FieldValueItems

Parameters:
o - must not be null
Returns:
FieldValueItemHolder of FieldValueItem. Never null
Throws:
java.lang.IllegalArgumentException - if cannot convert type

toObject

java.lang.Object toObject(org.apache.commons.configuration.HierarchicalConfiguration fieldValueItems,
                          java.lang.Object object)
Converts a FieldValueItemHolder of FieldValueItem to an Object

Parameters:
fieldValueItems - - must not be null
object - - object to convert. Must not be null
Returns:
the object, with any values in the passed in the list set


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