Examples of PortletStateContextMapping


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

      {
         ChromatticSession session = persister.getSession();

         String encodedForPath = ChromatticPersister.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);

         // get the key
         final String key = pscm.getPersistentKey();

         // then save
         persister.save();

         return key;
View Full Code Here

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

   {
      try
      {
         ChromatticSession session = persister.getSession();

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

         persister.save();
         return result;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.