Top Description Inners Fields Constructors Methods
com.sun.faces.application.view

public Class JspStateManagementStrategy

extends StateManagementStrategy
Class Inheritance
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, java.util.ArrayList, .HashSet, .List, .Map, java.util.concurrent.ConcurrentHashMap, java.util.logging.Level, .Logger, javax.faces.FacesException, javax.faces.application.ProjectStage, javax.faces.component.UIComponent, .UIViewRoot, javax.faces.context.FacesContext, javax.faces.render.ResponseStateManager, javax.faces.view.StateManagementStrategy, com.sun.faces.renderkit.RenderKitUtils, com.sun.faces.util.FacesLogger, .Util

A state management strategy for JSP.
Author
Manfred Riem ([email protected])

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
JspStateManagementStrategy.FacetNode

Inner class used to store a facet in the saved component tree.

private static class
JspStateManagementStrategy.TreeNode

Inner class used to store a node in the saved component tree.

Field Summary

Modifier and TypeField and Description
private Map<String, Class<?>>
classMap

Stores the class map.

private boolean
isDevelopmentMode

Are we in development mode.

private static final Logger
LOGGER

Stores the logger.

Constructor Summary

AccessConstructor and Description
public
public
JspStateManagementStrategy(FacesContext
the Faces context.
context
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
private void
captureChild(List<JspStateManagementStrategy.TreeNode>
the tree.
tree
,
int
the parent.
parent
,
UIComponent
the component.
c
)

Capture the child.

private void
captureFacet(List<JspStateManagementStrategy.TreeNode>
the tree.
tree
,
int
the parent.
parent
,
String
the facet name.
name
,
UIComponent
the component.
c
)

Capture the facet.

private void
captureRest(List<JspStateManagementStrategy.TreeNode>
the tree.
tree
,
int
the position.
pos
,
UIComponent
the component.
c
)

Capture the rest.

private UIComponent

Returns:

the UI component.
newInstance
(JspStateManagementStrategy.TreeNode
the tree node.
n
)

Create a new component instance.

private UIViewRoot

Returns:

the view root.
restoreTree
(FacesContext context, String
the render kit id.
renderKitId
,
Object[]
the saved tree.
tree
)

Restore the component tree.

public UIViewRoot

Returns:

the view root.
restoreView
(FacesContext
the Faces context.
context
,
String
the view id.
viewId
,
String
the render kit id.
renderKitId
)

Implements abstract javax.faces.view.StateManagementStrategy.restoreView.

Restore the view.
public Object

Returns:

the saved view.
saveView
(FacesContext
the Faces context.
context
)

Implements abstract javax.faces.view.StateManagementStrategy.saveView.

Save the view.

Field Detail

classMapback to summary
private Map<String, Class<?>> classMap

Stores the class map.

isDevelopmentModeback to summary
private boolean isDevelopmentMode

Are we in development mode.

LOGGERback to summary
private static final Logger LOGGER

Stores the logger.

Constructor Detail

JspStateManagementStrategyback to summary
public JspStateManagementStrategy()

Constructor.

JspStateManagementStrategyback to summary
public JspStateManagementStrategy(FacesContext context)

Constructor.

Parameters
context:FacesContext

the Faces context.

Method Detail

captureChildback to summary
private void captureChild(List<JspStateManagementStrategy.TreeNode> tree, int parent, UIComponent c)

Capture the child.

Parameters
tree:List<JspStateManagementStrategy.TreeNode>

the tree.

parent:int

the parent.

c:UIComponent

the component.

captureFacetback to summary
private void captureFacet(List<JspStateManagementStrategy.TreeNode> tree, int parent, String name, UIComponent c)

Capture the facet.

Parameters
tree:List<JspStateManagementStrategy.TreeNode>

the tree.

parent:int

the parent.

name:String

the facet name.

c:UIComponent

the component.

captureRestback to summary
private void captureRest(List<JspStateManagementStrategy.TreeNode> tree, int pos, UIComponent c)

Capture the rest.

Parameters
tree:List<JspStateManagementStrategy.TreeNode>

the tree.

pos:int

the position.

c:UIComponent

the component.

newInstanceback to summary
private UIComponent newInstance(JspStateManagementStrategy.TreeNode n) throws FacesException

Create a new component instance.

Parameters
n:JspStateManagementStrategy.TreeNode

the tree node.

Returns:UIComponent

the UI component.

Exceptions
FacesException:
when a serious error occurs.
restoreTreeback to summary
private UIViewRoot restoreTree(FacesContext context, String renderKitId, Object[] tree) throws FacesException

Restore the component tree.

Parameters
renderKitId:String

the render kit id.

tree:Object[]

the saved tree.

Returns:UIViewRoot

the view root.

Exceptions
FacesException:
when a serious error occurs.
restoreViewback to summary
public UIViewRoot restoreView(FacesContext context, String viewId, String renderKitId)

Implements abstract javax.faces.view.StateManagementStrategy.restoreView.

Restore the view.

Parameters
context:FacesContext

the Faces context.

viewId:String

the view id.

renderKitId:String

the render kit id.

Returns:UIViewRoot

the view root.

Annotations
@Override
saveViewback to summary
public Object saveView(FacesContext context)

Implements abstract javax.faces.view.StateManagementStrategy.saveView.

Save the view.

Parameters
context:FacesContext

the Faces context.

Returns:Object

the saved view.

Annotations
@Override
com.sun.faces.application.view back to summary

private final Class JspStateManagementStrategy.FacetNode

extends TreeNode
Class Inheritance

Inner class used to store a facet in the saved component tree.

Field Summary

Modifier and TypeField and Description
private String
facetName

Stores the facet name.

private static final long

Constructor Summary

AccessConstructor and Description
public
FacetNode()

Constructor.

public
FacetNode(int
the parent.
parent
,
String
the facet name.
name
,
UIComponent
the component.
c
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public void
public void
Inherited from com.sun.faces.application.view.JspStateManagementStrategy.TreeNode:
getParent

Field Detail

facetNameback to summary
private String facetName

Stores the facet name.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.sun.faces.application.view.JspStateManagementStrategy.TreeNode.serialVersionUID.

Stores the serial version UID.

Constructor Detail

FacetNodeback to summary
public FacetNode()

Constructor.

FacetNodeback to summary
public FacetNode(int parent, String name, UIComponent c)

Constructor.

Parameters
parent:int

the parent.

name:String

the facet name.

c:UIComponent

the component.

Method Detail

readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Overrides com.sun.faces.application.view.JspStateManagementStrategy.TreeNode.readExternal.

Implements java.io.Externalizable.readExternal.

Read the facet node in.

Parameters
in:ObjectInput

the object input.

Annotations
@Override
Exceptions
IOException:
when an I/O error occurs.
ClassNotFoundException:
when the class could not be found.
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Overrides com.sun.faces.application.view.JspStateManagementStrategy.TreeNode.writeExternal.

Implements java.io.Externalizable.writeExternal.

Write the facet node out.

Parameters
out:ObjectOutput

the object output.

Annotations
@Override
Exceptions
IOException:
when an I/O error occurs.
com.sun.faces.application.view back to summary

private Class JspStateManagementStrategy.TreeNode

extends Object
implements Externalizable
Class Inheritance
  • java.lang.Object
  • com.sun.faces.application.view.JspStateManagementStrategy.TreeNode
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable
Known Direct Subclasses
com.sun.faces.application.view.JspStateManagementStrategy.FacetNode

Inner class used to store a node in the saved component tree.

Field Summary

Modifier and TypeField and Description
private String
componentType

Stores the component type.

private String
id

Stores the id.

private static final String
NULL_ID

Stores the NULL_ID constant.

private int
parent

Stores the parent.

private static final long
serialVersionUID

Stores the serial version UID.

Constructor Summary

AccessConstructor and Description
public
TreeNode()

Constructor.

public
TreeNode(int
the parent.
parent
,
UIComponent
the component.
c
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public int
public void
readExternal(ObjectInput
the object input.
in
)

Implements java.io.Externalizable.readExternal.

Read the tree node in.
public void
writeExternal(ObjectOutput
the object output.
out
)

Implements java.io.Externalizable.writeExternal.

Write the tree node out.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

componentTypeback to summary
private String componentType

Stores the component type.

idback to summary
private String id

Stores the id.

NULL_IDback to summary
private static final String NULL_ID

Stores the NULL_ID constant.

parentback to summary
private int parent

Stores the parent.

serialVersionUIDback to summary
private static final long serialVersionUID

Stores the serial version UID.

Constructor Detail

TreeNodeback to summary
public TreeNode()

Constructor.

TreeNodeback to summary
public TreeNode(int parent, UIComponent c)

Constructor.

Parameters
parent:int

the parent.

c:UIComponent

the component.

Method Detail

getParentback to summary
public int getParent()
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Implements java.io.Externalizable.readExternal.

Read the tree node in.

Parameters
in:ObjectInput

the object input.

Annotations
@Override
Exceptions
IOException:
when an I/O error occurs.
ClassNotFoundException:
when the class could not be found.
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Write the tree node out.

Parameters
out:ObjectOutput

the object output.

Annotations
@Override
Exceptions
IOException:
when an I/O error occurs.