Package javax.portlet

Examples of javax.portlet.ReadOnlyException


  }

  public void reset(String key) throws ReadOnlyException {
    Assert.notNull(key, "Key must not be null");
    if (isReadOnly(key)) {
      throw new ReadOnlyException("Preference '" + key + "' is read-only");
    }
    this.preferences.remove(key);
  }
View Full Code Here


            throw new IllegalArgumentException("key == null");
        }

        if (isReadOnly(key))
        {
            throw new ReadOnlyException("Preference attribute called " + key + " may not be modified");
        }

        changedPreferences.put(key, StringUtils.copy(values));
        removedPreferences.remove(key);
View Full Code Here

            throw new IllegalArgumentException("key == null");
        }

        if (isReadOnly(key))
        {
            throw new ReadOnlyException("preference attribute called " + key + " may not be modified");
        }

        changedPreferences.remove(key);
        removedPreferences.add(key);
    }
View Full Code Here

        return values;
    }

    public void setValue(String key, String value) throws ReadOnlyException {
        if (isReadOnly(key)) {
            throw new ReadOnlyException(EXCEPTIONS.getString(
                "error.preference.readonly", key));
        }
        InternalPortletPreference pref = (InternalPortletPreference)
            preferences.get(key);
        if (pref != null) {
View Full Code Here

        }
    }

    public void setValues(String key, String[] values) throws ReadOnlyException {
        if (isReadOnly(key)) {
            throw new ReadOnlyException(EXCEPTIONS.getString(
                "error.preference.readonly"));
        }
        InternalPortletPreference pref = (InternalPortletPreference)
            preferences.get(key);
        if (pref != null) {
View Full Code Here

    }

    public void reset(String key) throws ReadOnlyException {
      // Read-only preferences cannot be reset.
        if (isReadOnly(key)) {
            throw new ReadOnlyException(EXCEPTIONS.getString(
                "error.preference.readonly", "Preference key "));
        }
        // Try to reset preference to the default values.
        boolean resetDone = false;
        for (int i = 0; !resetDone && i < defaultPreferences.length; i++) {
View Full Code Here

            throw new IllegalArgumentException("key == null");
        }

        if (isReadOnly(key))
        {
            throw new ReadOnlyException("Preference attribute called " + key + " may not be modified");
        }

        changedPreferences.put(key, StringUtils.copy(values));
        removedPreferences.remove(key);
View Full Code Here

            throw new IllegalArgumentException("key == null");
        }

        if (isReadOnly(key))
        {
            throw new ReadOnlyException("preference attribute called " + key + " may not be modified");
        }

        changedPreferences.remove(key);
        removedPreferences.add(key);
    }
View Full Code Here

        return values;
    }

    public void setValue(String key, String value) throws ReadOnlyException {
        if (isReadOnly(key)) {
            throw new ReadOnlyException(EXCEPTIONS.getString(
                    "error.preference.readonly", key));
        }
        PortletPreference pref = preferences.get(key);
        String[] values = value == null ? new String[0] : new String[] { value };
        if (pref != null) {
View Full Code Here

        }
    }

    public void setValues(String key, String[] values) throws ReadOnlyException {
        if (isReadOnly(key)) {
            throw new ReadOnlyException(EXCEPTIONS.getString(
                    "error.preference.readonly", key));
        }
        if (values == null) {
            values = new String[0];
        }
View Full Code Here

TOP

Related Classes of javax.portlet.ReadOnlyException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.