Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-02

weblogic.descriptor.example
Class ExampleCustomValidator

java.lang.Object
  extended by weblogic.descriptor.example.ExampleCustomValidator

public class ExampleCustomValidator
extends Object

Defines custom validator methods used in the defintion of ExampleValidationBean. These methods illustrate the contract that a bean implementation has with its custom validation methods.


Constructor Summary
ExampleCustomValidator()
           
 
Method Summary
static void validateExampleValidationBean(ExampleValidationBean bean)
          On-demand bean level validator.
static void validateMinLessThanMax(ExampleValidationBean bean)
          On-demand validator that ensures that ExampleValidationBean.getMinimum() does not exceed ExampleValidationBean.getMaximum().
static void validateURI(String value)
          Ensure that the property value is a legal URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExampleCustomValidator

public ExampleCustomValidator()
Method Detail

validateExampleValidationBean

public static void validateExampleValidationBean(ExampleValidationBean bean)
                                          throws IllegalArgumentException
On-demand bean level validator. Note that the declaration pattern for this and a property level deferred validator is identical (see ExampleCustomValidator.validateMinLessThanMax(weblogic.descriptor.example.ExampleValidationBean)).

Parameters:
bean - - bean to be validated
Throws:
IllegalArgumentException - if validation fails.

validateURI

public static void validateURI(String value)
                        throws IllegalArgumentException
Ensure that the property value is a legal URI. This validator is used by ExampleValidationBean.setURI(java.lang.String).

Parameters:
value - - bean to be validated
Throws:
IllegalArgumentException - if validation fails.

validateMinLessThanMax

public static void validateMinLessThanMax(ExampleValidationBean bean)
                                   throws IllegalArgumentException
On-demand validator that ensures that ExampleValidationBean.getMinimum() does not exceed ExampleValidationBean.getMaximum().

Parameters:
bean - - bean to be validated
Throws:
IllegalArgumentException - if validation fails.

Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-02