Package org.oasis.wsrp.v1

Examples of org.oasis.wsrp.v1.V1ModelDescription


   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

   public static V1RegistrationState toV1RegistrationState(RegistrationState registrationState)
   {
      if (registrationState != null)
      {
         V1RegistrationState result = new V1RegistrationState();
         result.setRegistrationState(registrationState.getRegistrationState());

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

         return result;
      }
      else
View Full Code Here

   {
      public V1Resource apply(Resource from)
      {
         if (from != null)
         {
            V1Resource result = new V1Resource();
            result.setResourceName(from.getResourceName());
            List<V1ResourceValue> values = WSRPUtils.transform(from.getValues(), RESOURCEVALUE);
            if (values != null)
            {
               result.getValues().addAll(values);
            }

            return result;
         }
         else
View Full Code Here

   public static V1ResourceList toV1ResourceList(ResourceList resourceList)
   {
      if (resourceList != null)
      {
         V1ResourceList result = new V1ResourceList();
         List<V1Extension> extensions = WSRPUtils.transform(resourceList.getExtensions(), EXTENSION);
         if (extensions != null)
         {
            result.getExtensions().addAll(extensions);
         }
         List<V1Resource> v1Resources = WSRPUtils.transform(resourceList.getResources(), RESOURCE);
         if (v1Resources != null)
         {
            result.getResources().addAll(v1Resources);
         }
         return result;
      }
      else
      {
View Full Code Here

   {
      public V1ResourceValue apply(ResourceValue from)
      {
         if (from != null)
         {
            V1ResourceValue result = new V1ResourceValue();
            result.setLang(from.getLang());
            result.setValue(from.getValue());
            List<V1Extension> extensions = WSRPUtils.transform(from.getExtensions(), EXTENSION);
            if (extensions != null)
            {
               result.getExtensions().addAll(extensions);
            }

            return result;
         }
         else
View Full Code Here

   public static V1ReturnAny toV1ReturnAny(ReturnAny returnAny)
   {
      if (returnAny != null)
      {
         V1ReturnAny result = new V1ReturnAny();

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

         return result;
      }
      else
View Full Code Here

   public static V1RuntimeContext toV1RuntimeContext(RuntimeContext runtimeContext)
   {
      if (runtimeContext != null)
      {
         V1RuntimeContext v1RuntimeContext = WSRP1TypeFactory.createRuntimeContext(runtimeContext.getUserAuthentication(), runtimeContext.getPortletInstanceKey(), runtimeContext.getNamespacePrefix());
         v1RuntimeContext.setNamespacePrefix(runtimeContext.getNamespacePrefix());
         v1RuntimeContext.setPortletInstanceKey(runtimeContext.getPortletInstanceKey());
         SessionParams sessionParams = runtimeContext.getSessionParams();
         if (sessionParams != null)
         {
            v1RuntimeContext.setSessionID(sessionParams.getSessionID());
         }
         v1RuntimeContext.setTemplates(V2ToV1Converter.toV1Templates(runtimeContext.getTemplates()));

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

         return v1RuntimeContext;
      }
      else
View Full Code Here

TOP

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

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.