com.sonyericsson.hudson.plugins.metadata.model.definitions
Class StringMetadataDefinition

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.metadata.model.definitions.AbstractMetadataDefinition
      extended by com.sonyericsson.hudson.plugins.metadata.model.definitions.StringMetadataDefinition
All Implemented Interfaces:
MetadataDefinition, Metadata<MetadataDefinition>, hudson.model.Describable<AbstractMetadataDefinition>, Serializable

public class StringMetadataDefinition
extends AbstractMetadataDefinition

A metadata definition of the type String.

Author:
Tomas Westling <thomas.westling@sonyericsson.com>
See Also:
Serialized Form

Nested Class Summary
static class StringMetadataDefinition.StringMetaDataDefinitionDescriptor
          The Descriptor.
 
Nested classes/interfaces inherited from class com.sonyericsson.hudson.plugins.metadata.model.definitions.AbstractMetadataDefinition
AbstractMetadataDefinition.AbstractMetaDataDefinitionDescriptor
 
Constructor Summary
StringMetadataDefinition(String name, String defaultValue)
          Standard Constructor.
StringMetadataDefinition(String name, String description, String defaultValue, boolean exposedToEnvironment)
          Standard Constructor.
 
Method Summary
 StringMetadataValue createValue(Object o)
          Creates an AbstractMetadataValue from this definition.
 String getDefaultValue()
          Returns default metadata values for this definition.
 
Methods inherited from class com.sonyericsson.hudson.plugins.metadata.model.definitions.AbstractMetadataDefinition
getAll, getDescription, getDescriptor, getFullName, getFullName, getFullNameFrom, getFullPath, getName, getParent, getType, getValue, isExposedToEnvironment, setExposeToEnvironment, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringMetadataDefinition

@DataBoundConstructor
public StringMetadataDefinition(String name,
                                                     String description,
                                                     String defaultValue,
                                                     boolean exposedToEnvironment)
Standard Constructor.

Parameters:
name - the name.
description - the description.
defaultValue - the default value for this definition
exposedToEnvironment - if this definition should be exposed to the build as an environment variable.

StringMetadataDefinition

public StringMetadataDefinition(String name,
                                String defaultValue)
Standard Constructor.

Parameters:
name - the name.
defaultValue - the default value.
Method Detail

createValue

public StringMetadataValue createValue(Object o)
Description copied from class: AbstractMetadataDefinition
Creates an AbstractMetadataValue from this definition. Uses the input parameter Object to create the AbstractMetadataValue.

Specified by:
createValue in interface MetadataDefinition
Specified by:
createValue in class AbstractMetadataDefinition
Parameters:
o - the value to use as input for creating the AbstractMetadataValue.
Returns:
the AbstractMetadataValue.

getDefaultValue

public String getDefaultValue()
Returns default metadata values for this definition.

Overrides:
getDefaultValue in class AbstractMetadataDefinition
Returns:
default metadata values or null if no defaults are available


Copyright © 2004-2013. All Rights Reserved.