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 ImageContentValidator

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

All Implemented Interfaces:
  ConstraintValidator<ImageContent,byte[]>

    public class ImageContentValidator

extends Object
implements ConstraintValidator<ImageContent,byte[]>

Simple check that file format is of a supported type

Constructor Summary
`ImageContentValidator()`

Method Summary
`void` | `initialize(ImageContent constraint)` Configure the constraint validator based on the image types it should support.
`boolean` | `isValid(byte[] 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

### ImageContentValidator

    public ImageContentValidator()

Method Detail

### initialize

    public void initialize(ImageContent constraint)

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

  Specified by:
    `initialize` in interface `ConstraintValidator<ImageContent,byte[]>`
  Parameters:
    `constraint` - the constraint definition

### isValid

    public boolean isValid(byte[] value,
                           ConstraintValidatorContext context)

  Validate a specified value.

  Specified by:
    `isValid` in interface `ConstraintValidator<ImageContent,byte[]>`

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.