Package org.gatein.pc.api.info

Examples of org.gatein.pc.api.info.PreferenceInfo


      // Collect missing or read only properties from the referenced portlet
      Set<String> keys = new HashSet<String>();
      for (String key : prefs.getKeys())
      {
         PreferenceInfo pref = prefs.getPreference(key);
         if (Boolean.TRUE.equals(pref.isReadOnly()) || !props.keySet().contains(pref.getKey()))
         {
            keys.add(key);
         }
      }
View Full Code Here


      {
         String key = change.getKey();
         int type = change.getType();

         // If the original value exist and is read only we perform a reset instead
         PreferenceInfo pref = prefs.getPreference(key);
         if (pref != null)
         {
            if (Boolean.TRUE.equals(pref.isReadOnly()))
            {
               type = PropertyChange.PREF_RESET;
            }
         }
View Full Code Here

      // Collect missing or read only properties from the referenced portlet
      Set<String> keys = new HashSet<String>();
      for (String key : prefs.getKeys())
      {
         PreferenceInfo pref = prefs.getPreference(key);
         if (Boolean.TRUE.equals(pref.isReadOnly()) || !props.keySet().contains(pref.getKey()))
         {
            keys.add(key);
         }
      }
View Full Code Here

         {
            Set keySet = prefsInfo.getKeys();
            descs = new ArrayList<PropertyDescription>(keySet.size());
            for (Object key : keySet)
            {
               PreferenceInfo prefInfo = prefsInfo.getPreference((String)key);

               // WSRP Spec 8.7: return only the portion of the Portlet's persistent state the user is allowed to modify
               // if read only status is not determined, we consider it as being read-only to be safe
               Boolean readOnly = prefInfo.isReadOnly();
               if (readOnly != null && !readOnly)
               {
                  //todo: check what we should use key
                  //todo: right now we only support String properties
                  List<String> desiredLocales = getPortletPropertyDescription.getDesiredLocales();
                  desiredLocales = WSRPUtils.replaceByEmptyListIfNeeded(desiredLocales);
                  PropertyDescription desc = WSRPTypeFactory.createPropertyDescription(prefInfo.getKey(), WSRPConstants.XSD_STRING);
                  desc.setLabel(Utils.convertToWSRPLocalizedString(prefInfo.getDisplayName(), desiredLocales));
                  desc.setHint(Utils.convertToWSRPLocalizedString(prefInfo.getDescription(), desiredLocales));
                  descs.add(desc);
               }
            }
         }
View Full Code Here

         PropertyList result = WSRPTypeFactory.createPropertyList();
         int propertyNb = properties.size();

         if (propertyNb > 0)
         {
            PreferenceInfo prefInfo;
            String key;
            List<String> values;
            LocalizedString displayName;

            for (Map.Entry<String, List<String>> entry : properties.entrySet())
            {
               key = entry.getKey();
               values = entry.getValue();
               prefInfo = info.getPreferences().getPreference(key);
               displayName = prefInfo.getDisplayName();
               String lang = WSRPUtils.toString(displayName.getDefaultLocale());

               // todo: support multi-valued properties
               if (values.size() != 1)
               {
View Full Code Here

      {
         String key = change.getKey();
         int type = change.getType();

         // If the original value exist and is read only we perform a reset instead
         PreferenceInfo pref = prefs.getPreference(key);
         if (pref != null)
         {
            if (Boolean.TRUE.equals(pref.isReadOnly()))
            {
               type = PropertyChange.PREF_RESET;
            }
         }
View Full Code Here

      // Collect missing or read only properties from the referenced portlet
      Set<String> keys = new HashSet<String>();
      for (String key : prefs.getKeys())
      {
         PreferenceInfo pref = prefs.getPreference(key);
         if (Boolean.TRUE.equals(pref.isReadOnly()) || !props.keySet().contains(pref.getKey()))
         {
            keys.add(key);
         }
      }
View Full Code Here

      {
         String key = change.getKey();
         int type = change.getType();

         // If the original value exist and is read only we perform a reset instead
         PreferenceInfo pref = prefs.getPreference(key);
         if (pref != null)
         {
            if (Boolean.TRUE.equals(pref.isReadOnly()))
            {
               type = PropertyChange.PREF_RESET;
            }
         }
View Full Code Here

      // Collect missing or read only properties from the referenced portlet
      Set<String> keys = new HashSet<String>();
      for (String key : prefs.getKeys())
      {
         PreferenceInfo pref = prefs.getPreference(key);
         if (Boolean.TRUE.equals(pref.isReadOnly()) || !props.keySet().contains(pref.getKey()))
         {
            keys.add(key);
         }
      }
View Full Code Here

      {
         String key = change.getKey();
         int type = change.getType();

         // If the original value exist and is read only we perform a reset instead
         PreferenceInfo pref = prefs.getPreference(key);
         if (pref != null)
         {
            if (Boolean.TRUE.equals(pref.isReadOnly()))
            {
               type = PropertyChange.PREF_RESET;
            }
         }
View Full Code Here

TOP

Related Classes of org.gatein.pc.api.info.PreferenceInfo

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.