Package org.gatein.pc.api

Examples of org.gatein.pc.api.StatefulPortletContext


        // construct the new customization state
        WSRP wsrp = new WSRP();
        String portletId = portletContext.getId();
        wsrp.setPortletId(portletId);
        if (portletContext instanceof StatefulPortletContext) {
            StatefulPortletContext context = (StatefulPortletContext) portletContext;
            if (PortletStateType.OPAQUE.equals(context.getType())) {
                wsrp.setState((byte[]) context.getState());
            } else {
                throw new IllegalArgumentException("Don't know how to deal with state: " + context.getState());
            }
        }

        // destroy existing customization as otherwise re-customizing will fail
        Customization<?> customization = window.getCustomization();
View Full Code Here


      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());
         }
      }
View Full Code Here

      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "portlet id", "PortletContext");

      org.oasis.wsrp.v2.PortletContext result = WSRPTypeFactory.createPortletContext(id);
      if (portletContext instanceof StatefulPortletContext)
      {
         StatefulPortletContext context = (StatefulPortletContext)portletContext;
         if (PortletStateType.OPAQUE.equals(context.getType()))
         {
            result.setPortletState(((StatefulPortletContext<byte[]>)context).getState());
         }
      }
      return result;
View Full Code Here

            return new StatelessContext(portletContext.getId());
         }
      }
      else
      {
         StatefulPortletContext statefulPortletContext = (StatefulPortletContext)portletContext;
         Serializable bytes = statefulPortletContext.getState();
         PortletStateType stateType = statefulPortletContext.getType();
         try
         {
            final PortletState state = stateConverter.unmarshall(stateType, bytes);
            return new RemoteContext(stateType, state.getPortletId(), state.getProperties());
         }
View Full Code Here

      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());
         }
      }
View Full Code Here

      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());
         }
      }
View Full Code Here

      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());
         }
      }
View Full Code Here

      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "portlet id", "PortletContext");

      org.oasis.wsrp.v2.PortletContext result = WSRPTypeFactory.createPortletContext(id);
      if (portletContext instanceof StatefulPortletContext)
      {
         StatefulPortletContext context = (StatefulPortletContext)portletContext;
         if (PortletStateType.OPAQUE.equals(context.getType()))
         {
            result.setPortletState(((StatefulPortletContext<byte[]>)context).getState());
         }
      }
      return result;
View Full Code Here

TOP

Related Classes of org.gatein.pc.api.StatefulPortletContext

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.