Examples of PortletStateContextMapping


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

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

   @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

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

   {
      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

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

   @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

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

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

   {
      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

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

      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

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

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

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

   {
      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
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.