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

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


      try
      {
         ChromatticSession session = persister.getSession();

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

         persister.save();
      }
      finally
View Full Code Here


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

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

         return context;
      }
      finally
View Full Code Here

      try
      {
         ChromatticSession session = persister.getSession();

         PortletStateContextsMapping portletStateContexts = getContexts(session);
         PortletStateContextMapping pscm = portletStateContexts.createPortletStateContext(UUID.randomUUID().toString());
         portletStateContexts.getPortletStateContexts().add(pscm);

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

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

         // then save
         persister.save();

         return key;
View Full Code Here

   {
      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

      try
      {
         ChromatticSession session = persister.getSession();

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

         persister.save();
      }
      finally
View Full Code Here

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

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

         return context;
      }
      finally
View Full Code Here

      {
         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

   {
      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

Related Classes of org.gatein.wsrp.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.