/**
* @see org.andromda.metafacades.uml.ModelElementFacade#getTemplateParameter(java.lang.String)
*/
protected Object handleGetTemplateParameter(String parameterName)
{
TemplateParameterFacade templateParameter = null;
if (StringUtils.isNotEmpty(parameterName))
{
parameterName = StringUtils.trimToEmpty(parameterName);
final Collection parameters = this.getTemplateParameters();
if (parameters != null && !parameters.isEmpty())
{
for (final Iterator iterator = parameters.iterator(); iterator.hasNext();)
{
final TemplateParameterFacade currentTemplateParameter = (TemplateParameterFacade)iterator.next();
if (currentTemplateParameter.getParameter() != null)
{
final ModelElementFacade parameter = currentTemplateParameter.getParameter();
// there should not be two template parameters with the same parameter name, but nothing
// prevents the model from allowing that. So return the first instance if found.
if (parameterName.equals(parameter.getName()))
{