Package org.oasis.wsrp.v1

Examples of org.oasis.wsrp.v1.V1PortletContext


    *
    * @return
    */
   public static V1PortletDescription createPortletDescription(org.gatein.pc.api.PortletContext portletContext, List<V1MarkupType> markupTypes)
   {
      V1PortletContext context = V2ToV1Converter.toV1PortletContext(WSRPUtils.convertToWSRPPortletContext(portletContext));

      ParameterValidation.throwIllegalArgExceptionIfNull(markupTypes, "MarkupType");
      if (markupTypes.isEmpty())
      {
         throw new IllegalArgumentException("Cannot create a PortletDescription with an empty list of MarkupTypes!");
      }

      V1PortletDescription portletDescription = new V1PortletDescription();
      portletDescription.setPortletHandle(context.getPortletHandle());
      portletDescription.getMarkupTypes().addAll(markupTypes);
      return portletDescription;
   }
View Full Code Here


    */
   public static V1PortletContext createPortletContext(String portletHandle)
   {
      checkPortletHandle(portletHandle);

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

    * @return
    * @since 2.6
    */
   public static V1PortletContext createPortletContext(String portletHandle, byte[] portletState)
   {
      V1PortletContext pc = createPortletContext(portletHandle);
      pc.setPortletState(portletState);
      return pc;
   }
View Full Code Here

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

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

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

    *
    * @return
    */
   public static V1PortletDescription createPortletDescription(org.gatein.pc.api.PortletContext portletContext, List<V1MarkupType> markupTypes)
   {
      V1PortletContext context = V2ToV1Converter.toV1PortletContext(WSRPUtils.convertToWSRPPortletContext(portletContext));

      ParameterValidation.throwIllegalArgExceptionIfNull(markupTypes, "MarkupType");
      if (markupTypes.isEmpty())
      {
         throw new IllegalArgumentException("Cannot create a PortletDescription with an empty list of MarkupTypes!");
      }

      V1PortletDescription portletDescription = new V1PortletDescription();
      portletDescription.setPortletHandle(context.getPortletHandle());
      portletDescription.getMarkupTypes().addAll(markupTypes);
      return portletDescription;
   }
View Full Code Here

    */
   public static V1PortletContext createPortletContext(String portletHandle)
   {
      checkPortletHandle(portletHandle);

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

    * @return
    * @since 2.6
    */
   public static V1PortletContext createPortletContext(String portletHandle, byte[] portletState)
   {
      V1PortletContext pc = createPortletContext(portletHandle);
      pc.setPortletState(portletState);
      return pc;
   }
View Full Code Here

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

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

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

    *
    * @return
    */
   public static V1PortletDescription createPortletDescription(org.gatein.pc.api.PortletContext portletContext, List<V1MarkupType> markupTypes)
   {
      V1PortletContext context = V2ToV1Converter.toV1PortletContext(WSRPUtils.convertToWSRPPortletContext(portletContext));

      ParameterValidation.throwIllegalArgExceptionIfNull(markupTypes, "MarkupType");
      if (markupTypes.isEmpty())
      {
         throw new IllegalArgumentException("Cannot create a PortletDescription with an empty list of MarkupTypes!");
      }

      V1PortletDescription portletDescription = new V1PortletDescription();
      portletDescription.setPortletHandle(context.getPortletHandle());
      portletDescription.getMarkupTypes().addAll(markupTypes);
      return portletDescription;
   }
View Full Code Here

    */
   public static V1PortletContext createPortletContext(String portletHandle)
   {
      checkPortletHandle(portletHandle);

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

TOP

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

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.