Package javax.portlet

Examples of javax.portlet.PortletPreferences.reset()


            preferences.store();
            if("notTheOriginal".equals(preferences.getValue("dummyName", "Default"))) {
                storeOccured = true;
            }

            preferences.reset("dummyName");
        }
        catch(ReadOnlyException roe) {

        }
        catch(ValidatorException ve) {
View Full Code Here


            preferences.store();
            if("notTheOriginal".equals(preferences.getValue("dummyName", "Default"))) {
                storeOccured = true;
            }

            preferences.reset("dummyName");

            String preference =  preferences.getValue("dummyName", "defaultValue");
            if(preference.equals("dummyValue")) {
                resetOccured = true;
            }
View Full Code Here

            preferences.store();
            if("notTheOriginal".equals(preferences.getValue(BOGUS_KEY, "Default"))) {
                storeOccured = true;
            }

            preferences.reset(BOGUS_KEY);

            String preference =  preferences.getValue(BOGUS_KEY, "defaultValue");
            if("defaultValue".equals(preference)) {
                resetOccured = true;
            }
View Full Code Here

            exceptionThrown = true;
            // FIXME: what is going on below?
            try {
              //get rid of spaces because it causes problems with reset() call.
                preferences.setValue("TEST", "OK");
              preferences.reset("TEST");
            } catch (Throwable th) {
              LOG.error(th.getMessage(),th);
            }
        }
View Full Code Here

          TestUtils.failOnException("Unable to store preference value.", ex, result);
        } catch (ValidatorException ex) {
          TestUtils.failOnException("Unable to store preference value.", ex, result);
        } finally {
          try {
            preferences.reset(PreferencesValidatorImpl.CHECK_VALIDATOR_COUNT);
            preferences.store();
          } catch (Exception ex) {
            TestUtils.failOnException("Unable to reset preference value for "
                + PreferencesValidatorImpl.CHECK_VALIDATOR_COUNT,
                ex, result);
View Full Code Here

          TestUtils.failOnException("Unable to store preference value.", ex, result);
          return result;
        } finally {
            // Reset preference to default value, and store!
          try {
            preferences.reset(PREF_NAME);
            preferences.store();
          } catch (Exception ex) {
              TestUtils.failOnException("Unable to set preference value.", ex, result);
              return result;
          }
View Full Code Here

            String value = preferences.getValue(PREF_NAME, DEF_VALUE);
            if (NEW_VALUE.equals(value)) {
                setOccured = true;
            }
            // Reset the preference so that default value is restored.
            preferences.reset(PREF_NAME);
            value =  preferences.getValue(PREF_NAME, DEF_VALUE);
            if (PREF_VALUE.equals(value)) {
                resetOccured = true;
            }
        } catch (ReadOnlyException ex) {
View Full Code Here

            String value = preferences.getValue(BOGUS_KEY, DEF_VALUE);
            if (NEW_VALUE.equals(value)) {
                setOccured = true;
            }
            // Reset preference value to null.
            preferences.reset(BOGUS_KEY);
            value =  preferences.getValue(BOGUS_KEY, DEF_VALUE);
            if (DEF_VALUE.equals(value)) {
                resetOccured = true;
            }
        } catch (ReadOnlyException ex) {
View Full Code Here

          setValuesOK = true;
        }

        // Check reset() method.
        try {
          preferences.reset(READ_ONLY_PREF_NAME);
        } catch (ReadOnlyException ex) {
          resetOK = true;
        }

        if (setValueOK && setValuesOK && resetOK) {
View Full Code Here

        } else {

            // We trying to clear a previous selection
            try {
                prefs.reset(names.getSelectedBackgroundImagePreferenceName());
                prefs.store();
            } catch (Exception e) {
                throw new RuntimeException("Failed to reset the user's choice of background image", e);
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.