Package org.jboss.portal.portlet.state

Examples of org.jboss.portal.portlet.state.AbstractPropertyContext


      {
         throw new NoSuchPortletException("Portlet " + context.getPortletContext() + " not found", context.getPortletId());
      }

      // Create prefs
      AbstractPropertyContext prefs = new AbstractPropertyContext(
         access,
         context.isStateful() ? ((StatefulContext)context).getProperties() : null,
         invocation instanceof RenderInvocation);

      //
      PortletInvocationResponse response;
      try
      {
         invocation.setTarget(context.getPortletContext());
         invocation.setAttribute(PropertyContext.PREFERENCES_ATTRIBUTE, prefs);

         // Invoke
         response = super.invoke(invocation);
      }
      finally
      {
         invocation.setTarget(portletContext);
         invocation.removeAttribute(PropertyContext.PREFERENCES_ATTRIBUTE);
      }

      //
      int status = prefs.getStatus();

      // Producer state management if the invocation was succesful
      if (invocation instanceof ActionInvocation && status == AbstractPropertyContext.UPDATE_SUCCESSFUL)
      {
         // Get the potentially updated prefs
         PropertyMap newPrefs = prefs.getPrefs();

         //
         switch(access)
         {
            case CLONE_BEFORE_WRITE:
View Full Code Here


      {
         throw new NoSuchPortletException("Portlet " + context.getPortletContext() + " not found", context.getPortletId());
      }

      // Create prefs
      AbstractPropertyContext prefs = new AbstractPropertyContext(
         access,
         context.isStateful() ? ((StatefulContext)context).getProperties() : null,
         invocation instanceof RenderInvocation);

      //
      PortletInvocationResponse response;
      try
      {
         invocation.setTarget(context.getPortletContext());
         invocation.setAttribute(PropertyContext.PREFERENCES_ATTRIBUTE, prefs);

         // Invoke
         response = super.invoke(invocation);
      }
      finally
      {
         invocation.setTarget(portletContext);
         invocation.removeAttribute(PropertyContext.PREFERENCES_ATTRIBUTE);
      }

      //
      int status = prefs.getStatus();

      // Producer state management if the invocation was succesful
      if ((invocation instanceof ActionInvocation || invocation instanceof ResourceInvocation || invocation instanceof EventInvocation) && status == AbstractPropertyContext.UPDATE_SUCCESSFUL)
      {
         // Get the potentially updated prefs
         PropertyMap newPrefs = prefs.getPrefs();

         //
         switch(access)
         {
            case CLONE_BEFORE_WRITE:
View Full Code Here

TOP

Related Classes of org.jboss.portal.portlet.state.AbstractPropertyContext

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.