All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.gatein.api.cdi.context.PortletRedisplayScoped Maven / Gradle / Ivy

There is a newer version: 1.1.0.Final
Show newest version
package org.gatein.api.cdi.context;

import javax.enterprise.context.NormalScope;
import java.lang.annotation.Documented;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * 

Specifies that a bean is portlet redisplay scoped.

* *

The portlet redisplay scope is active during:

* *
    *
  • the Portlet.processAction() method,
  • *
  • the EventPortlet.processEvent() method,
  • *
  • the Portlet.render() method or
  • *
  • the ResourceServingPortlet.serveResource() method
  • *
* * of any portlet request. * *

The portlet redisplay scope is also active during:

* *
    *
  • the ActionFilter.doFilter() method,
  • *
  • the EventFilter.doFilter() method,
  • *
  • the RenderFilter.doFilter() method, and
  • *
  • the ResourceFilter.doFilter() method.
  • *
* * of any portlet filter. * *

The portlet redisplay scope is destroyed:

* *
    *
  • when a call is made to the Portlet.processAction() method,
  • *
  • when a call is made to the EventPortlet.processEvent() method after a previous call to * Portlet.render() has completed,
  • *
  • when a call to ResourceServingPortlet.serveResource() results in navigation to a new view, or
  • *
  • limitations in available resources require the scope to be garbage collected.
  • *
* *

During a call to ResourceServingPortlet.serveResource() a separate context will be activated for the * duration of the method execution, and any ResourceFilter.doFilter() methods defined. When the context is * destroyed, once ResourceServingPortlet.serveResource() and all ResourceFilter.doFilter() methods * are complete, any beans present in the context that are not present in the existing portlet redisplay context * will be added. This ensures that state created as part of ResourceServingPortlet.serveResource() is * available to subsequent Portlet.render() calls.

* * @author Ken Finnigan */ @Target( { TYPE, METHOD, FIELD }) @Retention(RUNTIME) @Documented @NormalScope(passivating = true) @Inherited public @interface PortletRedisplayScoped { }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy