org.org.usurper.handlers.additional
Class ListOfValuesSpecificPropertyHandler

java.lang.Object
  extended by org.org.usurper.handlers.basic.AbstractSpecificPropertyHandler
      extended by org.org.usurper.handlers.additional.ListOfValuesSpecificPropertyHandler
All Implemented Interfaces:
IHandler

public class ListOfValuesSpecificPropertyHandler
extends AbstractSpecificPropertyHandler

This handler will give a specific property a value amongst a list of values.
This value will be picked in a parameterized list of values.
The handler will iterate the list until every value is attributed and will then start again from the beginning.

Author:
pagregoire

Constructor Summary
ListOfValuesSpecificPropertyHandler(SpecificPropertyDefinition specificPropertyDefinition, java.util.List<?> values)
           
 
Method Summary
 java.lang.Object handle(HandledBeanProperty handledBeanProperty)
          This method allows the generation of a properties' value.
 java.lang.Object handle(HandledConstructorArg handledBeanProperty)
          This method allows the generation of a constructor argument.
 
Methods inherited from class org.org.usurper.handlers.basic.AbstractSpecificPropertyHandler
getHandledPropertyName, getTargetProperty, getValueObjectClass, setHandledPropertyName, setValueObjectClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListOfValuesSpecificPropertyHandler

public ListOfValuesSpecificPropertyHandler(SpecificPropertyDefinition specificPropertyDefinition,
                                           java.util.List<?> values)
Parameters:
specificPropertyDefinition -
values -
Method Detail

handle

public java.lang.Object handle(HandledBeanProperty handledBeanProperty)
Description copied from interface: IHandler
This method allows the generation of a properties' value.

Parameters:
handledBeanProperty - The bean property's info
Returns:
the generated value.
See Also:
IHandler.handle(org.org.usurper.model.HandledBeanProperty)

handle

public java.lang.Object handle(HandledConstructorArg handledBeanProperty)
Description copied from interface: IHandler
This method allows the generation of a constructor argument.

Parameters:
handledBeanProperty - The constructor's arg's info
Returns:
the generated value.
See Also:
IHandler.handle(org.org.usurper.model.HandledConstructorArg)


Copyright © 2008. All Rights Reserved.