Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.example.gallery.constraint
Class ImageValidator

    java.lang.Object
      org.apache.openjpa.example.gallery.constraint.ImageValidator

All Implemented Interfaces:
  ConstraintValidator<ImageConstraint,Image>

    public class ImageValidator

extends Object
implements ConstraintValidator<ImageConstraint,Image>

Simple validator used to verify that image data is of a supported type

Constructor Summary
`ImageValidator()`

Method Summary
`void` | `initialize(ImageConstraint constraint)` Configure the constraint validator based on the image types it should support.
`boolean` | `isValid(Image value, ConstraintValidatorContext context)` Validate a specified value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ImageValidator

    public ImageValidator()

Method Detail

### initialize

    public void initialize(ImageConstraint constraint)

  Configure the constraint validator based on the image types it should support.

  Specified by:
    `initialize` in interface `ConstraintValidator<ImageConstraint,Image>`
  Parameters:
    `constraint` - the constraint definition

### isValid

    public boolean isValid(Image value,
                           ConstraintValidatorContext context)

  Validate a specified value.

  Specified by:
    `isValid` in interface `ConstraintValidator<ImageConstraint,Image>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.