Top Inners Fields Constructors Methods
com.sun.faces.flow

public Class FlowCDIContext

extends Object
implements Context, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, jakarta.enterprise.context.spi.Context
Static Imports
com.sun.faces.cdi.CdiUtils.getBeanReference, com.sun.faces.util.Util.getCdiBeanManager

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
private static class

Field Summary

Modifier and TypeField and Description
private static final String
private transient Map<Contextual<?>, FlowCDIContext.FlowBeanInfo>
private static final String
private static final String
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private final void
pack-priv void
private static void
ensureBeanMapCleanupOnSessionDestroyed(Map<String, Object> sessionMap, String flowBeansForClientWindow)

private static void
ensureCreationalCleanupOnSessionDestroyed(Map<String, Object> sessionMap, String creationalForClientWindow)

pack-priv static void
pack-priv static void
flowExited(Flow currentFlow, int depth)

public <T> T
get(Contextual<T>
the contextual type
contextual
,
CreationalContext<T>
the context in which the new instance will be created
creational
)

Implements jakarta.enterprise.context.spi.Context.get.

Return an existing instance of certain contextual type or create a new instance by calling Contextual#create(CreationalContext) and return the new instance.

public <T> T
get(Contextual<T>
the contextual type
contextual
)

Implements jakarta.enterprise.context.spi.Context.get.

Return an existing instance of a certain contextual type or a null value.

private <T> T
get(FlowCDIContext.FlowScopeMapHelper mapHelper, Contextual<T> contextual)

private Flow
private static Flow
pack-priv static Map<Object, Object>
private static Map<Object, Object>
public Class<? extends Annotation>
getScope()

Implements jakarta.enterprise.context.spi.Context.getScope.

Get the scope type of the context object.

public boolean
isActive()

Implements jakarta.enterprise.context.spi.Context.isActive.

Determines if the context object is active.

public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FLOW_SCOPE_MAP_KEYback to summary
private static final String FLOW_SCOPE_MAP_KEY
flowIdsback to summary
private transient Map<Contextual<?>, FlowCDIContext.FlowBeanInfo> flowIds
PER_SESSION_BEAN_MAP_LISTback to summary
private static final String PER_SESSION_BEAN_MAP_LIST
PER_SESSION_CREATIONAL_LISTback to summary
private static final String PER_SESSION_CREATIONAL_LIST
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

FlowCDIContextback to summary
pack-priv FlowCDIContext(Map<Contextual<?>, FlowCDIContext.FlowBeanInfo> flowIds)

Method Detail

assertNotReleasedback to summary
private final void assertNotReleased()
beforeShutdownback to summary
pack-priv void beforeShutdown(BeforeShutdown event, BeanManager beanManager)
ensureBeanMapCleanupOnSessionDestroyedback to summary
private static void ensureBeanMapCleanupOnSessionDestroyed(Map<String, Object> sessionMap, String flowBeansForClientWindow)
ensureCreationalCleanupOnSessionDestroyedback to summary
private static void ensureCreationalCleanupOnSessionDestroyed(Map<String, Object> sessionMap, String creationalForClientWindow)
flowEnteredback to summary
pack-priv static void flowEntered()
flowExitedback to summary
pack-priv static void flowExited(Flow currentFlow, int depth)
getback to summary
public <T> T get(Contextual<T> contextual, CreationalContext<T> creational)

Implements jakarta.enterprise.context.spi.Context.get.

Doc from jakarta.enterprise.context.spi.Context.get.

Return an existing instance of certain contextual type or create a new instance by calling Contextual#create(CreationalContext) and return the new instance.

Parameters
<T>
the type of contextual type
contextual:Contextual<T>

the contextual type

creational:CreationalContext<T>

the context in which the new instance will be created

Returns:T

the contextual instance

Annotations
@SuppressWarnings:unchecked
@Override
getback to summary
public <T> T get(Contextual<T> contextual)

Implements jakarta.enterprise.context.spi.Context.get.

Doc from jakarta.enterprise.context.spi.Context.get.

Return an existing instance of a certain contextual type or a null value.

Parameters
<T>
the type of the contextual type
contextual:Contextual<T>

the contextual type

Returns:T

the contextual instance, or a null value

Annotations
@Override
getback to summary
private <T> T get(FlowCDIContext.FlowScopeMapHelper mapHelper, Contextual<T> contextual)
Annotations
@SuppressWarnings:unchecked
getCurrentFlowback to summary
private Flow getCurrentFlow()
getCurrentFlowback to summary
private static Flow getCurrentFlow(FacesContext context)
getCurrentFlowScopeAndUpdateSessionback to summary
pack-priv static Map<Object, Object> getCurrentFlowScopeAndUpdateSession()
getCurrentFlowScopeAndUpdateSessionback to summary
private static Map<Object, Object> getCurrentFlowScopeAndUpdateSession(FlowCDIContext.FlowScopeMapHelper mapHelper)
Annotations
@SuppressWarnings:unchecked
getScopeback to summary
public Class<? extends Annotation> getScope()

Implements jakarta.enterprise.context.spi.Context.getScope.

Doc from jakarta.enterprise.context.spi.Context.getScope.

Get the scope type of the context object.

Returns:Class<? extends Annotation>

the scope

Annotations
@Override
isActiveback to summary
public boolean isActive()

Implements jakarta.enterprise.context.spi.Context.isActive.

Doc from jakarta.enterprise.context.spi.Context.isActive.

Determines if the context object is active.

Returns:boolean

true if the context is active, or false otherwise.

Annotations
@Override
sessionDestroyedback to summary
public static void sessionDestroyed(HttpSessionEvent httpSessionEvent)
Annotations
@SuppressWarnings:unchecked
com.sun.faces.flow back to summary

pack-priv Class FlowCDIContext.FlowBeanInfo

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv String

Constructor Summary

AccessConstructor and Description
public
FlowBeanInfo(String definingDocumentId, String id)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

definingDocumentIdback to summary
pack-priv String definingDocumentId
idback to summary
pack-priv String id

Constructor Detail

FlowBeanInfoback to summary
public FlowBeanInfo(String definingDocumentId, String id)

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
com.sun.faces.flow back to summary

private Class FlowCDIContext.FlowScopeMapHelper

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private transient String
private transient String
private final transient Map<String, Object>

Constructor Summary

AccessConstructor and Description
private
private
FlowScopeMapHelper(FacesContext facesContext, Flow flow, int flowDepth)

Method Summary

Modifier and TypeMethod and Description
private void
private void
generateKeyForCDIBeansBelongToAFlow(FacesContext facesContext, Flow flow, int flowDepth)

public String
public String
private Map<String, Object>
private Map<String, CreationalContext<?>>
private boolean
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

creationalForClientWindowKeyback to summary
private transient String creationalForClientWindowKey
flowBeansForClientWindowKeyback to summary
private transient String flowBeansForClientWindowKey
sessionMapback to summary
private final transient Map<String, Object> sessionMap

Constructor Detail

FlowScopeMapHelperback to summary
private FlowScopeMapHelper(FacesContext facesContext)
FlowScopeMapHelperback to summary
private FlowScopeMapHelper(FacesContext facesContext, Flow flow, int flowDepth)

Method Detail

createMapsback to summary
private void createMaps()
generateKeyForCDIBeansBelongToAFlowback to summary
private void generateKeyForCDIBeansBelongToAFlow(FacesContext facesContext, Flow flow, int flowDepth)
getCreationalForClientWindowKeyback to summary
public String getCreationalForClientWindowKey()
getFlowBeansForClientWindowKeyback to summary
public String getFlowBeansForClientWindowKey()
getFlowScopedBeanMapForCurrentFlowback to summary
private Map<String, Object> getFlowScopedBeanMapForCurrentFlow()
getFlowScopedCreationalMapForCurrentFlowback to summary
private Map<String, CreationalContext<?>> getFlowScopedCreationalMapForCurrentFlow()
isFlowExistsback to summary
private boolean isFlowExists()
updateSessionback to summary
private void updateSession()