Examples of PreferenceSetImpl


Examples of org.apache.cocoon.portal.pluto.om.common.PreferenceSetImpl

        CopletInstanceData clone = (CopletInstanceData)super.clone();
       
        clone.copletData = this.copletData;
        clone.attributes = new HashMap(this.attributes);
        clone.temporaryAttributes = new HashMap(this.temporaryAttributes);
        clone.preferences = new PreferenceSetImpl();
        clone.preferences.addAll(this.preferences.getPreferences());

        return clone;
    }
View Full Code Here

Examples of org.apache.cocoon.portal.pluto.om.common.PreferenceSetImpl

        CopletInstanceData clone = (CopletInstanceData)super.clone();
       
        clone.copletData = this.copletData;
        clone.attributes = new HashMap(this.attributes);
        clone.temporaryAttributes = new HashMap(this.temporaryAttributes);
        clone.preferences = new PreferenceSetImpl();
        clone.preferences.addAll(this.preferences.getPreferences());

        return clone;
    }
View Full Code Here

Examples of org.apache.cocoon.portal.pluto.om.common.PreferenceSetImpl

        CopletInstanceData clone = (CopletInstanceData)super.clone();
       
        clone.copletData = this.copletData;
        clone.attributes = new HashMap(this.attributes);
        clone.temporaryAttributes = new HashMap(this.temporaryAttributes);
        clone.preferences = new PreferenceSetImpl();
        clone.preferences.addAll(this.preferences.getPreferences());

        return clone;
    }
View Full Code Here

Examples of org.apache.cocoon.portal.pluto.om.common.PreferenceSetImpl

        CopletInstanceData clone = (CopletInstanceData)super.clone();
       
        clone.copletData = this.copletData;
        clone.attributes = new HashMap(this.attributes);
        clone.temporaryAttributes = new HashMap(this.temporaryAttributes);
        clone.preferences = new PreferenceSetImpl();
        clone.preferences.addAll(this.preferences.getPreferences());

        return clone;
    }
View Full Code Here

Examples of org.infoglue.deliver.portal.om.PreferenceSetImpl

            {
              destValues.add(values.next());
            }
            destPrefs.add(new PreferenceImpl(src.getName(), destValues));
          }
          pe.setPreferenceSet(new PreferenceSetImpl(destPrefs));
          pae.addPortletEntity(pe);
        }

        // Create Digital Asset
        log.debug("Creating Digital Asset...");
View Full Code Here

Examples of org.jasig.portal.container.om.common.PreferenceSetImpl

        ChannelParameter[] parameters = channelDef.getParameters();

        if (parameters != null) {
          // Keep track of any portlet preferences
          PreferenceSetImpl preferences = new PreferenceSetImpl();

          for (int i = 0; i < parameters.length; i++) {
            String paramName = parameters[i].getName();
            String paramValue = parameters[i].getValue();
            boolean paramOverride = parameters[i].getOverride();

            if (paramName == null && paramValue == null) {
              throw new RuntimeException("Invalid parameter node");
            }

            if (paramName.startsWith(CPortletAdapter.portletPreferenceNamePrefix)) {
                // We have a portlet preference
                String prefName = paramName.substring(CPortletAdapter.portletPreferenceNamePrefix.length());
                String prefValue = paramValue;
                List prefValues = (List)preferences.get(prefName);
                // Unfortunately, we can only support single-valued preferences
                // at this level unless we change a lot of uPortal code :(
                prefValues = new ArrayList(1);
                prefValues.add(prefValue);
                preferences.add(prefName, prefValues, !paramOverride);
            } else {
                // We have a normal channel parameter
                String insert = "INSERT INTO UP_CHANNEL_PARAM (CHAN_ID, CHAN_PARM_NM, CHAN_PARM_VAL, CHAN_PARM_OVRD) VALUES (" + channelPublishId +
                                ",'" + paramName + "','" + paramValue + "', '" + (paramOverride ? "Y" : "N") + "')";
                if (log.isDebugEnabled())
                    log.debug("RDBMChannelRegistryStore.saveChannelDefinition(): " + insert);
                stmt.executeUpdate(insert);
            }
          }
          if (preferences.size() > 0) {
              PortletPreferencesStoreFactory.getPortletPreferencesStoreImpl().setDefinitionPreferences(channelPublishId, preferences);
          }
        }

        // Commit the transaction
View Full Code Here

Examples of org.jasig.portal.container.om.common.PreferenceSetImpl

        }
        return parameters;
    }
   
    private PreferenceSet getPreferences(Element portletE) {
        PreferenceSetImpl preferences = new PreferenceSetImpl();
        NodeList portletPreferencesNL = portletE.getElementsByTagName("portlet-preferences");
        if (portletPreferencesNL.getLength() > 0) {
            Element portletPreferencesE = (Element)portletPreferencesNL.item(0); // there should only be one
            NodeList preferenceNL = portletPreferencesE.getElementsByTagName("preference");
            for (int i = 0; i < preferenceNL.getLength(); i += 1) {
                Element preferenceE = (Element)preferenceNL.item(i);
                String name = XML.getChildElementText(preferenceE, "name");
                List values = new ArrayList(1); // There is usually just one value
                NodeList valueNL = preferenceE.getElementsByTagName("value");
                for (int j = 0; j < valueNL.getLength(); j += 1) {
                    Element valueE = (Element)valueNL.item(j);
                    values.add(XML.getElementText(valueE));
                }
                boolean readOnly = Boolean.valueOf(XML.getChildElementText(preferenceE, "read-only")).booleanValue();
                preferences.add(name, values, readOnly);
            }
            preferences.setPreferencesValidator(XML.getChildElementText(portletPreferencesE, "preferences-validator"));
        }
        return preferences;
    }
View Full Code Here

Examples of org.jasig.portal.container.om.common.PreferenceSetImpl

    private IUserLayoutChannelDescription channelDescription = null;

    // PortletEntity methods
   
    public PortletEntityImpl() {
        preferences = new PreferenceSetImpl();
        portletWindows = new PortletWindowListImpl();
    }
View Full Code Here

Examples of org.jasig.portal.container.om.common.PreferenceSetImpl

            int layoutId = Integer.parseInt(layout.getId());
            String channelDescId = channelDescription.getId();
            portletPrefsStore.setEntityPreferences(userId, layoutId, channelDescId, preferences);
           
            // Save preferences as original preferences     
            originalPreferences = new PreferenceSetImpl();  
            ((PreferenceSetImpl)originalPreferences).addAll(preferences);
           
        } catch (Exception e) {
            log.error("Could not store portlet entity preferences", e);
           
View Full Code Here

Examples of org.jasig.portal.container.om.common.PreferenceSetImpl

            String channelDescId = channelDescription.getId();
           
            preferences = portletPrefsStore.getEntityPreferences(userId, layoutId, channelDescId);
           
            // Save preferences as original preferences     
            originalPreferences = new PreferenceSetImpl();  
            ((PreferenceSetImpl)originalPreferences).addAll(preferences);           
        } catch (Exception e) {
            log.error("Could not load portlet entity preferences.", e);
           
            if (e instanceof IOException)
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.