@Name(value="ottcFileValidator") @Scope(value=SESSION) @Install(precedence=31) public class FileValidatorBean extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected org.nuxeo.ecm.core.api.DocumentModel |
currentDocument |
protected org.nuxeo.ecm.core.api.CoreSession |
documentManager |
static String[] |
MEDIA_PRIMARY_MIME_TYPES
Media primary mime-types.
|
| Constructor and Description |
|---|
FileValidatorBean() |
| Modifier and Type | Method and Description |
|---|---|
String |
getFreeSpace()
Return the computed free size on the workspace (in case of workspace),
else return the default limit if specified
else return blank (no limit)
|
void |
validateMimeType(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
Checks if File has no media type file content.
|
public static final String[] MEDIA_PRIMARY_MIME_TYPES
@In(create=true,
required=false)
protected org.nuxeo.ecm.core.api.CoreSession documentManager
@In protected org.nuxeo.ecm.core.api.DocumentModel currentDocument
public void validateMimeType(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
throws javax.faces.validator.ValidatorException
context - component - value - javax.faces.validator.ValidatorExceptionpublic String getFreeSpace()
Copyright © 2020. All rights reserved.