org.loom.annotation.validation
Annotation Type FileValidation


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

Validates an uploaded FileParameter


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 file extensions (txt, gif, etc).
 int maxFileSize
          the maximum file size in bytes, 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 file extensions (txt, gif, etc). It does not validate file contents, though

Default:
{}

maxFileSize

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

Default:
-1