org.loom.annotation.validation
Annotation Type ImageValidation


@Retention(value=RUNTIME)
@Target(value=METHOD)
@Documented
public @interface ImageValidation

Validates a FileParameter that is expected to contain only images


Required Element Summary
 java.lang.String parameterName
          name of the expected parameter
 
Optional Element Summary
 java.lang.String[] formats
          if provided, only allows the specified image formats (gif, jpg, jpeg, bmp, png, tiff)
 int maxFileSize
          the maximum file size in bytes, defaults to -1
 int maxHeight
          the maximum height of the image, defaults to -1
 int maxWidth
          the maximum width of the image, defaults to -1
 int minHeight
          the minimum height of the image, defaults to -1
 int minWidth
          the minimum width of the image, defaults to -1
 

Element Detail

parameterName

public abstract java.lang.String parameterName
name of the expected parameter

formats

public abstract java.lang.String[] formats
if provided, only allows the specified image formats (gif, jpg, jpeg, bmp, png, tiff)

Default:
{}

minWidth

public abstract int minWidth
the minimum width of the image, defaults to -1

Default:
-1

maxWidth

public abstract int maxWidth
the maximum width of the image, defaults to -1

Default:
-1

minHeight

public abstract int minHeight
the minimum height of the image, defaults to -1

Default:
-1

maxHeight

public abstract int maxHeight
the maximum height of the image, defaults to -1

Default:
-1

maxFileSize

public abstract int maxFileSize
the maximum file size in bytes, defaults to -1

Default:
-1