예제 #1
0
 public void copyFrom(PortletDisplay master) {
   _access = master.isAccess();
   _active = master.isActive();
   _columnId = master.getColumnId();
   _content = master.getContent();
   _customCSSClassName = master.getCustomCSSClassName();
   _description = master.getDescription();
   _id = master.getId();
   _instanceId = master.getInstanceId();
   _modeAbout = master.isModeAbout();
   _modeConfig = master.isModeConfig();
   _modeEdit = master.isModeEdit();
   _modeEditDefaults = master.isModeEditDefaults();
   _modeEditGuest = master.isModeEditGuest();
   _modeHelp = master.isModeHelp();
   _modePreview = master.isModePreview();
   _modePrint = master.isModePrint();
   _namespace = master.getNamespace();
   _portletName = master.getPortletName();
   _portletSetup = master.getPortletSetup();
   _resourcePK = master.getResourcePK();
   _restoreCurrentView = master.isRestoreCurrentView();
   _rootPortletId = master.getRootPortletId();
   _showBackIcon = master.isShowBackIcon();
   _showCloseIcon = master.isShowCloseIcon();
   _showConfigurationIcon = master.isShowConfigurationIcon();
   _showEditDefaultsIcon = master.isShowEditDefaultsIcon();
   _showEditGuestIcon = master.isShowEditGuestIcon();
   _showEditIcon = master.isShowEditIcon();
   _showHelpIcon = master.isShowHelpIcon();
   _showMaxIcon = master.isShowMaxIcon();
   _showMinIcon = master.isShowMinIcon();
   _showMoveIcon = master.isShowMoveIcon();
   _showPortletCssIcon = master.isShowPortletCssIcon();
   _showPortletIcon = master.isShowPortletIcon();
   _showPrintIcon = master.isShowPrintIcon();
   _showRefreshIcon = master.isShowRefreshIcon();
   _stateExclusive = master.isStateExclusive();
   _stateMax = master.isStateMax();
   _stateMin = master.isStateMin();
   _stateNormal = master.isStateNormal();
   _statePopUp = master.isStatePopUp();
   _themeDisplay = master.getThemeDisplay();
   _title = master.getTitle();
   _urlBack = master.getURLBack();
   _urlClose = master.getURLClose();
   _urlConfiguration = master.getURLConfiguration();
   _urlEdit = master.getURLEdit();
   _urlEditDefaults = master.getURLEditDefaults();
   _urlExportImport = master.getURLExportImport();
   _urlHelp = master.getURLHelp();
   _urlMax = master.getURLMax();
   _urlMin = master.getURLMin();
   _urlPortlet = master.getURLPortlet();
   _urlPortletCss = master.getURLPortletCss();
   _urlPrint = master.getURLPrint();
   _urlRefresh = master.getURLRefresh();
   _webDAVEnabled = master.isWebDAVEnabled();
 }
  public String getRSSName() {
    if (_rssName == null) {
      ThemeDisplay themeDisplay = (ThemeDisplay) _request.getAttribute(WebKeys.THEME_DISPLAY);

      PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();

      _rssName = _portletPreferences.getValue("rssName", portletDisplay.getTitle());
    }

    return _rssName;
  }
예제 #3
0
  public static Map<String, String> getEmailFromDefinitionTerms(PortletRequest portletRequest) {

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

    Map<String, String> definitionTerms = new LinkedHashMap<>();

    definitionTerms.put(
        "[$COMPANY_ID$]",
        LanguageUtil.get(
            themeDisplay.getLocale(), "the-company-id-associated-with-the-message-board"));
    definitionTerms.put(
        "[$COMPANY_MX$]",
        LanguageUtil.get(
            themeDisplay.getLocale(), "the-company-mx-associated-with-the-message-board"));
    definitionTerms.put(
        "[$COMPANY_NAME$]",
        LanguageUtil.get(
            themeDisplay.getLocale(), "the-company-name-associated-with-the-message-board"));

    if (PropsValues.POP_SERVER_NOTIFICATIONS_ENABLED) {
      definitionTerms.put(
          "[$MAILING_LIST_ADDRESS$]",
          LanguageUtil.get(themeDisplay.getLocale(), "the-email-address-of-the-mailing-list"));
    }

    definitionTerms.put(
        "[$MESSAGE_USER_ADDRESS$]",
        LanguageUtil.get(
            themeDisplay.getLocale(), "the-email-address-of-the-user-who-added-the-message"));
    definitionTerms.put(
        "[$MESSAGE_USER_NAME$]",
        LanguageUtil.get(themeDisplay.getLocale(), "the-user-who-added-the-message"));

    PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();

    definitionTerms.put("[$PORTLET_NAME$]", HtmlUtil.escape(portletDisplay.getTitle()));

    definitionTerms.put(
        "[$SITE_NAME$]",
        LanguageUtil.get(
            themeDisplay.getLocale(), "the-site-name-associated-with-the-message-board"));

    return definitionTerms;
  }
예제 #4
0
  public static Map<String, String> getEmailDefinitionTerms(
      PortletRequest portletRequest, String emailFromAddress, String emailFromName) {

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

    Map<String, String> definitionTerms = new LinkedHashMap<>();

    definitionTerms.put(
        "[$CATEGORY_NAME$]",
        LanguageUtil.get(
            themeDisplay.getLocale(), "the-category-in-which-the-message-has-been-posted"));
    definitionTerms.put(
        "[$COMPANY_ID$]",
        LanguageUtil.get(
            themeDisplay.getLocale(), "the-company-id-associated-with-the-message-board"));
    definitionTerms.put(
        "[$COMPANY_MX$]",
        LanguageUtil.get(
            themeDisplay.getLocale(), "the-company-mx-associated-with-the-message-board"));
    definitionTerms.put(
        "[$COMPANY_NAME$]",
        LanguageUtil.get(
            themeDisplay.getLocale(), "the-company-name-associated-with-the-message-board"));
    definitionTerms.put("[$FROM_ADDRESS$]", HtmlUtil.escape(emailFromAddress));
    definitionTerms.put("[$FROM_NAME$]", HtmlUtil.escape(emailFromName));

    if (PropsValues.POP_SERVER_NOTIFICATIONS_ENABLED) {
      definitionTerms.put(
          "[$MAILING_LIST_ADDRESS$]",
          LanguageUtil.get(themeDisplay.getLocale(), "the-email-address-of-the-mailing-list"));
    }

    definitionTerms.put(
        "[$MESSAGE_BODY$]", LanguageUtil.get(themeDisplay.getLocale(), "the-message-body"));
    definitionTerms.put(
        "[$MESSAGE_ID$]", LanguageUtil.get(themeDisplay.getLocale(), "the-message-id"));
    definitionTerms.put(
        "[$MESSAGE_SUBJECT$]", LanguageUtil.get(themeDisplay.getLocale(), "the-message-subject"));
    definitionTerms.put(
        "[$MESSAGE_URL$]", LanguageUtil.get(themeDisplay.getLocale(), "the-message-url"));
    definitionTerms.put(
        "[$MESSAGE_USER_ADDRESS$]",
        LanguageUtil.get(
            themeDisplay.getLocale(), "the-email-address-of-the-user-who-added-the-message"));
    definitionTerms.put(
        "[$MESSAGE_USER_NAME$]",
        LanguageUtil.get(themeDisplay.getLocale(), "the-user-who-added-the-message"));

    Company company = themeDisplay.getCompany();

    definitionTerms.put("[$PORTAL_URL$]", company.getVirtualHostname());

    PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();

    definitionTerms.put("[$PORTLET_NAME$]", HtmlUtil.escape(portletDisplay.getTitle()));

    definitionTerms.put(
        "[$SITE_NAME$]",
        LanguageUtil.get(
            themeDisplay.getLocale(), "the-site-name-associated-with-the-message-board"));

    if (!PropsValues.MESSAGE_BOARDS_EMAIL_BULK) {
      definitionTerms.put(
          "[$TO_ADDRESS$]",
          LanguageUtil.get(themeDisplay.getLocale(), "the-address-of-the-email-recipient"));
      definitionTerms.put(
          "[$TO_NAME$]",
          LanguageUtil.get(themeDisplay.getLocale(), "the-name-of-the-email-recipient"));
    }

    return definitionTerms;
  }