use of teammates.ui.pagedata.AdminEmailCreateGroupReceiverListUploadUrlAjaxPageData in project teammates by TEAMMATES.
the class AdminEmailCreateGroupReceiverListUploadUrlAction method execute.
@Override
protected ActionResult execute() {
gateKeeper.verifyAdminPrivileges(account);
AdminEmailCreateGroupReceiverListUploadUrlAjaxPageData data = new AdminEmailCreateGroupReceiverListUploadUrlAjaxPageData(account, sessionToken);
try {
String callbackUrl = Url.addParamToUrl(Const.ActionURIs.ADMIN_EMAIL_GROUP_RECEIVER_LIST_UPLOAD, Const.ParamsNames.SESSION_TOKEN, sessionToken);
data.nextUploadUrl = GoogleCloudStorageHelper.getNewUploadUrl(callbackUrl);
data.ajaxStatus = "Group receiver list upload url created, proceed to uploading";
} catch (BlobstoreFailureException | IllegalArgumentException e) {
data.nextUploadUrl = null;
isError = true;
data.ajaxStatus = "An error occurred when creating upload URL, please try again";
}
return createAjaxResult(data);
}
Aggregations