@Test public void testGetMap() throws ReadOnlyException, ValidatorException, IOException { addPref(basePrefs, "key", false, new String[] {"default"}); addPref(basePrefs, "key1", false, new String[] {"default"}); Map<String, String[]> map = portletPreferences.getMap(); assertEquals( ImmutableMap.of( "key", ImmutableList.of("default"), "key1", ImmutableList.of("default")), ParameterMap.convertArrayMap(map)); portletPreferences.setValues("key", new String[] {"modified"}); portletPreferences.setValues("key3", new String[] {"modified"}); map = portletPreferences.getMap(); assertEquals( ImmutableMap.of( "key", ImmutableList.of("modified"), "key1", ImmutableList.of("default"), "key3", ImmutableList.of("modified")), ParameterMap.convertArrayMap(map)); portletPreferences.store(); this.targetPrefs = new LinkedHashMap<String, IPortletPreference>(this.storedPrefs); map = portletPreferences.getMap(); assertEquals( ImmutableMap.of( "key", ImmutableList.of("modified"), "key1", ImmutableList.of("default"), "key3", ImmutableList.of("modified")), ParameterMap.convertArrayMap(map)); portletPreferences.reset("key3"); map = portletPreferences.getMap(); assertEquals( ImmutableMap.of( "key", ImmutableList.of("modified"), "key1", ImmutableList.of("default")), ParameterMap.convertArrayMap(map)); portletPreferences.store(); this.targetPrefs = new LinkedHashMap<String, IPortletPreference>(this.storedPrefs); map = portletPreferences.getMap(); assertEquals( ImmutableMap.of( "key", ImmutableList.of("modified"), "key1", ImmutableList.of("default")), ParameterMap.convertArrayMap(map)); }
@Override public final Map<String, String[]> getMap() { return this.getCompositePortletPreferencesView(); }
AbstractPortletPreferencesImpl implements PortletPreferences { @Override public final Map<String, String[]> getMap() { return this.getCompositePortletPreferencesView(); } }
AbstractPortletPreferencesImpl implements PortletPreferences { @Override public final Map<String, String[]> getMap() { return this.getCompositePortletPreferencesView(); } AbstractPortletPreferencesImpl(boolean render); }
AbstractPortletPreferencesImpl implements PortletPreferences { @Override public final Map<String, String[]> getMap() { return this.getCompositePortletPreferencesView(); } AbstractPortletPreferencesImpl(boolean render); @Override final boolean isReadOnly(String key); @Override final String getValue(String key, String def); @Override final String[] getValues(String key, String[] def); @Override final void setValue(String key, String value); @Override final void setValues(String key, String[] values); @Override final Enumeration<String> getNames(); @Override final Map<String, String[]> getMap(); @Override final void reset(String key); @Override final void store(); }
AbstractPortletPreferencesImpl implements PortletPreferences { @Override public final Map<String, String[]> getMap() { return this.getCompositePortletPreferencesView(); } AbstractPortletPreferencesImpl(boolean render); @Override final boolean isReadOnly(String key); @Override final String getValue(String key, String def); @Override final String[] getValues(String key, String[] def); @Override final void setValue(String key, String value); @Override final void setValues(String key, String[] values); @Override final Enumeration<String> getNames(); @Override final Map<String, String[]> getMap(); @Override final void reset(String key); @Override final void store();  }