Package org.oasis.wsrp.v1

Examples of org.oasis.wsrp.v1.V1ReturnAny


      if (portletHandles.isEmpty())
      {
         throw new IllegalArgumentException("Cannot create a DestroyPortlets with an empty list of portlet handles!");
      }

      V1DestroyPortlets destroyPortlets = new V1DestroyPortlets();
      destroyPortlets.setRegistrationContext(registrationContext);
      if (ParameterValidation.existsAndIsNotEmpty(portletHandles))
      {
         destroyPortlets.getPortletHandles().addAll(portletHandles);
      }
      return destroyPortlets;
   }
View Full Code Here


   {
      if (destroyPortletResponse != null)
      {

         List<V1DestroyFailed> destroyedFailed = WSRPUtils.transform(destroyPortletResponse.getFailedPortlets(), FAILEDPORTLET);
         V1DestroyPortletsResponse result = WSRP1TypeFactory.createDestroyPortletsResponse(destroyedFailed);

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

         return result;
      }
      else
View Full Code Here

    * @return
    * @since 2.6
    */
   public static V1DestroyPortletsResponse createDestroyPortletsResponse(List<V1DestroyFailed> destroyFailed)
   {
      V1DestroyPortletsResponse destroyPortletsResponse = new V1DestroyPortletsResponse();
      if (ParameterValidation.existsAndIsNotEmpty(destroyFailed))
      {
         destroyPortletsResponse.getDestroyFailed().addAll(destroyFailed);
      }
      return destroyPortletsResponse;
   }
View Full Code Here

   public static V1EmployerInfo toV1EmployerInfo(EmployerInfo employerInfo)
   {
      if (employerInfo != null)
      {
         V1EmployerInfo v1EmployerInfo = new V1EmployerInfo();
         v1EmployerInfo.setDepartment(employerInfo.getDepartment());
         v1EmployerInfo.setEmployer(employerInfo.getEmployer());
         v1EmployerInfo.setJobtitle(employerInfo.getJobtitle());

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

         return v1EmployerInfo;
      }
      else
View Full Code Here

   {
      public V1Extension apply(Extension from)
      {
         if (from != null)
         {
            V1Extension extension = new V1Extension();
            extension.setAny(from.getAny());
            return extension;
         }
         else
         {
            return null;
View Full Code Here

   {
      ParameterValidation.throwIllegalArgExceptionIfNull(runtimeContext, "RuntimeContext");
      ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "PortletContext");
      ParameterValidation.throwIllegalArgExceptionIfNull(markupParams, "MarkupParams");

      V1GetMarkup getMarkup = new V1GetMarkup();
      getMarkup.setPortletContext(portletContext);
      getMarkup.setRuntimeContext(runtimeContext);
      getMarkup.setMarkupParams(markupParams);
      return getMarkup;
   }
View Full Code Here

    * @return
    * @since 2.4.1
    */
   public static V1GetPortletDescription createGetPortletDescription(V1RegistrationContext registrationContext, String portletHandle)
   {
      V1GetPortletDescription description = new V1GetPortletDescription();
      description.setPortletContext(createPortletContext(portletHandle));
      description.setRegistrationContext(registrationContext);
      return description;
   }
View Full Code Here

   public static V1InteractionParams toV1InteractionParams(InteractionParams interactionParams)
   {
      if (interactionParams != null)
      {
         V1InteractionParams v1InteractionParams = WSRP1TypeFactory.createInteractionParams(toV1StateChange(interactionParams.getPortletStateChange()));
         v1InteractionParams.setInteractionState(interactionParams.getInteractionState());

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

         List<NamedString> formParameters = interactionParams.getFormParameters();
         if (formParameters != null)
         {
            v1InteractionParams.getFormParameters().addAll(Lists.transform(formParameters, NAMEDSTRING));
         }

         List<UploadContext> uploadContext = interactionParams.getUploadContexts();
         if (uploadContext != null)
         {
            v1InteractionParams.getUploadContexts().addAll(Lists.transform(uploadContext, UPLOADCONTEXT));
         }

         return v1InteractionParams;
      }
      else
View Full Code Here

      public V1ItemDescription apply(ItemDescription from)
      {
         if (from != null)
         {
            V1ItemDescription result = new V1ItemDescription();
            result.setItemName(from.getItemName());
            if (from.getDescription() != null)
            {
               result.setDescription(LOCALIZEDSTRING.apply(from.getDescription()));
            }
            else if (from.getDisplayName() != null)
            {
               result.setDescription(LOCALIZEDSTRING.apply(from.getDisplayName()));
            }
            else
            {
               result.setDescription(WSRP1TypeFactory.createLocalizedString("No Description Available"));
            }
            List<V1Extension> extensions = WSRPUtils.transform(from.getExtensions(), EXTENSION);
            if (extensions != null)
            {
               result.getExtensions().addAll(extensions);
            }
            return result;
         }
         else
         {
View Full Code Here

         List<V1DestroyFailed> result = new ArrayList<V1DestroyFailed>(failedPortletsList.size());

         for (FailedPortlets failedPortlets : failedPortletsList)
         {
            QName errorCode = failedPortlets.getErrorCode();
            V1LocalizedString reason = toV1LocalizedString(failedPortlets.getReason());
           
            String v1Reason;
            //failedPortlets.getReason is optional in V2, but errorCode is required.
            //for V2DestroyFailed the reason is required
            if (reason != null && reason.getValue() != null)
            {
               v1Reason = errorCode.toString() + ": " + reason.getValue();
            }
            else
            {
               v1Reason = errorCode.toString();
            }
View Full Code Here

TOP

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

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.