com.atlassian.renderer.v2.macro.basic.validator
Class ColorStyleValidator
java.lang.Object
com.atlassian.renderer.v2.macro.basic.validator.ColorStyleValidator
- All Implemented Interfaces:
- ParameterValidator
public class ColorStyleValidator
- extends java.lang.Object
- implements ParameterValidator
Validates that a parameter is a valid color property value.
This class was originally very strict and would only allow valid CSS2 color values. However, due to
CONF-10001 this restriction is currently relaxed. It would be nice to reinstate that strictness at
some later date.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAMED_COLOR_PATTERN
public static final java.util.regex.Pattern NAMED_COLOR_PATTERN
HEX_SHORT_COLOR_PATTERN
public static final java.util.regex.Pattern HEX_SHORT_COLOR_PATTERN
HEX_LONG_COLOR_MATCH
public static final java.util.regex.Pattern HEX_LONG_COLOR_MATCH
RGB_COLOR_PATTERN
public static final java.util.regex.Pattern RGB_COLOR_PATTERN
PERC_COLOR_PATTERN
public static final java.util.regex.Pattern PERC_COLOR_PATTERN
getInstance
public static ColorStyleValidator getInstance()
assertValid
public void assertValid(java.lang.String propertyValue)
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:
propertyValue - the property value to validate
- Throws:
MacroParameterValidationException - if the property value is invalid
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.