org.specrunner.parameters.core
Class UtilParametrized

java.lang.Object
  extended by org.specrunner.parameters.core.UtilParametrized

public final class UtilParametrized
extends Object

Helper class for setting parametrized objects.

Author:
Thiago Santos

Method Summary
static void setProperties(IContext context, IParameterHolder holder, nu.xom.Element element)
          Sets the properties of a given object based on attributes of a element.
static void setProperties(IContext context, IParameterHolder holder, nu.xom.Element element, boolean onCreate)
          Sets the properties of a given object based on attributes of a element.
static void setProperties(IContext context, IParameterHolder holder, Map<String,Object> parameters)
          Sets the properties of a given object based on attributes of a element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setProperties

public static void setProperties(IContext context,
                                 IParameterHolder holder,
                                 nu.xom.Element element)
                          throws PluginException
Sets the properties of a given object based on attributes of a element.

Parameters:
context - The context.
holder - The parameterized object whose attributes will be set based on element attributes.
element - The reference element.
Throws:
PluginException - On setting errors.

setProperties

public static void setProperties(IContext context,
                                 IParameterHolder holder,
                                 nu.xom.Element element,
                                 boolean onCreate)
                          throws PluginException
Sets the properties of a given object based on attributes of a element.

Parameters:
context - The context.
holder - The parameterized object whose attributes will be set based on element attributes.
element - The reference element.
onCreate - true, if in creation time, false, otherwise.
Throws:
PluginException - On setting errors.

setProperties

public static void setProperties(IContext context,
                                 IParameterHolder holder,
                                 Map<String,Object> parameters)
                          throws PluginException
Sets the properties of a given object based on attributes of a element.

Parameters:
context - The context.
holder - The parameterized object whose attributes will be set based on element attributes.
parameters - Map of parameters.
Throws:
PluginException - On setting errors.


Copyright © 2014. All rights reserved.