Package javax.portlet

Examples of javax.portlet.PortletPreferences.reset()


            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

    {
        String removeName = request.getParameter("remove");    
        if (removeName!=null)
        { // remove
            PortletPreferences prefs = request.getPreferences();
            prefs.reset(removeName);    
            prefs.store();
        }
        String add = request.getParameter("add");          
        if (add!=null)
        { // add                    
View Full Code Here

        catch (ReadOnlyException roe) {

        }
        catch (ValidatorException e) {
            exceptionThrown = true;
            try { preferences.reset("VALIDATION_TEST_KEY"); }catch(Throwable t) {}
        }
        catch (IOException io) {

        }
View Full Code Here

            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

    {
        String removeName = request.getParameter("remove");    
        if (removeName!=null)
        { // remove
            PortletPreferences prefs = request.getPreferences();
            prefs.reset(removeName);    
            prefs.store();
        }
        String add = request.getParameter("add");          
        if (add!=null)
        { // add                    
View Full Code Here

        catch (ReadOnlyException roe) {

        }
        catch (ValidatorException e) {
            exceptionThrown = true;
            try { preferences.reset("VALIDATION_TEST_KEY"); }catch(Throwable t) {}
        }
        catch (IOException io) {

        }
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.