Interface IPreferences

  • All Superinterfaces:
    javax.portlet.PortletPreferences
    All Known Implementing Classes:
    RequestPreferences

    @StableMinor(version="17.0",
                 sinceVersion="4.0")
    public interface IPreferences
    extends javax.portlet.PortletPreferences
    A generic portal preferences.
    Since:
    4.0.7
    Version:
    $Revision$ $Date$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int TYPE_SERVICE_INTERFACE_INSTANCE
      Deprecated.
      Since 10.2.0 this constant is no longer used.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getLocalValue​(java.lang.String key, java.lang.String def)
      Returns the first String value associated with the specified key of this preference.
      java.lang.String[] getLocalValues​(java.lang.String key, java.lang.String[] def)
      Returns the String array value associated with the specified key in this preference.
      • Methods inherited from interface javax.portlet.PortletPreferences

        getMap, getNames, getValue, getValues, isReadOnly, reset, setValue, setValues, store
    • Field Detail

      • TYPE_SERVICE_INTERFACE_INSTANCE

        @Deprecated
        static final int TYPE_SERVICE_INTERFACE_INSTANCE
        Deprecated.
        Since 10.2.0 this constant is no longer used.
        Type that indicates the preferences belongs to a service interface instance.
        Since:
        4.0.7
        See Also:
        Constant Field Values
    • Method Detail

      • getLocalValue

        java.lang.String getLocalValue​(java.lang.String key,
                                       java.lang.String def)
        Returns the first String value associated with the specified key of this preference. This preference is read locally in the current preference level. If there is one or more preference values associated with the given key it returns the first local associated value. If there are no preference values associated with the given key, or the backing preference database is unavailable, it returns the given default value. A null value is treated as a non-existent value.
        Parameters:
        key - key for which the associated value is to be returned
        def - the value to be returned in the event that there is no value available associated with this key.
        Returns:
        the local value associated with key, or def if no value is associated with key, or the backing store is inaccessible. The value is read locally in the current preferences level.
        Throws:
        java.lang.IllegalArgumentException - if key is null. (A null value for def is permitted.)
        See Also:
        PortletPreferences.getValues(String, String[])
      • getLocalValues

        java.lang.String[] getLocalValues​(java.lang.String key,
                                          java.lang.String[] def)
        Returns the String array value associated with the specified key in this preference. This preference is read locally in the current preferences level.

        Returns the specified default if there is no value associated with the key, or if the backing store is inaccessible. A null value is treated as a non-existent value.

        If the implementation supports stored defaults and such a default exists and is accessible, it is used in favor of the specified default.

        Parameters:
        key - key for which associated value is to be returned.
        def - the value to be returned in the event that this preference node has no value associated with key or the associated value cannot be interpreted as a String array, or the backing store is inaccessible.
        Returns:
        the String array value associated with key, or def if the associated value does not exist. The value is read locally in the current preferences level.
        Throws:
        java.lang.IllegalArgumentException - if key is null. (A null value for def is permitted.)
        See Also:
        PortletPreferences.getValue(String,String)