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

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

public class DateMetadataDefinition
extends AbstractMetadataDefinition

Meta data with the value of a Date.

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

Nested Class Summary
static class DateMetadataDefinition.DateMetaDataDefinitionDescriptor
          Descriptor for DateMetadataDefinitions.
 
Nested classes/interfaces inherited from class com.sonyericsson.hudson.plugins.metadata.model.definitions.AbstractMetadataDefinition
AbstractMetadataDefinition.AbstractMetaDataDefinitionDescriptor
 
Constructor Summary
DateMetadataDefinition(String name, String description, int defaultYear, int defaultMonth, int defaultDay, TimeDetails details)
          Standard Constructor.
 
Method Summary
 AbstractMetadataValue createValue(Object o)
          Creates an AbstractMetadataValue from this definition.
 int getDefaultDay()
          Getter for the defaultDay.
 int getDefaultHour()
          Getter for the default hour.
 int getDefaultMinute()
          Getter for the default minute.
 int getDefaultMonth()
          Getter for the defaultMonth.
 int getDefaultSecond()
          Getter for the default second.
 Date getDefaultValue()
          Returns default metadata values for this definition.
 int getDefaultYear()
          Getter for the defaultYear.
 boolean isChecked()
          Returns the checked value, used to decide if the time details should be visible.
 
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

DateMetadataDefinition

@DataBoundConstructor
public DateMetadataDefinition(String name,
                                                   String description,
                                                   int defaultYear,
                                                   int defaultMonth,
                                                   int defaultDay,
                                                   TimeDetails details)
Standard Constructor.

Parameters:
name - the name
defaultYear - the default year.
defaultMonth - the default month of the year.
defaultDay - the default day of the month.
description - the description.
details - the optional time details, hour/minute/second.
Method Detail

getDefaultYear

public int getDefaultYear()
Getter for the defaultYear.

Returns:
the default year.

getDefaultMonth

public int getDefaultMonth()
Getter for the defaultMonth.

Returns:
the default month of the year.

getDefaultDay

public int getDefaultDay()
Getter for the defaultDay.

Returns:
the default day of the month.

getDefaultHour

public int getDefaultHour()
Getter for the default hour.

Returns:
the default hour of the day..

getDefaultMinute

public int getDefaultMinute()
Getter for the default minute.

Returns:
the default minute of the hour.

getDefaultSecond

public int getDefaultSecond()
Getter for the default second.

Returns:
the default second.

isChecked

public boolean isChecked()
Returns the checked value, used to decide if the time details should be visible.

Returns:
the checked value.

getDefaultValue

public Date getDefaultValue()
Description copied from class: AbstractMetadataDefinition
Returns default metadata values for this definition.

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

createValue

public AbstractMetadataValue 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.


Copyright © 2004-2013. All Rights Reserved.