public class ImageUploadValidationService extends DefaultUploadValidationService
DefaultUploadValidationService.Validator
Modifier and Type | Field and Description |
---|---|
static String[] |
DEFAULT_EXTENSIONS_ALLOWED |
static String |
DEFAULT_IMAGE_VALIDATION_SERVICE_ID |
static String |
DEFAULT_MAX_FILE_SIZE |
static int |
DEFAULT_MAX_HEIGHT |
static int |
DEFAULT_MAX_WIDTH |
EXTENSIONS_ALLOWED, MAX_FILE_SIZE, MIME_TYPES_ALLOWED
VALIDATE_ID
Constructor and Description |
---|
ImageUploadValidationService(org.apache.wicket.util.value.IValueMap params) |
Modifier and Type | Method and Description |
---|---|
protected String[] |
getDefaultExtensionsAllowed() |
protected String |
getDefaultMaxFileSize()
Check if the defaultMaximumUploadSize stored in the IApplicationSettings is set explicitly and only
then used it, otherwise use DEFAULT_MAX_FILE_SIZE.
|
static FileUploadValidationService |
getValidationService(IPluginContext pluginContext,
IPluginConfig pluginConfig)
Get the validation service specified by the parameter
IValidationService.VALIDATE_ID in the plugin config. |
addValidator, addViolation, getAllowedExtensions, getMaxFileSize, getValidationResult, getValidationService, setAllowedExtensions, setAllowedMimeTypes, validate, validate
public static final String DEFAULT_IMAGE_VALIDATION_SERVICE_ID
public static final int DEFAULT_MAX_WIDTH
public static final int DEFAULT_MAX_HEIGHT
public static final String DEFAULT_MAX_FILE_SIZE
public static final String[] DEFAULT_EXTENSIONS_ALLOWED
public ImageUploadValidationService(org.apache.wicket.util.value.IValueMap params)
protected String[] getDefaultExtensionsAllowed()
getDefaultExtensionsAllowed
in class DefaultUploadValidationService
protected String getDefaultMaxFileSize()
DefaultUploadValidationService
getDefaultMaxFileSize
in class DefaultUploadValidationService
public static FileUploadValidationService getValidationService(IPluginContext pluginContext, IPluginConfig pluginConfig)
IValidationService.VALIDATE_ID
in the plugin config.
If no service id configuration is found, the service with id
DEFAULT_IMAGE_VALIDATION_SERVICE_ID
is used.Copyright © 2007–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.