Package org.jasig.portal.portlets

Examples of org.jasig.portal.portlets.StringListAttribute


    }
   
    for (IChannelParameter param : def.getParameters()) {
      if (def.isPortlet() && param.getName().startsWith("PORTLET.")) {
        this.portletPreferences.put(param.getName(),
            new StringListAttribute(new String[]{ param.getValue() }));
        this.portletParameterOverrides.put(param.getName(),
            new BooleanAttribute(param.getOverride()));
      } else {
        this.parameters.put(param.getName(),
            new Attribute(param.getValue()));
        this.parameterOverrides.put(param.getName(),
            new BooleanAttribute(param.getOverride()));
      }
    }
   
    if (def.isPortlet()) {
            final IPortletPreferences prefs = portletDef.getPortletPreferences();
            for (IPortletPreference pref : prefs.getPortletPreferences()) {
        List<Attribute> attributes = new ArrayList<Attribute>();
        for (String value : pref.getValues()) {
          attributes.add(new Attribute(value));
        }
        this.portletPreferences.put(pref.getName(), new StringListAttribute(pref.getValues()));
        this.portletParameterOverrides.put(pref.getName(), new BooleanAttribute(!pref.isReadOnly()));
      }
    }
  }
View Full Code Here


          if (!this.portletPreferences.containsKey(pref.getName())
              || this.portletPreferences.get(pref.getName()).getValue().size() == 0
              || (this.portletPreferences.get(pref.getName()).getValue().size() == 1 && this.portletPreferences.get(pref.getName()).getValue().get(0).trim().equals(""))) {
           
            if (!this.portletPreferences.containsKey(pref.getName())) {
              this.portletPreferences.put(pref.getName(), new StringListAttribute());
            }
           
            // use the default value if one exists
            if (pref.getDefaultValues() != null && pref.getDefaultValues().size() > 0) {
              for (String value : pref.getDefaultValues()) {
View Full Code Here

    }
   
    for (IPortletDefinitionParameter param : def.getParameters()) {
      if (param.getName().startsWith("PORTLET.")) {
        this.portletPreferences.put(param.getName(),
            new StringListAttribute(new String[]{ param.getValue() }));
      } else {
        this.parameters.put(param.getName(),
            new Attribute(param.getValue()));
      }
    }
   
        for (IPortletPreference pref : def.getPortletPreferences()) {
      List<Attribute> attributes = new ArrayList<Attribute>();
      for (String value : pref.getValues()) {
        attributes.add(new Attribute(value));
      }
      this.portletPreferences.put(pref.getName(), new StringListAttribute(pref.getValues()));
            this.portletPreferenceReadOnly.put(pref.getName(), new BooleanAttribute(pref.isReadOnly()));
    }
           
  }
View Full Code Here

          if (!this.portletPreferences.containsKey(pref.getName())
              || this.portletPreferences.get(pref.getName()).getValue().size() == 0
              || (this.portletPreferences.get(pref.getName()).getValue().size() == 1 && this.portletPreferences.get(pref.getName()).getValue().get(0).trim().equals(""))) {
           
            if (!this.portletPreferences.containsKey(pref.getName())) {
              this.portletPreferences.put(pref.getName(), new StringListAttribute());
            }
           
            // use the default value if one exists
            PreferenceInputType input = pref.getPreferenceInput().getValue();
            if (input instanceof SingleValuedPreferenceInputType) {
View Full Code Here

            final Map<String, BooleanAttribute> portletPreferencesOverrides = form.getPortletPreferenceReadOnly();
           
            for (final Iterator<Entry<String, StringListAttribute>> portletPreferenceEntryItr = portletPreferences.entrySet().iterator(); portletPreferenceEntryItr.hasNext();) {
                final Map.Entry<String, StringListAttribute> portletPreferenceEntry = portletPreferenceEntryItr.next();
                final String key = portletPreferenceEntry.getKey();
                final StringListAttribute valueAttr = portletPreferenceEntry.getValue();
                if (!preferenceNames.contains(key) || valueAttr == null) {
                    portletPreferenceEntryItr.remove();
                    portletPreferencesOverrides.remove(key);
                } else {
                    final List<String> values = valueAttr.getValue();
                    for (final Iterator<String> iter = values.iterator(); iter.hasNext();) {
                        String value = iter.next();
                        if (value == null) {
                            iter.remove();
                        }
View Full Code Here

       
        PersonForm form = new PersonForm(accountEditAttributes);
       
        Set<String> attributeNames = accountDao.getCurrentAttributeNames();
        for (String name : attributeNames) {
            form.getAttributes().put(name, new StringListAttribute(Collections.<String>emptyList()));
        }
       
        return form;
    }
View Full Code Here

            if (attrValues != null) {
                for (Object value : person.getAttributeValues(name)) {
                    values.add((String) value);
                }
            }
            form.getAttributes().put(name, new StringListAttribute(values));
        }

        return form;
    }
View Full Code Here

TOP

Related Classes of org.jasig.portal.portlets.StringListAttribute

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.