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

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.metadata.model.MetadataChecks
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Action, hudson.model.ModelObject, hudson.model.RootAction

@Extension
public class MetadataChecks
extends Object
implements hudson.model.RootAction

Checks for the different Metadata values and definitions.

Author:
Tomas Westling <thomas.westling@sonyericsson.com>

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
MetadataChecks()
           
 
Method Summary
 hudson.util.FormValidation doCheckDateValue(String yearValue, String monthValue, String dayValue)
          Form validation for the date values.
 hudson.util.FormValidation doCheckName(String value)
          Form validation for Metadata names.
 hudson.util.FormValidation doCheckNumberValue(String value)
          Form validation for number values.
 hudson.util.FormValidation doCheckTimeValue(String hourValue, String minuteValue, String secondValue)
          Form validation for the time values.
 String getDisplayName()
           
 String getIconFileName()
           
 String getUrlName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataChecks

public MetadataChecks()
Method Detail

getIconFileName

public String getIconFileName()
Specified by:
getIconFileName in interface hudson.model.Action

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface hudson.model.Action
Specified by:
getDisplayName in interface hudson.model.ModelObject

getUrlName

public String getUrlName()
Specified by:
getUrlName in interface hudson.model.Action

doCheckName

public hudson.util.FormValidation doCheckName(@QueryParameter
                                              String value)
Form validation for Metadata names. The check fails if there is no name or if it contains whitespace.

Parameters:
value - the number value.
Returns:
FormValidation.ok() if the value is a number.

doCheckNumberValue

public hudson.util.FormValidation doCheckNumberValue(@QueryParameter
                                                     String value)
Form validation for number values. The check fails if the number can't be parsed.

Parameters:
value - the number value.
Returns:
FormValidation.ok() if the value is a number.

doCheckDateValue

public hudson.util.FormValidation doCheckDateValue(@QueryParameter
                                                   String yearValue,
                                                   @QueryParameter
                                                   String monthValue,
                                                   @QueryParameter
                                                   String dayValue)
Form validation for the date values. The check fails if the numbers can't be parsed or if they don't follow the formatting rules for year/month/day.

Parameters:
yearValue - the year value.
monthValue - the month value.
dayValue - the day value.
Returns:
FormValidation.ok() if the values are numbers and follow the rules.

doCheckTimeValue

public hudson.util.FormValidation doCheckTimeValue(@QueryParameter
                                                   String hourValue,
                                                   @QueryParameter
                                                   String minuteValue,
                                                   @QueryParameter
                                                   String secondValue)
Form validation for the time values. The check fails if the numbers can't be parsed or if they don't follow the formatting rules for hour/minute/second.

Parameters:
hourValue - the hour value.
minuteValue - the minute value.
secondValue - the second value.
Returns:
FormValidation.ok() if the values are numbers and follow the rules.


Copyright © 2004-2013. All Rights Reserved.