Package org.oasis.wsrp.v1

Examples of org.oasis.wsrp.v1.LocalizedString


   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

   public static V1ServiceDescription toV1ServiceDescription(ServiceDescription serviceDescription)
   {
      if (serviceDescription != null)
      {
         V1ServiceDescription result = new V1ServiceDescription();
         result.setRegistrationPropertyDescription(toV1ModelDescription(serviceDescription.getRegistrationPropertyDescription()));
         result.setRequiresInitCookie(toV1CookieProtocol(serviceDescription.getRequiresInitCookie()));
         result.setRequiresRegistration(serviceDescription.isRequiresRegistration());
         result.setResourceList(toV1ResourceList(serviceDescription.getResourceList()));

         List<V1ItemDescription> modes = WSRPUtils.transform(serviceDescription.getCustomModeDescriptions(), ITEMDESCRIPTION);
         if (modes != null)
         {
            result.getCustomModeDescriptions().addAll(modes);
         }

         List<V1ItemDescription> windowStates = WSRPUtils.transform(serviceDescription.getCustomWindowStateDescriptions(), ITEMDESCRIPTION);
         if (windowStates != null)
         {
            result.getCustomWindowStateDescriptions().addAll(windowStates);
         }

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

         List<String> locales = result.getLocales();
         if (ParameterValidation.existsAndIsNotEmpty(locales))
         {
            result.getLocales().addAll(locales);
         }

         List<V1ItemDescription> userCategories = WSRPUtils.transform(serviceDescription.getUserCategoryDescriptions(), ITEMDESCRIPTION);
         if (userCategories != null)
         {
            result.getUserCategoryDescriptions().addAll(userCategories);
         }

         List<V1PortletDescription> portletDescriptions = WSRPUtils.transform(serviceDescription.getOfferedPortlets(), PORTLETDESCRIPTION);
         if (portletDescriptions != null)
         {
            result.getOfferedPortlets().addAll(portletDescriptions);
         }

         return result;
      }
      else
View Full Code Here

   public static V1SessionContext toV1SessionContext(SessionContext sessionContext)
   {
      if (sessionContext != null && !ParameterValidation.isNullOrEmpty(sessionContext.getSessionID()))
      {
         V1SessionContext v1SessionContext = WSRP1TypeFactory.createSessionContext(sessionContext.getSessionID(), sessionContext.getExpires());
         v1SessionContext.getExtensions().addAll(Lists.transform(sessionContext.getExtensions(), EXTENSION));

         return v1SessionContext;
      }
      else
      {
View Full Code Here

   public static V1Telecom toV1Telecom(Telecom telecom)
   {
      if (telecom != null)
      {
         V1Telecom v1Telecom = new V1Telecom();
         v1Telecom.setFax(toV1TelephoneNum(telecom.getFax()));
         v1Telecom.setMobile(toV1TelephoneNum(telecom.getMobile()));
         v1Telecom.setPager(toV1TelephoneNum(telecom.getPager()));
         v1Telecom.setTelephone(toV1TelephoneNum(telecom.getTelephone()));

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

         return v1Telecom;
      }
      else
View Full Code Here

   public static V1TelephoneNum toV1TelephoneNum(TelephoneNum telephoneNum)
   {
      if (telephoneNum != null)
      {
         V1TelephoneNum v1TelephoneNum = new V1TelephoneNum();
         v1TelephoneNum.setComment(telephoneNum.getComment());
         v1TelephoneNum.setExt(telephoneNum.getExt());
         v1TelephoneNum.setIntcode(telephoneNum.getIntcode());
         v1TelephoneNum.setLoccode(telephoneNum.getLoccode());
         v1TelephoneNum.setNumber(telephoneNum.getNumber());

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

         return v1TelephoneNum;
      }
      else
View Full Code Here

   public static V1BlockingInteractionResponse toV1BlockingInteractionResponse(BlockingInteractionResponse blockingInteractionResponse)
   {
      if (blockingInteractionResponse != null)
      {
         V1BlockingInteractionResponse result;
         V1UpdateResponse updateResponse = toV1UpdateResponse(blockingInteractionResponse.getUpdateResponse());
         String redirectURL = blockingInteractionResponse.getRedirectURL();
         if (redirectURL != null)
         {
            result = WSRP1TypeFactory.createBlockingInteractionResponse(redirectURL);
         }
View Full Code Here

      public V1UploadContext apply(UploadContext uploadContext)
      {
         if (uploadContext != null)
         {
            V1UploadContext result = WSRP1TypeFactory.createUploadContext(uploadContext.getMimeType(), uploadContext.getUploadData());

            List<Extension> extensions = uploadContext.getExtensions();
            if (extensions != null)
            {
               result.getExtensions().addAll(Lists.transform(extensions, EXTENSION));
            }

            List<NamedString> mimeAttributes = uploadContext.getMimeAttributes();
            if (mimeAttributes != null)
            {
               result.getMimeAttributes().addAll(Lists.transform(mimeAttributes, NAMEDSTRING));
            }

            return result;
         }
         else
View Full Code Here

TOP

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

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.