Package org.oasis.wsrp.v2

Examples of org.oasis.wsrp.v2.PortletContext


      // get parameters
      final MimeRequest params = getParams();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(params, "MarkupParams", getContextName());

      // get portlet handle
      PortletContext wsrpPC = getPortletContext();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(wsrpPC, "PortletContext", getContextName());
      org.gatein.pc.api.PortletContext portletContext = WSRPUtils.convertToPortalPortletContext(wsrpPC);

      // check locales
      final List<String> desiredLocales = params.getLocales();
View Full Code Here


    * @return
    * @since 2.4.1
    */
   public static GetPortletDescription createGetPortletDescription(RegistrationContext registrationContext, String portletHandle)
   {
      PortletContext portletContext = createPortletContext(portletHandle);
      ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "portlet context");
      GetPortletDescription description = new GetPortletDescription();
      description.setPortletContext(portletContext);
      description.setRegistrationContext(registrationContext);
      return description;
View Full Code Here

   public static GetPortletDescription createGetPortletDescription(RegistrationContext registrationContext,
                                                                   org.gatein.pc.api.PortletContext portletContext)
   {
      ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "portlet context");

      PortletContext wsrpPC = createPortletContext(portletContext.getId());
      if (portletContext instanceof StatefulPortletContext)
      {
         StatefulPortletContext context = (StatefulPortletContext)portletContext;
         if (PortletStateType.OPAQUE.equals(context.getType()))
         {
            wsrpPC.setPortletState(((StatefulPortletContext<byte[]>)context).getState());
         }
      }

      GetPortletDescription getPortletDescription = new GetPortletDescription();
      getPortletDescription.setRegistrationContext(registrationContext);
View Full Code Here

   public static PortletContext createPortletContext(String portletHandle)
   {
      checkPortletHandle(portletHandle);

      PortletContext portletContext = new PortletContext();
      portletContext.setPortletHandle(portletHandle);
      return portletContext;
   }
View Full Code Here

   }


   public static PortletContext createPortletContext(String portletHandle, byte[] portletState)
   {
      PortletContext pc = createPortletContext(portletHandle);
      pc.setPortletState(portletState);
      return pc;
   }
View Full Code Here

            V1ToV2Converter.toV2RegistrationContext(registrationContext),
            V1ToV2Converter.toV2PortletContext(portletContext),
            V1ToV2Converter.toV2PropertyList(propertyList));
         setPortletProperties.setUserContext(V1ToV2Converter.toV2UserContext(userContext));

         PortletContext response = producer.setPortletProperties(setPortletProperties);
         portletHandle.value = response.getPortletHandle();
         portletState.value = response.getPortletState();
         extensions.value = WSRPUtils.transform(response.getExtensions(), V2ToV1Converter.EXTENSION);
      }
      catch (AccessDenied accessDenied)
      {
         throw V2ToV1Converter.toV1Exception(V1AccessDenied.class, accessDenied);
      }
View Full Code Here

            V1ToV2Converter.toV2RegistrationContext(registrationContext),
            V1ToV2Converter.toV2PortletContext(portletContext),
            V1ToV2Converter.toV2UserContext(userContext)
         );

         PortletContext response = producer.clonePortlet(clonePortlet);
         portletHandle.value = response.getPortletHandle();
         portletState.value = response.getPortletState();
         extensions.value = WSRPUtils.transform(response.getExtensions(), V2ToV1Converter.EXTENSION);
      }
      catch (AccessDenied accessDenied)
      {
         throw V2ToV1Converter.toV1Exception(V1AccessDenied.class, accessDenied);
      }
View Full Code Here

   ) throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
      MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
   {
      ClonePortlet clonePortlet = WSRPTypeFactory.createClonePortlet(registrationContext, portletContext, userContext);

      PortletContext response = producer.clonePortlet(clonePortlet);

      portletHandle.value = response.getPortletHandle();
      portletState.value = response.getPortletState();
      scheduledDestruction.value = response.getScheduledDestruction();
      extensions.value = response.getExtensions();
   }
View Full Code Here

   ) throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
   {
      SetPortletProperties setPortletProperties = WSRPTypeFactory.createSetPortletProperties(registrationContext, portletContext, propertyList);
      setPortletProperties.setUserContext(userContext);

      PortletContext response = producer.setPortletProperties(setPortletProperties);

      portletHandle.value = response.getPortletHandle();
      portletState.value = response.getPortletState();
      scheduledDestruction.value = response.getScheduledDestruction();
      extensions.value = response.getExtensions();
   }
View Full Code Here

   public V1PortletContext clonePortlet(V1ClonePortlet clonePortlet) throws V1InvalidUserCategory, V1AccessDenied, V1OperationFailed, V1InvalidHandle, V1InvalidRegistration, V1InconsistentParameters, V1MissingParameters
   {
      try
      {
         PortletContext portletContext = producer.clonePortlet(V1ToV2Converter.toV2ClonePortlet(clonePortlet));
         return V2ToV1Converter.toV1PortletContext(portletContext);
      }
      catch (AccessDenied accessDenied)
      {
         throw V2ToV1Converter.toV1Exception(V1AccessDenied.class, accessDenied);
View Full Code Here

TOP

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

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.