Package javax.portlet

Examples of javax.portlet.PortletPreferences.reset()


    {
      if ( name == null ) name = "";
      PortletPreferences prefs = request.getPreferences();
      try
    {
        prefs.reset( name );
        prefs.store();
    }
    catch ( ReadOnlyException e ) { }
    catch ( IOException e ) { }
    catch ( ValidatorException e ) { }
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);             
            }
        }
       
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

            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);             
            }
        }
       
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

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.