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

    Portlet portlet = ActionUtil.getPortlet(actionRequest);

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

    Settings portletInstanceSettings =
        SettingsFactoryUtil.getSettings(
            new PortletInstanceSettingsLocator(themeDisplay.getLayout(), portlet.getPortletId()));

    ModifiableSettings portletInstanceModifiableSettings =
        portletInstanceSettings.getModifiableSettings();

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

    ArchivedSettings archivedSettings =
        SettingsFactoryUtil.getPortletInstanceArchivedSettings(
            themeDisplay.getSiteGroupId(), portlet.getRootPortletId(), name);

    portletInstanceModifiableSettings.reset();

    portletInstanceModifiableSettings.setValues(archivedSettings);

    portletInstanceModifiableSettings.store();

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

    SessionMessages.add(
        actionRequest,
        PortalUtil.getPortletId(actionRequest) + SessionMessages.KEY_SUFFIX_REFRESH_PORTLET,
        portletResource);
  }
  @Override
  public ModifiableSettings setValues(String key, String[] values) {
    ModifiableSettings modifiableSettings = _getModifiableSettings();

    modifiableSettings.setValues(key, values);

    return this;
  }
  @Override
  public void store() throws IOException, ValidatorException {
    Settings settings = _typedSettings.getWrappedSettings();

    ModifiableSettings modifiableSettings = settings.getModifiableSettings();

    modifiableSettings.store();
  }
  protected void setUpBlogsSettings() throws Exception {
    Settings settings =
        SettingsFactoryUtil.getGroupServiceSettings(
            _group.getGroupId(), BlogsConstants.SERVICE_NAME);

    ModifiableSettings modifiableSettings = settings.getModifiableSettings();

    String subscriptionBodyPreferencesKey =
        LocalizationUtil.getLocalizedName(
            "emailEntryUpdatedBody", LocaleUtil.toLanguageId(LocaleUtil.getDefault()));

    modifiableSettings.setValue(subscriptionBodyPreferencesKey, "[$BLOGS_ENTRY_UPDATE_COMMENT$]");

    modifiableSettings.store();
  }
  @Override
  public void store() throws IOException, ValidatorException {
    ModifiableSettings modifiableSettings = _getModifiableSettings();

    modifiableSettings.store();
  }
  @Override
  public void reset(String key) {
    ModifiableSettings modifiableSettings = _getModifiableSettings();

    modifiableSettings.reset(key);
  }
  @Override
  public Collection<String> getModifiedKeys() {
    ModifiableSettings modifiableSettings = _getModifiableSettings();

    return modifiableSettings.getModifiedKeys();
  }
  @Override
  protected String[] doGetValues(String key) {
    ModifiableSettings modifiableSettings = _getModifiableSettings();

    return modifiableSettings.getValues(key, null);
  }