Package org.oasis.wsrp.v1

Examples of org.oasis.wsrp.v1.V1RegistrationData


   public static V1PortletDescriptionResponse toV1PortletDescriptionResponse(PortletDescriptionResponse portletDescriptionResponse)
   {
      if (portletDescriptionResponse != null)
      {
         V1PortletDescriptionResponse result = WSRP1TypeFactory.createPortletDescriptionResponse(toV1PortletDescription(portletDescriptionResponse.getPortletDescription()));
         result.setResourceList(toV1ResourceList(portletDescriptionResponse.getResourceList()));

         List<V1Extension> extensions = WSRPUtils.transform(portletDescriptionResponse.getExtensions(), EXTENSION);
         if (extensions != null)
         {
            result.getExtensions().addAll(extensions);
         }

         return result;
      }
      else
View Full Code Here


   public static V1PortletPropertyDescriptionResponse toV1PortletPropertyDescriptionResponse(PortletPropertyDescriptionResponse portletPropertyDescriptionResponse)
   {
      if (portletPropertyDescriptionResponse != null)
      {
         //todo use WSRP1TypeFactory instead
         V1PortletPropertyDescriptionResponse result = new V1PortletPropertyDescriptionResponse();
         result.setModelDescription(toV1ModelDescription(portletPropertyDescriptionResponse.getModelDescription()));
         result.setResourceList(toV1ResourceList(portletPropertyDescriptionResponse.getResourceList()));

         List<V1Extension> extensions = WSRPUtils.transform(portletPropertyDescriptionResponse.getExtensions(), EXTENSION);
         if (extensions != null)
         {
            result.getExtensions().addAll(extensions);
         }

         return result;
      }
      else
View Full Code Here

   public static V1Postal toV1Postal(Postal postal)
   {
      if (postal != null)
      {
         V1Postal v1Postal = new V1Postal();
         v1Postal.setCity(postal.getCity());
         v1Postal.setCountry(postal.getCountry());
         v1Postal.setName(postal.getName());
         v1Postal.setOrganization(postal.getOrganization());
         v1Postal.setPostalcode(postal.getPostalcode());
         v1Postal.setStateprov(postal.getStateprov());
         v1Postal.setStreet(postal.getStreet());

         List<Extension> extensions = postal.getExtensions();
         if (extensions != null)
         {
            v1Postal.getExtensions().addAll(WSRPUtils.transform(extensions, EXTENSION));
         }

         return v1Postal;
      }
      else
View Full Code Here

   {
      public V1Property apply(Property from)
      {
         if (from != null)
         {
            V1Property result = WSRP1TypeFactory.createProperty(from.getName().toString(), from.getLang(), from.getStringValue());
            List<Object> any = from.getAny();
            if (ParameterValidation.existsAndIsNotEmpty(any))
            {
               result.getAny().addAll(any);
            }

            return result;
         }
         else
View Full Code Here

   public static V1PropertyDescription toV1PropertyDescription(PropertyDescription propertyDescription)
   {
      if (propertyDescription != null)
      {
         V1PropertyDescription result = WSRP1TypeFactory.createPropertyDescription(propertyDescription.getName().toString(), propertyDescription.getType());
         result.setHint(toV1LocalizedString(propertyDescription.getHint()));
         result.setLabel(toV1LocalizedString(propertyDescription.getLabel()));
         List<V1Extension> extensions = WSRPUtils.transform(propertyDescription.getExtensions(), EXTENSION);
         if (extensions != null)
         {
            result.getExtensions().addAll(extensions);
         }

         return result;
      }
      else
View Full Code Here

   public static V1PropertyList toV1PropertyList(PropertyList propertyList)
   {
      if (propertyList != null)
      {
         V1PropertyList result = new V1PropertyList();

         List<V1Property> properties = WSRPUtils.transform(propertyList.getProperties(), PROPERTY);
         if (properties != null)
         {
            result.getProperties().addAll(properties);
         }

         List<V1ResetProperty> resetProperties = WSRPUtils.transform(propertyList.getResetProperties(), RESETPROPERTY);
         if (resetProperties != null)
         {
            result.getResetProperties().addAll(resetProperties);
         }

         List<V1Extension> extensions = WSRPUtils.transform(propertyList.getExtensions(), EXTENSION);
         if (extensions != null)
         {
            result.getExtensions().addAll(extensions);
         }

         return result;
      }
      else
View Full Code Here

   public static V1RegistrationContext toV1RegistrationContext(RegistrationContext registrationContext)
   {
      if (registrationContext != null)
      {
         V1RegistrationContext result = WSRP1TypeFactory.createRegistrationContext(registrationContext.getRegistrationHandle());
         result.setRegistrationState(registrationContext.getRegistrationState());
         List<V1Extension> extensions = WSRPUtils.transform(registrationContext.getExtensions(), EXTENSION);
         if (extensions != null)
         {
            result.getExtensions().addAll(extensions);
         }
         return result;
      }
      else
      {
View Full Code Here

   public static V1RegistrationData toV1RegistrationData(RegistrationData registrationData)
   {
      if (registrationData != null)
      {
         V1RegistrationData result = WSRP1TypeFactory.createRegistrationData(registrationData.getConsumerName(), registrationData.isMethodGetSupported());
         result.setConsumerAgent(registrationData.getConsumerAgent());

         List<V1Property> properties = WSRPUtils.transform(registrationData.getRegistrationProperties(), PROPERTY);
         if (properties != null)
         {
            result.getRegistrationProperties().addAll(properties);
         }
         List<String> modes = registrationData.getConsumerModes();
         if (ParameterValidation.existsAndIsNotEmpty(modes))
         {
            result.getConsumerModes().addAll(modes);
         }
         List<String> consumerUserScopes = registrationData.getConsumerUserScopes();
         if (ParameterValidation.existsAndIsNotEmpty(consumerUserScopes))
         {
            result.getConsumerUserScopes().addAll(consumerUserScopes);
         }
         List<String> windowStates = registrationData.getConsumerWindowStates();
         if (ParameterValidation.existsAndIsNotEmpty(windowStates))
         {
            result.getConsumerWindowStates().addAll(windowStates);
         }
         List<V1Extension> extensions = WSRPUtils.transform(registrationData.getExtensions(), EXTENSION);
         if (extensions != null)
         {
            result.getExtensions().addAll(extensions);
         }

         return result;
      }
      else
View Full Code Here

    * @return
    */
   public static V1RegistrationData createRegistrationData(String consumerName, boolean methodGetSupported)
   {
      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerName, "consumer name", "RegistrationData");
      V1RegistrationData regData = createDefaultRegistrationData();
      regData.setConsumerName(consumerName);
      regData.setMethodGetSupported(methodGetSupported);
      return regData;
   }
View Full Code Here

    * @return
    * @since 2.4.1
    */
   public static V1RegistrationData createDefaultRegistrationData()
   {
      V1RegistrationData registrationData = new V1RegistrationData();
      registrationData.setConsumerName(WSRPConstants.DEFAULT_CONSUMER_NAME);
      registrationData.setConsumerAgent(WSRPConstants.CONSUMER_AGENT);
      registrationData.setMethodGetSupported(false);
      return registrationData;
   }
View Full Code Here

TOP

Related Classes of org.oasis.wsrp.v1.V1RegistrationData

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.