Examples of ThemeDisplay


Examples of com.liferay.portal.theme.ThemeDisplay

    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,
        startDateDay, startDateYear, startDateHour, startDateMinute,
        endDateMonth, endDateDay, endDateYear, endDateHour,
        endDateMinute, totalAttendees, maxAttendees, price, bytes);
    }
    else {
      MeetupsEntryLocalServiceUtil.updateMeetupsEntry(
        themeDisplay.getUserId(), meetupsEntryId, title, description,
        startDateMonth, startDateDay, startDateYear, startDateHour,
        startDateMinute, endDateMonth, endDateDay, endDateYear,
        endDateHour, endDateMinute, totalAttendees, maxAttendees,
        price, bytes);
    }
View Full Code Here

Examples of com.liferay.portal.theme.ThemeDisplay

  public void updateMeetupsRegistration(
      ActionRequest actionRequest, ActionResponse actionResponse)
    throws Exception {

    ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(
      WebKeys.THEME_DISPLAY);

    long meetupsEntryId = ParamUtil.getLong(
      actionRequest, "meetupsEntryId");
    int status = ParamUtil.getInteger(actionRequest, "status");
    String comments = ParamUtil.getString(actionRequest, "comments");

    MeetupsRegistrationLocalServiceUtil.updateMeetupsRegistration(
      themeDisplay.getUserId(), meetupsEntryId, status, comments);
  }
View Full Code Here

Examples of com.liferay.portal.theme.ThemeDisplay

  public void processAction(StrutsPortletAction originalStrutsPortletAction,
      PortletConfig portletConfig, ActionRequest actionRequest,
      ActionResponse actionResponse) throws Exception {
   
    ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(
        WebKeys.THEME_DISPLAY);

    Company company = themeDisplay.getCompany();
   
    String cmd = ParamUtil.getString(actionRequest, Constants.CMD);
   
    System.out.println("Wrapped /login/create_account, cmd: "+cmd);
   
View Full Code Here

Examples of com.liferay.portal.theme.ThemeDisplay

  }

  protected void sendRedirect(ActionRequest actionRequest, ActionResponse actionResponse)
    throws Exception {
 
    ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(
        WebKeys.THEME_DISPLAY);
 
    PortletURL portletURL = PortletURLFactoryUtil.create(
        actionRequest, PortletKeys.LOGIN, themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);
 
    portletURL.setWindowState(WindowState.MAXIMIZED);
    portletURL.setPortletMode(PortletMode.VIEW);
 
    portletURL.setParameter("saveLastPath", "0");
View Full Code Here

Examples of com.liferay.portal.theme.ThemeDisplay

   
    super.processAction(actionRequest, actionResponse);
 
 
  protected void updateEntry(ActionRequest actionRequest) throws Exception {
    ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(
        WebKeys.THEME_DISPLAY);

    long entryId = ParamUtil.getLong(actionRequest, "entryId");
    long userId = themeDisplay.getUserId();

    String summary = ParamUtil.getString(actionRequest, "summary");
   
    int quantity = ParamUtil.getInteger(actionRequest, "quantity");
    double price = ParamUtil.getDouble(actionRequest, "price");
View Full Code Here

Examples of com.liferay.portal.theme.ThemeDisplay

    }
  }
 
  protected void deleteEntry(ActionRequest actionRequest) throws Exception {
   
    ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(
        WebKeys.THEME_DISPLAY);

    long entryId = ParamUtil.getLong(actionRequest, "entryId");
    long userId = themeDisplay.getUserId();
   
    User currentUser = UserLocalServiceUtil.getUser(userId);
   
    Warrant warrant = WarrantLocalServiceUtil.getWarrant(entryId);
    boolean isAdmin = false;
View Full Code Here

Examples of com.liferay.portal.theme.ThemeDisplay

    if(mailMessage == null || mailMessage.length()<=0){
      SessionErrors.add(actionRequest,"mailMessage-required");
      return;
    }

    ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(
        WebKeys.THEME_DISPLAY);

    long entryId = ParamUtil.getLong(actionRequest, "entryId");
    long userId = themeDisplay.getUserId();

    Warrant warrant;
    User currentUser;
    User sellingUser;
    try {
View Full Code Here

Examples of com.liferay.portal.theme.ThemeDisplay

    PortletRequest portletRequest = (PortletRequest) externalContext.getRequest();
    this.alpha = portletRequest.getParameter("alpha");
    this.beta = portletRequest.getParameter("beta");
    this.gamma = portletRequest.getParameter("gamma");

    ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);
    String portalURL = PortalUtil.getPortalURL(portletRequest);
    this.requestedURL = portalURL + StringPool.FORWARD_SLASH + themeDisplay.getURLCurrent();
  }
View Full Code Here

Examples of com.liferay.portal.theme.ThemeDisplay

    if (id == null) {

      FacesContext facesContext = FacesContext.getCurrentInstance();
      ExternalContext externalContext = facesContext.getExternalContext();
      String portletNamespace = StringPool.BLANK;
      ThemeDisplay themeDisplay = (ThemeDisplay) externalContext.getRequestMap().get(WebKeys.THEME_DISPLAY);

      if (themeDisplay != null) {
        PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();
        portletNamespace = portletDisplay.getNamespace();
      }

      char separatorChar = UINamingContainer.getSeparatorChar(facesContext);
      String clientWindowCounterKey = CLIENT_WINDOW_COUNTER_KEY + separatorChar + portletNamespace;
View Full Code Here

Examples of com.liferay.portal.theme.ThemeDisplay

    Object returnValue = null;

    if (method.getName().equals("getCreateAccountURL")) {
      HttpServletRequest httpServletRequest = (HttpServletRequest) arguments[0];
      ThemeDisplay themeDisplay = (ThemeDisplay) arguments[1];
      returnValue = getCreateAccountURL(httpServletRequest, themeDisplay);
    }
    else {
      returnValue = super.invoke(proxy, method, arguments);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.