Package com.liferay.portal.kernel.upload

Examples of com.liferay.portal.kernel.upload.UploadPortletRequest


    }
  }

    public void updateWallEntry(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
       
        UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
        long wallEntryId = ParamUtil.getLong(uploadRequest, "wallEntryId");

        try {
            String comments = ParamUtil.getString(uploadRequest, "comments");
            WallEntryLocalServiceUtil.updateWallEntry(wallEntryId, comments);
View Full Code Here


  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,
View Full Code Here

TOP

Related Classes of com.liferay.portal.kernel.upload.UploadPortletRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.