Package org.apache.jetspeed.om.preference.impl

Examples of org.apache.jetspeed.om.preference.impl.PrefsPreferenceSetImpl


    
     */

    public void reset() throws IOException
    {
        PrefsPreferenceSetImpl preferenceSet = (PrefsPreferenceSetImpl) preferenceSetRef.get();
        try
        {
            if (originalValues != null && preferenceSet != null)
            {
                Iterator prefs = preferenceSet.iterator();

                while (prefs.hasNext())
                {
                    PrefsPreference pref = (PrefsPreference) prefs.next();
                    if (originalValues.containsKey(pref.getName()))
                    {
                        pref.setValues((String[]) originalValues.get(pref.getName()));
                    }
                    else
                    {
                        preferenceSet.remove(pref);
                    }
                    preferenceSet.flush();
                }

                Iterator keys = originalValues.keySet().iterator();
                while (keys.hasNext())
                {
                    String key = (String) keys.next();
                    if (preferenceSet.get(key) == null)
                    {
                        preferenceSet.add(key, Arrays.asList((String[]) originalValues.get(key)));
                    }
                }
            }
            dirty = false;
            backupValues(preferenceSet);
View Full Code Here


                {
                    throw new IllegalStateException("Portlet Application must be defined before preferences can be accessed");
                }
               
                Preferences prefNode = PrefsPreference.createPrefenceNode(this);
                preferenceSet = new PrefsPreferenceSetImpl(prefNode);
            }
        }
        catch (BackingStoreException e)
        {
            String msg = "Preference backing store failed: " + e.toString();
View Full Code Here

        return persistenceStore;
    }

    public void storePreferenceSet( PreferenceSet prefSet, PortletEntity entity ) throws IOException
    {
        PrefsPreferenceSetImpl preferenceSet = (PrefsPreferenceSetImpl) prefSet;
        try
        {
            prepareTransaction(persistenceStore);
            persistenceStore.lockForWrite(entity);
            if (preferenceSet != null)
            {
                preferenceSet.flush();
            }
            persistenceStore.getTransaction().checkpoint();

        }
        catch (Exception e)
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.preference.impl.PrefsPreferenceSetImpl

Copyright © 2018 www.massapicom. 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.