Package org.gatein.wsrp.registration

Examples of org.gatein.wsrp.registration.RegistrationPropertyDescription


      setName(property.getName().toString());
      setStatus(property.getStatus());
      setValue(property.getValue());

      // description
      RegistrationPropertyDescription desc = property.getDescription();
      if (desc != null)
      {
         RegistrationPropertyDescriptionMapping rpdm = createDescription();
         setDescription(rpdm);
         rpdm.initFrom(desc);
View Full Code Here


      initial.setListener(registrationInfo); // we don't want to trigger property changes event here so set the listener after value has been set

      final RegistrationPropertyDescriptionMapping descriptionMapping = getDescription();
      if (descriptionMapping != null)
      {
         final RegistrationPropertyDescription description = descriptionMapping.toModel(null, null);
         initial.setDescription(description);
      }

      return initial;
   }
View Full Code Here

      {
         Map<QName, RegistrationProperty> result = new HashMap<QName, RegistrationProperty>(descriptions.size());
         for (PropertyDescription description : descriptions)
         {
            QName name = description.getName();
            RegistrationPropertyDescription desc = WSRPUtils.convertToRegistrationPropertyDescription(description);
            RegistrationProperty prop = new RegistrationProperty(name, null, WSRPUtils.toString(desc.getLang()), this);
            prop.setDescription(desc);
            prop.setStatus(RegistrationProperty.Status.MISSING_VALUE);
            result.put(name, prop);
         }
View Full Code Here

   }

   @Override
   public RegistrationPropertyDescription toModel(RegistrationPropertyDescription initial, Object registry)
   {
      RegistrationPropertyDescription desc = initial;
      if (desc == null)
      {
         desc = new RegistrationPropertyDescription(getName(), QName.valueOf(getType()));
      }
      else
      {
         desc.setName(QName.valueOf(getName()));
         desc.setType(QName.valueOf(getType()));
      }

      desc.setPersistentKey(getPersistentKey());

      String description = getDescription();
      if (!ParameterValidation.isNullOrEmpty(description))
      {
         desc.setDefaultDescription(description);
      }
      String hint = getHint();
      if (!ParameterValidation.isNullOrEmpty(hint))
      {
         desc.setHint(new LocalizedString(hint));
      }
      String label = getLabel();
      if (!ParameterValidation.isNullOrEmpty(label))
      {
         desc.setLabel(new LocalizedString(label));
      }

      return desc;
   }
View Full Code Here

      {
         Map<String, RegistrationProperty> result = new HashMap<String, RegistrationProperty>(descriptions.size());
         for (PropertyDescription description : descriptions)
         {
            String name = description.getName();
            RegistrationPropertyDescription desc = WSRPUtils.convertToRegistrationPropertyDescription(description);
            RegistrationProperty prop = new RegistrationProperty(name, null, WSRPUtils.toString(desc.getLang()), this);
            prop.setDescription(desc);
            prop.setInvalid(Boolean.TRUE, RegistrationProperty.Status.MISSING_VALUE);
            result.put(name, prop);
         }
View Full Code Here

         return registrationProperties;
      }

      public void addEmptyRegistrationProperty(String propertyName)
      {
         RegistrationPropertyDescription prop = new RegistrationPropertyDescription(propertyName, WSRPConstants.XSD_STRING);

         // Search for the non-existent item
         int index = Collections.binarySearch(registrationProperties, prop);

         // Add the non-existent item to the list
View Full Code Here

    * @since 2.6
    */
   public static RegistrationPropertyDescription convertToRegistrationPropertyDescription(PropertyDescription propertyDescription)
   {
      ParameterValidation.throwIllegalArgExceptionIfNull(propertyDescription, "PropertyDescription");
      RegistrationPropertyDescription desc = new RegistrationPropertyDescription(propertyDescription.getName(),
         propertyDescription.getType());
      desc.setLabel(getLocalizedStringOrNull(propertyDescription.getLabel()));
      desc.setHint(getLocalizedStringOrNull(propertyDescription.getHint()));

      return desc;
   }
View Full Code Here

      {
         Map<QName, RegistrationProperty> result = new HashMap<QName, RegistrationProperty>(descriptions.size());
         for (PropertyDescription description : descriptions)
         {
            QName name = description.getName();
            RegistrationPropertyDescription desc = WSRPUtils.convertToRegistrationPropertyDescription(description);
            RegistrationProperty prop = new RegistrationProperty(name, null, WSRPUtils.toString(desc.getLang()), this);
            prop.setDescription(desc);
            prop.setStatus(RegistrationProperty.Status.MISSING_VALUE);
            result.put(name, prop);
         }
View Full Code Here

      Set<Map.Entry<QName, RegistrationPropertyDescription>> otherProps = other.getRegistrationProperties().entrySet();
      registrationProperties = new HashMap<QName, RegistrationPropertyDescription>(otherProps.size());
      for (Map.Entry<QName, RegistrationPropertyDescription> entry : otherProps)
      {
         registrationProperties.put(entry.getKey(), new RegistrationPropertyDescription(entry.getValue()));
      }

      setLastModified(other.getLastModified());
   }
View Full Code Here

      {
         registrationProperties.clear();

         for (RegistrationPropertyDescription propertyDescription : regProps)
         {
            addRegistrationProperty(new RegistrationPropertyDescription(propertyDescription));
         }

         notifyRegistrationPropertyChangeListeners();
      }
   }
View Full Code Here

TOP

Related Classes of org.gatein.wsrp.registration.RegistrationPropertyDescription

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.