@Test public void testGetNames() throws ReadOnlyException, ValidatorException, IOException { addPref(basePrefs, "key", false, new String[] {"default"}); addPref(basePrefs, "key1", false, new String[] {"default"}); Enumeration<String> names = portletPreferences.getNames(); assertEquals( ImmutableSet.of("key", "key1"), new HashSet<String>(EnumerationUtils.toList(names))); portletPreferences.setValues("key", new String[] {"modified"}); portletPreferences.setValues("key3", new String[] {"modified"}); names = portletPreferences.getNames(); assertEquals( ImmutableSet.of("key", "key1", "key3"), new HashSet<String>(EnumerationUtils.toList(names))); portletPreferences.store(); this.targetPrefs = new LinkedHashMap<String, IPortletPreference>(this.storedPrefs); names = portletPreferences.getNames(); assertEquals( ImmutableSet.of("key", "key1", "key3"), new HashSet<String>(EnumerationUtils.toList(names))); portletPreferences.reset("key3"); names = portletPreferences.getNames(); assertEquals( ImmutableSet.of("key", "key1"), new HashSet<String>(EnumerationUtils.toList(names))); portletPreferences.store(); this.targetPrefs = new LinkedHashMap<String, IPortletPreference>(this.storedPrefs); names = portletPreferences.getNames(); assertEquals( ImmutableSet.of("key", "key1"), new HashSet<String>(EnumerationUtils.toList(names))); }
@Override public final Enumeration<String> getNames() { final Map<String, String[]> compositePortletPreferencesView = this.getCompositePortletPreferencesView(); return Collections.enumeration(compositePortletPreferencesView.keySet()); }
AbstractPortletPreferencesImpl implements PortletPreferences { @Override public final Enumeration<String> getNames() { final Map<String, String[]> compositePortletPreferencesView = this.getCompositePortletPreferencesView(); return Collections.enumeration(compositePortletPreferencesView.keySet()); } }
AbstractPortletPreferencesImpl implements PortletPreferences { @Override public final Enumeration<String> getNames() { final Map<String, String[]> compositePortletPreferencesView = this.getCompositePortletPreferencesView(); return Collections.enumeration(compositePortletPreferencesView.keySet()); } AbstractPortletPreferencesImpl(boolean render); }
AbstractPortletPreferencesImpl implements PortletPreferences { @Override public final Enumeration<String> getNames() { final Map<String, String[]> compositePortletPreferencesView = this.getCompositePortletPreferencesView(); return Collections.enumeration(compositePortletPreferencesView.keySet()); } 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 Enumeration<String> getNames() { final Map<String, String[]> compositePortletPreferencesView = this.getCompositePortletPreferencesView(); return Collections.enumeration(compositePortletPreferencesView.keySet()); } 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();  }