Package org.gatein.portal.wsrp.state.producer.state.mapping

Examples of org.gatein.portal.wsrp.state.producer.state.mapping.PortletStateContextMapping


      // more optimized version of updateState
      ParameterValidation.throwIllegalArgExceptionIfNull(propertyMap, "property map");

      ChromatticSession session = persister.getSession();

      PortletStateContextMapping pscm = getPortletStateContextMapping(session, stateId);
      PortletStateMapping psm = pscm.getState();
      psm.setProperties(propertyMap);

      persister.closeSession(session, true);
   }
View Full Code Here


   @Override
   protected PortletStateContext getStateContext(String stateId)
   {
      ChromatticSession session = persister.getSession();

      PortletStateContextMapping pscm = getPortletStateContextMapping(session, stateId);
      PortletStateContext context;
      if (pscm == null)
      {
         context = null;
      }
      else
      {
         context = pscm.toPortletStateContext();
      }

      persister.closeSession(session, false);

      return context;
View Full Code Here

   {
      ChromatticSession session = persister.getSession();

      String encodedForPath = JCRPersister.PortletNameFormatter.encode(portletId);

      PortletStateContextMapping pscm = session.findByPath(PortletStateContextMapping.class, PATH + encodedForPath);
      if (pscm == null)
      {
         PortletStateContextsMapping portletStateContexts = getContexts(session);
         pscm = portletStateContexts.createPortletStateContext(portletId);
         portletStateContexts.getPortletStateContexts().add(pscm);
      }

      PortletStateMapping psm = pscm.getState();
      psm.setPortletID(pscm.getPortletId());
      psm.setProperties(propertyMap);

      persister.closeSession(session, true);

      return pscm.getPersistentKey();
   }
View Full Code Here

   @Override
   protected PortletStateContext destroyStateContext(String stateId)
   {
      ChromatticSession session = persister.getSession();

      PortletStateContextMapping pscm = getPortletStateContextMapping(session, stateId);
      PortletStateContext result;
      if (pscm == null)
      {
         result = null;
      }
      else
      {
         getContexts(session).getPortletStateContexts().remove(pscm);
         session.remove(pscm);
         result = pscm.toPortletStateContext();
      }

      persister.closeSession(session, true);
      return result;
   }
View Full Code Here

TOP

Related Classes of org.gatein.portal.wsrp.state.producer.state.mapping.PortletStateContextMapping

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.