Package org.gatein.wsrp.registration

Examples of org.gatein.wsrp.registration.RegistrationPropertyDescription


         RegistrationProperty prop = initial.setRegistrationPropertyValue(rpm.getName(), rpm.getValue());

         RegistrationPropertyDescriptionMapping rpdm = rpm.getDescription();
         if (rpdm != null)
         {
            RegistrationPropertyDescription desc = rpdm.toRegistrationPropertyDescription();
            prop.setDescription(desc);
         }

         prop.setStatus(rpm.getStatus());
View Full Code Here


      setType(desc.getType().toString());
   }

   public RegistrationPropertyDescription toRegistrationPropertyDescription()
   {
      RegistrationPropertyDescription desc = new RegistrationPropertyDescription(getName(), 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

      setName(property.getName());
      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

    * @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

      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

   {
      ParameterValidation.throwIllegalArgExceptionIfNull(propertyDescription, "PropertyDescription");
      QName name = propertyDescription.getName();
      ParameterValidation.throwIllegalArgExceptionIfNull(name, "Property name");

      final RegistrationPropertyDescription old = registrationProperties.put(name, propertyDescription);
      if (modifyNowIfNeeded(old, propertyDescription))
      {
         propertyDescription.setValueChangeListener(this);
         notifyRegistrationPropertyChangeListeners();
      }
View Full Code Here

   }

   public RegistrationPropertyDescription addEmptyRegistrationProperty(String name)
   {
      ParameterValidation.throwIllegalArgExceptionIfNull(name, "Property name");
      RegistrationPropertyDescription reg = new RegistrationPropertyDescription(name, WSRPConstants.XSD_STRING);

      addRegistrationProperty(reg);

      return reg;
   }
View Full Code Here

   }

   private RegistrationPropertyDescription getPropertyDescription(QName propertyName)
   {
      // copy to ensure immutability
      final RegistrationPropertyDescription description = registrationProperties.get(propertyName);
      if (description != null)
      {
         return new RegistrationPropertyDescription(description);
      }
      else
      {
         throw new IllegalArgumentException("Unknown property name '" + propertyName + "'");
      }
View Full Code Here

   }

   public RegistrationPropertyDescription removeRegistrationProperty(QName propertyName)
   {
      ParameterValidation.throwIllegalArgExceptionIfNull(propertyName, "Property name");
      RegistrationPropertyDescription prop = registrationProperties.remove(propertyName);
      if (modifyNowIfNeeded(null, prop))
      {
         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.