}
}
protected void doCheckExecutionConditions() throws Exception {
super.doCheckExecutionConditions();
Part file = getPart("file");
if (file == null) {
addErrorMessage("missing-file");
} else {
if (file.isRejected()) {
String[] params = { Integer.toString(file.getSize()) };
addErrorMessage("upload-size-exceeded", params);
} else {
String mimeType = file.getMimeType();
if (!OpenDocumentWrapper.ODT_MIME_TYPE.equals(mimeType)) {
String[] params = { mimeType, OpenDocumentWrapper.ODT_MIME_TYPE };
addErrorMessage("wrong-mime-type", params);
}
}