Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor cosmetic updates

...

The Bean Validation API was designed to provide a standardized method for validating data within Java beans. As an added feature, it seemlessly integrates with several JEE6 technologies including JPA 2.0, JCA 1.6, and JSF 2.0. Additionally, JEE6 complaint servers are required to support bean validation and must include a validation provider. While a JEE6 environment provides some simplified packaging and configuration benefits, bean validation works equally well in a JSE environment. For simplicity, this primer will use a JSE environment, but the example code could be used within a JEE6 environment with very few modifications.

...

Finally, let's apply the new constraint to the getData() method on our Image class:.


Code Block
    @ImageContent
    public byte[] getData() {
        return data;
    }

...