public void updateMeetupsEntry(
ActionRequest actionRequest, ActionResponse actionResponse)
throws Exception {
UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(
actionRequest);
ThemeDisplay themeDisplay = (ThemeDisplay)uploadRequest.getAttribute(
WebKeys.THEME_DISPLAY);
PermissionChecker permissionChecker =
themeDisplay.getPermissionChecker();
if (!permissionChecker.isCompanyAdmin()) {
return;
}
long meetupsEntryId = ParamUtil.getLong(
uploadRequest, "meetupsEntryId");
String title = ParamUtil.getString(uploadRequest, "title");
String description = ParamUtil.getString(uploadRequest, "description");
int startDateMonth = ParamUtil.getInteger(
uploadRequest, "startDateMonth");
int startDateDay = ParamUtil.getInteger(uploadRequest, "startDateDay");
int startDateYear = ParamUtil.getInteger(
uploadRequest, "startDateYear");
int startDateHour = ParamUtil.getInteger(
uploadRequest, "startDateHour");
int startDateMinute = ParamUtil.getInteger(
uploadRequest, "startDateMinute");
int startDateAmPm = ParamUtil.getInteger(
uploadRequest, "startDateAmPm");
if (startDateAmPm == Calendar.PM) {
startDateHour += 12;
}
int endDateMonth = ParamUtil.getInteger(uploadRequest, "endDateMonth");
int endDateDay = ParamUtil.getInteger(uploadRequest, "endDateDay");
int endDateYear = ParamUtil.getInteger(uploadRequest, "endDateYear");
int endDateHour = ParamUtil.getInteger(uploadRequest, "endDateHour");
int endDateMinute = ParamUtil.getInteger(
uploadRequest, "endDateMinute");
int endDateAmPm = ParamUtil.getInteger(uploadRequest, "endDateAmPm");
if (endDateAmPm == Calendar.PM) {
endDateHour += 12;
}
int totalAttendees = ParamUtil.getInteger(
uploadRequest, "totalAttendees");
int maxAttendees = ParamUtil.getInteger(uploadRequest, "maxAttendees");
double price = ParamUtil.getDouble(uploadRequest, "price");
File file = uploadRequest.getFile("fileName");
byte[] bytes = FileUtil.getBytes(file);
if (meetupsEntryId <= 0) {
MeetupsEntryLocalServiceUtil.addMeetupsEntry(
themeDisplay.getUserId(), title, description, startDateMonth,