@Override
 @Reference(
     target = "(osgi.web.symbolicname=com.liferay.asset.categories.navigation.web)",
     unbind = "-")
 public void setServletContext(ServletContext servletContext) {
   super.setServletContext(servletContext);
 }
  /*
   * (non-Javadoc)
   *
   * @see
   * com.liferay.portal.kernel.portlet.DefaultConfigurationAction#processAction
   * (javax.portlet.PortletConfig, javax.portlet.ActionRequest,
   * javax.portlet.ActionResponse)
   */
  @Override
  public void processAction(
      PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse)
      throws Exception {

    String cmd = ParamUtil.getString(actionRequest, Constants.CMD);
    if (cmd.equals(Constants.UPDATE)) {
      setPreference(
          actionRequest,
          Constants.PREFERENCE_VIEW_ALL_RESULTS_PER_PAGE,
          ParamUtil.getString(actionRequest, Constants.PARAMETER_VIEW_ALL_RESULTS_PER_PAGE));
      setPreference(
          actionRequest,
          Constants.PREFERENCE_SEARCH_RESULTS_PER_PAGE,
          ParamUtil.getString(actionRequest, Constants.PARAMETER_SEARCH_RESULTS_PER_PAGE));
      setPreference(
          actionRequest,
          Constants.SKYPE_INTEGRATION,
          ParamUtil.getString(actionRequest, Constants.SKYPE_INTEGRATION));
      setPreference(
          actionRequest,
          Constants.HANGOUTS_INTEGRATION,
          ParamUtil.getString(actionRequest, Constants.HANGOUTS_INTEGRATION));
      setPreference(
          actionRequest,
          Constants.SKILLS_INTEGRATION,
          ParamUtil.getString(actionRequest, Constants.SKILLS_INTEGRATION));
    }
    super.processAction(portletConfig, actionRequest, actionResponse);
  }
  @Override
  public void processAction(
      PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse)
      throws Exception {

    validateNode(actionRequest);

    super.processAction(portletConfig, actionRequest, actionResponse);
  }
  @Override
  public void include(
      PortletConfig portletConfig, HttpServletRequest request, HttpServletResponse response)
      throws Exception {

    request.setAttribute(JournalWebKeys.JOURNAL_CONTENT, _journalContent);

    super.include(portletConfig, request, response);
  }
 @Override
 public void processAction(
     PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse)
     throws Exception {
   super.processAction(portletConfig, actionRequest, actionResponse);
   if (Constants.UPDATE.equals(ParamUtil.getString(actionRequest, Constants.CMD))) {
     PortletPreferences prefs = actionRequest.getPreferences();
     prefs.setValue(PreferencesKeys.CHANGED, Boolean.toString(true));
     prefs.store();
   }
 }
  @Override
  public void processAction(
      PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse)
      throws Exception {

    boolean advancedConfiguration =
        GetterUtil.getBoolean(getParameter(actionRequest, "advancedConfiguration"));

    if (!advancedConfiguration) {
      updateBasicConfiguration(portletConfig, actionRequest, actionResponse);
    }

    super.processAction(portletConfig, actionRequest, actionResponse);
  }
  @Override
  public void processAction(
      PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse)
      throws Exception {

    String articleId = getArticleId(actionRequest);

    setPreference(actionRequest, "articleId", articleId);

    long articleGroupId = getArticleGroupId(actionRequest);

    setPreference(actionRequest, "groupId", String.valueOf(articleGroupId));

    super.processAction(portletConfig, actionRequest, actionResponse);
  }
  @Override
  public void processAction(
      PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse)
      throws Exception {

    validateFields(actionRequest);

    if (!SessionErrors.isEmpty(actionRequest)) {
      return;
    }

    Locale defaultLocale = LocaleUtil.getDefault();
    String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);

    boolean updateFields = ParamUtil.getBoolean(actionRequest, "updateFields");

    String portletResource = ParamUtil.getString(actionRequest, "portletResource");

    PortletPreferences preferences = actionRequest.getPreferences();

    LocalizationUtil.setLocalizedPreferencesValues(actionRequest, preferences, "title");
    LocalizationUtil.setLocalizedPreferencesValues(actionRequest, preferences, "description");

    if (updateFields) {
      int i = 1;

      String databaseTableName = WebFormUtil.getNewDatabaseTableName(portletResource);

      preferences.setValue("databaseTableName", databaseTableName);

      int[] formFieldsIndexes =
          StringUtil.split(ParamUtil.getString(actionRequest, "formFieldsIndexes"), 0);

      for (int formFieldsIndex : formFieldsIndexes) {
        Map<Locale, String> fieldLabelMap =
            LocalizationUtil.getLocalizationMap(actionRequest, "fieldLabel" + formFieldsIndex);

        if (Validator.isNull(fieldLabelMap.get(defaultLocale))) {
          continue;
        }

        String fieldType = ParamUtil.getString(actionRequest, "fieldType" + formFieldsIndex);
        boolean fieldOptional =
            ParamUtil.getBoolean(actionRequest, "fieldOptional" + formFieldsIndex);
        Map<Locale, String> fieldOptionsMap =
            LocalizationUtil.getLocalizationMap(actionRequest, "fieldOptions" + formFieldsIndex);
        String fieldValidationScript =
            ParamUtil.getString(actionRequest, "fieldValidationScript" + formFieldsIndex);
        String fieldValidationErrorMessage =
            ParamUtil.getString(actionRequest, "fieldValidationErrorMessage" + formFieldsIndex);

        if (Validator.isNotNull(fieldValidationScript)
            ^ Validator.isNotNull(fieldValidationErrorMessage)) {

          SessionErrors.add(actionRequest, "validationDefinitionInvalid" + i);
        }

        updateModifiedLocales("fieldLabel" + i, fieldLabelMap, preferences);
        updateModifiedLocales("fieldOptions" + i, fieldOptionsMap, preferences);

        preferences.setValue("fieldType" + i, fieldType);
        preferences.setValue("fieldOptional" + i, String.valueOf(fieldOptional));
        preferences.setValue("fieldValidationScript" + i, fieldValidationScript);
        preferences.setValue("fieldValidationErrorMessage" + i, fieldValidationErrorMessage);

        i++;
      }

      if (!SessionErrors.isEmpty(actionRequest)) {
        return;
      }

      // Clear previous preferences that are now blank

      String fieldLabel =
          LocalizationUtil.getPreferencesValue(preferences, "fieldLabel" + i, defaultLanguageId);

      while (Validator.isNotNull(fieldLabel)) {
        Map<Locale, String> fieldLabelMap =
            LocalizationUtil.getLocalizationMap(actionRequest, "fieldLabel" + i);

        for (Locale locale : fieldLabelMap.keySet()) {
          String languageId = LocaleUtil.toLanguageId(locale);

          LocalizationUtil.setPreferencesValue(
              preferences, "fieldLabel" + i, languageId, StringPool.BLANK);

          LocalizationUtil.setPreferencesValue(
              preferences, "fieldOptions" + i, languageId, StringPool.BLANK);
        }

        preferences.setValue("fieldType" + i, StringPool.BLANK);
        preferences.setValue("fieldOptional" + i, StringPool.BLANK);
        preferences.setValue("fieldValidationScript" + i, StringPool.BLANK);
        preferences.setValue("fieldValidationErrorMessage" + i, StringPool.BLANK);

        i++;

        fieldLabel =
            LocalizationUtil.getPreferencesValue(preferences, "fieldLabel" + i, defaultLanguageId);
      }
    }

    if (SessionErrors.isEmpty(actionRequest)) {
      preferences.store();
    }

    super.processAction(portletConfig, actionRequest, actionResponse);
  }
 @Override
 @Reference(target = "(osgi.web.symbolicname=com.liferay.blogs.web)", unbind = "-")
 public void setServletContext(ServletContext servletContext) {
   super.setServletContext(servletContext);
 }