protected WindowState getDefaultWindowState(final IStylesheetDescriptor stylesheetDescriptor) {
    final IStylesheetParameterDescriptor defaultWindowStateParam =
        stylesheetDescriptor.getStylesheetParameterDescriptor("dashboardForcedWindowState");

    if (defaultWindowStateParam != null) {
      return PortletUtils.getWindowState(defaultWindowStateParam.getDefaultValue());
    }

    return WindowState.NORMAL;
  }
  /* (non-Javadoc)
   * @see org.jasig.portal.layout.om.IStylesheetUserPreferences#setStylesheetParameter(java.lang.String, java.lang.String)
   */
  @Override
  public String setStylesheetParameter(String name, String value) {
    final IStylesheetParameterDescriptor stylesheetParameterDescriptor =
        this.stylesheetDescriptor.getStylesheetParameterDescriptor(name);
    if (stylesheetParameterDescriptor == null) {
      logger.warn(
          "Attempted to set stylesheet parameter {}={} but no such stylesheet parameter is defined in stylesheet descriptor {}. It will be ignored",
          new Object[] {name, value, this.stylesheetDescriptor.getName()});
      return null;
    }

    final Scope scope = this.getWriteScope(stylesheetParameterDescriptor);
    final IStylesheetUserPreferences stylesheetUserPreferences =
        this.getStylesheetUserPreferences(scope, true);

    final String defaultValue = stylesheetParameterDescriptor.getDefaultValue();
    if (this.compareValues(value, defaultValue)) {
      return stylesheetUserPreferences.removeStylesheetParameter(name);
    }

    return stylesheetUserPreferences.setStylesheetParameter(name, value);
  }
  @Override
  public String getStylesheetParameter(String name) {
    final IStylesheetParameterDescriptor stylesheetParameterDescriptor =
        this.stylesheetDescriptor.getStylesheetParameterDescriptor(name);
    if (stylesheetParameterDescriptor == null) {
      logger.warn(
          "Attempted to get stylesheet parameter {} but no such stylesheet parameter is defined in stylesheet descriptor {}. null will be returned",
          new Object[] {name, this.stylesheetDescriptor.getName()});
      return null;
    }

    final Scope scope = stylesheetParameterDescriptor.getScope();
    final IStylesheetUserPreferences stylesheetUserPreferences =
        this.getStylesheetUserPreferences(scope, false);
    if (stylesheetUserPreferences != null) {
      final String stylesheetParameter = stylesheetUserPreferences.getStylesheetParameter(name);
      if (stylesheetParameter != null) {
        return stylesheetParameter;
      }
    }

    return stylesheetParameterDescriptor.getDefaultValue();
  }