com.atlassian.renderer.v2.macro.basic.validator
Class WidthSizeValidator

java.lang.Object
  extended by com.atlassian.renderer.v2.macro.basic.validator.WidthSizeValidator
All Implemented Interfaces:
ParameterValidator

public class WidthSizeValidator
extends java.lang.Object
implements ParameterValidator

Validates that a parameter is a valid width value. It validates for a number, optionally followed by 'px' or '%'.


Method Summary
 void assertValid(java.lang.String parameterValue)
          Throws a MacroParameterValidationException if the property value is invalid.
static WidthSizeValidator getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static WidthSizeValidator getInstance()

assertValid

public void assertValid(java.lang.String parameterValue)
                 throws MacroParameterValidationException
Description copied from interface: ParameterValidator
Throws a MacroParameterValidationException if the property value is invalid. Implementations should check for null and handle it appropriately appropriately.

Specified by:
assertValid in interface ParameterValidator
Parameters:
parameterValue - the property value to validate
Throws:
MacroParameterValidationException - if the property value is invalid


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.