Class MockPortletPreferences

Object
com.liferay.portal.kernel.test.portlet.MockPortletPreferences
All Implemented Interfaces:
jakarta.portlet.PortletPreferences

public class MockPortletPreferences extends Object implements jakarta.portlet.PortletPreferences
Author:
Dante Wang
  • Constructor Details

    • MockPortletPreferences

      public MockPortletPreferences()
  • Method Details

    • getMap

      public Map<String,String[]> getMap()
      Specified by:
      getMap in interface jakarta.portlet.PortletPreferences
    • getNames

      public Enumeration<String> getNames()
      Specified by:
      getNames in interface jakarta.portlet.PortletPreferences
    • getValue

      public String getValue(String key, String defaultValue)
      Specified by:
      getValue in interface jakarta.portlet.PortletPreferences
    • getValues

      public String[] getValues(String key, String[] defaultValues)
      Specified by:
      getValues in interface jakarta.portlet.PortletPreferences
    • isReadOnly

      public boolean isReadOnly(String key)
      Specified by:
      isReadOnly in interface jakarta.portlet.PortletPreferences
    • reset

      public void reset(String key) throws jakarta.portlet.ReadOnlyException
      Specified by:
      reset in interface jakarta.portlet.PortletPreferences
      Throws:
      jakarta.portlet.ReadOnlyException
    • setPreferencesValidator

      public void setPreferencesValidator(jakarta.portlet.PreferencesValidator preferencesValidator)
    • setReadOnly

      public void setReadOnly(String key, boolean readOnly)
    • setValue

      public void setValue(String key, String value) throws jakarta.portlet.ReadOnlyException
      Specified by:
      setValue in interface jakarta.portlet.PortletPreferences
      Throws:
      jakarta.portlet.ReadOnlyException
    • setValues

      public void setValues(String key, String[] values) throws jakarta.portlet.ReadOnlyException
      Specified by:
      setValues in interface jakarta.portlet.PortletPreferences
      Throws:
      jakarta.portlet.ReadOnlyException
    • store

      public void store() throws IOException, jakarta.portlet.ValidatorException
      Specified by:
      store in interface jakarta.portlet.PortletPreferences
      Throws:
      IOException
      jakarta.portlet.ValidatorException