com.sonyericsson.hudson.plugins.metadata.model
Class MetadataValueDefinitionHelper

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.metadata.model.MetadataValueDefinitionHelper

public class MetadataValueDefinitionHelper
extends Object

Help class for definition and value comparison.

Author:
Tomas Westling <tomas.westling@sonymobile.com>

Constructor Summary
MetadataValueDefinitionHelper(Collection<MetadataValue> values)
          Standard constructor.
 
Method Summary
 Object getValueForDefinition(Metadata definition)
          Gets the value of a definition.
 Collection<MetadataValue> getValues()
          Standard getter for the values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataValueDefinitionHelper

public MetadataValueDefinitionHelper(Collection<MetadataValue> values)
Standard constructor.

Parameters:
values - the MetadataValues to use as a starting point.
Method Detail

getValues

public Collection<MetadataValue> getValues()
Standard getter for the values.

Returns:
the MetadataValues.

getValueForDefinition

public Object getValueForDefinition(Metadata definition)
Gets the value of a definition. If a corresponding MetadataValue exists for this definition, use the value of the MetadataValue. If not, use the default value of the MetadataDefinition.

Parameters:
definition - the MetadataDefinition to find the corresponding String value for.
Returns:
the user input value or default if not found.


Copyright © 2004-2013. All Rights Reserved.