/**
   * 保存
   *
   * @param buildinfo 设置对象
   * @param prefs 首选项对象
   */
  @SuppressWarnings("rawtypes")
  @ActionMapping(params = "action=savePreferences")
  public void savePreferences(
      @ModelAttribute("preferenceinfo") PreferenceInfo preferenceinfo,
      PortletPreferences prefs,
      ActionRequest request,
      ActionResponse response)
      throws PortletException, ReadOnlyException, IOException {

    List<String> errorMessages = new ArrayList<String>();
    try {
      preferenceInfoService.savePreferenceInfo(prefs, preferenceinfo);

    } catch (Exception e) {
      e.printStackTrace();
      errorMessages.add(e.getMessage());
      logger.error(e);
    }
    response.setRenderParameter("", "");
    request.setAttribute("errorMessages", errorMessages);
    request.setAttribute("successMessages", "操作成功");
  }