Package org.oasis.wsrp.v2

Examples of org.oasis.wsrp.v2.CopyPortletsResponse


               RegistrationLocal.setRegistration(toRegistration);
               org.gatein.pc.api.PortletContext copiedPortletContext = producer.getPortletInvoker().importPortlet(PortletStateType.OPAQUE, exportedPortletContext);

               PortletContext wsrpClonedPC = WSRPUtils.convertToWSRPPortletContext(copiedPortletContext);

               CopiedPortlet copiedPortlet = WSRPTypeFactory.createCopiedPortlet(wsrpClonedPC, portletContext.getPortletHandle());
               copiedPortlets.add(copiedPortlet);
            }
            catch (Exception e)
            {
               if (log.isWarnEnabled())
View Full Code Here


   ) throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
   {
      final CopyPortlets copyPortlets = WSRPTypeFactory.createCopyPortlets(toRegistrationContext, toUserContext, fromRegistrationContext, fromUserContext, fromPortletContexts);
      copyPortlets.setLifetime(lifetime);

      final CopyPortletsResponse copyPortletsResponse = producer.copyPortlets(copyPortlets);

      copiedPortlets.value = copyPortletsResponse.getCopiedPortlets();
      failedPortlets.value = copyPortletsResponse.getFailedPortlets();
      resourceList.value = copyPortletsResponse.getResourceList();
      extensions.value = copyPortletsResponse.getExtensions();
   }
View Full Code Here

      return copyPortlets;
   }

   public static CopyPortletsResponse createCopyPortletsResponse(List<CopiedPortlet> copiedPortlets, List<FailedPortlets> failedPortlets, ResourceList resourceList)
   {
      CopyPortletsResponse response = new CopyPortletsResponse();
      response.getCopiedPortlets().addAll(copiedPortlets);
      response.getFailedPortlets().addAll(failedPortlets);
      response.setResourceList(resourceList);

      return response;
   }
View Full Code Here

      return copyPortlets;
   }

   public static CopyPortletsResponse createCopyPortletsResponse(List<CopiedPortlet> copiedPortlets, List<FailedPortlets> failedPortlets, ResourceList resourceList)
   {
      CopyPortletsResponse response = new CopyPortletsResponse();
      response.getCopiedPortlets().addAll(copiedPortlets);
      response.getFailedPortlets().addAll(failedPortlets);
      response.setResourceList(resourceList);

      return response;
   }
View Full Code Here

   ) throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
   {
      final CopyPortlets copyPortlets = WSRPTypeFactory.createCopyPortlets(toRegistrationContext, toUserContext, fromRegistrationContext, fromUserContext, fromPortletContexts);
      copyPortlets.setLifetime(lifetime);

      final CopyPortletsResponse copyPortletsResponse = producer.copyPortlets(copyPortlets);

      copiedPortlets.value = copyPortletsResponse.getCopiedPortlets();
      failedPortlets.value = copyPortletsResponse.getFailedPortlets();
      resourceList.value = copyPortletsResponse.getResourceList();
      extensions.value = copyPortletsResponse.getExtensions();
   }
View Full Code Here

      return copyPortlets;
   }

   public static CopyPortletsResponse createCopyPortletsResponse(List<CopiedPortlet> copiedPortlets, List<FailedPortlets> failedPortlets, ResourceList resourceList)
   {
      CopyPortletsResponse response = new CopyPortletsResponse();
      response.getCopiedPortlets().addAll(copiedPortlets);
      response.getFailedPortlets().addAll(failedPortlets);
      response.setResourceList(resourceList);

      return response;
   }
View Full Code Here

      {
         throw new NotYetImplemented("Need to support multiple events at once...");
      }

      // since we currently don't support sending multiple events to process at once, assume there's only one
      Event event = events.get(0);

      eventInvocation.setName(event.getName());
      eventInvocation.setPayload(PayloadUtils.getPayloadAsSerializable(event));

      // Extensions
      processExtensionsFrom(eventParams.getClass(), eventParams.getExtensions());
View Full Code Here

      }

      // events
      QName name = invocation.getName();
      Serializable payload = invocation.getPayload();
      Event event = WSRPTypeFactory.createEvent(name, payload);
      EventParams eventParams = WSRPTypeFactory.createEventParams(Collections.singletonList(event), WSRPUtils.getStateChangeFromAccessMode(accessMode));

      return WSRPTypeFactory.createHandleEvents(requestPrecursor.getRegistrationContext(), portletContext,
         requestPrecursor.getRuntimeContext(), requestPrecursor.getUserContext(), requestPrecursor.getMarkupParams(), eventParams);
   }
View Full Code Here

      private void addEventInfo(EventInfo info, Locale locale)
      {
         QName name = info.getName();
         if (!eventDescriptions.containsKey(name))
         {
            EventDescription desc = WSRPTypeFactory.createEventDescription(name);
            desc.setDescription(Utils.convertToWSRPLocalizedString(info.getDescription(), locale));
            desc.setLabel(Utils.convertToWSRPLocalizedString(info.getDisplayName(), locale));
            Collection<QName> aliases = info.getAliases();
            if (ParameterValidation.existsAndIsNotEmpty(aliases))
            {
               desc.getAliases().addAll(aliases);
            }
            // todo: deal with type info...
            eventDescriptions.put(name, desc);
            eventReferenceCount.put(name, 1);
         }
View Full Code Here

   }

   @Override
   protected void checkRequest(HandleEvents handleEvents) throws MissingParameters, OperationFailed, OperationNotSupported
   {
      EventParams eventParams = handleEvents.getEventParams();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(eventParams, "event params", "HandleEvents");
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(eventParams.getPortletStateChange(), "portletStateChange", "EventParams");
      List<Event> events = eventParams.getEvents();
      if (!ParameterValidation.existsAndIsNotEmpty(events))
      {
         throw WSRP2ExceptionFactory.createWSException(MissingParameters.class,
            "EventParams must provide at least one event to process", null);
      }
View Full Code Here

TOP

Related Classes of org.oasis.wsrp.v2.CopyPortletsResponse

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.