StateManagerWrapper (Java EE 5)

Java EE API


javax.faces.application Class StateManagerWrapper

java.lang.Object
  extended by javax.faces.application.StateManager
      extended by javax.faces.application.StateManagerWrapper

public abstract class StateManagerWrapper
extends StateManager

Extends: StateManager

提供 StateManager 的简单实现,开发人员可为其创建子类为现有 StateManager 实例提供专门行为。所有方法的默认实现是调用包装的 StateManager

用法:扩展此类并重写 #getWrapped,以返回正在包装的实例。

英文文档:

Provides a simple implementation of StateManager that can be subclassed by developers wishing to provide specialized behavior to an existing StateManager instance. The default implementation of all methods is to call through to the wrapped StateManager.

Usage: extend this class and override getWrapped() to return the instance we are wrapping.

Since:
1.2

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.faces.application.StateManager
 
Field Summary
 
Fields inherited from class javax.faces.application.StateManager
 
Constructor Summary
 
Method Summary
protected  Object
protected  Object
protected abstract  StateManager
 boolean
protected  void
protected  UIViewRoot
 UIViewRoot
 StateManager.SerializedView
 Object
 void
 void
 
Methods inherited from class java.lang.Object
 

Constructor Detail

public StateManagerWrapper()
英文文档:

StateManagerWrapper

public StateManagerWrapper()
Method Detail

abstract protected StateManager getWrapped()
return 正在包装的实例。
英文文档:

getWrapped

protected abstract StateManager getWrapped()
Returns:
the instance that we are wrapping.

public StateManager.SerializedView saveSerializedView(FacesContext context)

此方法的默认行为是调用包装的 StateManager 对象上的 saveSerializedView(javax.faces.context.FacesContext)

since1.2
See also saveSerializedView(javax.faces.context.FacesContext)
英文文档:

saveSerializedView

public StateManager.SerializedView saveSerializedView(FacesContext context)

The default behavior of this method is to call StateManager.saveSerializedView(javax.faces.context.FacesContext) on the wrapped StateManager object.

Overrides:
saveSerializedView in class StateManager
Parameters:
context - FacesContext for the current request
Since:
1.2
See Also:
StateManager.saveSerializedView(javax.faces.context.FacesContext)

public Object saveView(FacesContext context)

此方法的默认行为是调用包装的 StateManager 对象上的 saveView(javax.faces.context.FacesContext)

since1.2
See also saveView(javax.faces.context.FacesContext)
英文文档:

saveView

public Object saveView(FacesContext context)

The default behavior of this method is to call StateManager.saveView(javax.faces.context.FacesContext) on the wrapped StateManager object.

Overrides:
saveView in class StateManager
Parameters:
context - FacesContext for the current request
Since:
1.2
See Also:
StateManager.saveView(javax.faces.context.FacesContext)

protected Object getTreeStructureToSave(FacesContext context)

此方法的默认行为是调用包装的 StateManager 对象上的 getTreeStructureToSave(javax.faces.context.FacesContext)

since1.2
See also getTreeStructureToSave(javax.faces.context.FacesContext)
英文文档:

getTreeStructureToSave

protected Object getTreeStructureToSave(FacesContext context)

The default behavior of this method is to call StateManager.getTreeStructureToSave(javax.faces.context.FacesContext) on the wrapped StateManager object.

Overrides:
getTreeStructureToSave in class StateManager
Parameters:
context - FacesContext for the current request
Since:
1.2
See Also:
StateManager.getTreeStructureToSave(javax.faces.context.FacesContext)

protected Object getComponentStateToSave(FacesContext context)

此方法的默认行为是调用包装的 StateManager 对象上的 getComponentStateToSave(javax.faces.context.FacesContext)

since1.2
See also getComponentStateToSave(javax.faces.context.FacesContext)
英文文档:

getComponentStateToSave

protected Object getComponentStateToSave(FacesContext context)

The default behavior of this method is to call StateManager.getComponentStateToSave(javax.faces.context.FacesContext) on the wrapped StateManager object.

Overrides:
getComponentStateToSave in class StateManager
Parameters:
context - FacesContext for the current request
Since:
1.2
See Also:
StateManager.getComponentStateToSave(javax.faces.context.FacesContext)

public void writeState(FacesContext context, Object state) throws java.io.IOException

此方法的默认行为是调用包装的 StateManager 对象上的 writeState(javax.faces.context.FacesContext, java.lang.Object)

since1.2
See also writeState(javax.faces.context.FacesContext, java.lang.Object)
英文文档:

writeState

public void writeState(FacesContext context,
                       Object state)
                throws IOException

The default behavior of this method is to call StateManager.writeState(javax.faces.context.FacesContext, java.lang.Object) on the wrapped StateManager object.

Overrides:
writeState in class StateManager
Parameters:
context - FacesContext for the current request
state - the Serializable state to be written, as returned by StateManager.saveSerializedView(javax.faces.context.FacesContext)
Throws:
IOException
Since:
1.2
See Also:
StateManager.writeState(javax.faces.context.FacesContext, java.lang.Object)

public void writeState(FacesContext context, StateManager.SerializedView state) throws java.io.IOException

此方法的默认行为是调用包装的 StateManager 对象上的 writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)

since1.2
See also writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)
英文文档:

writeState

public void writeState(FacesContext context,
                       StateManager.SerializedView state)
                throws IOException

The default behavior of this method is to call StateManager.writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView) on the wrapped StateManager object.

Overrides:
writeState in class StateManager
Parameters:
context - FacesContext for the current request
state - the serialized state to be written
Throws:
IOException
Since:
1.2
See Also:
StateManager.writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)

public UIViewRoot restoreView(FacesContext context, String viewId, String renderKitId)

此方法的默认行为是调用包装的 StateManager 对象上的 restoreView(javax.faces.context.FacesContext, String, String)

since1.2
See also restoreView(javax.faces.context.FacesContext, String, String)
英文文档:

restoreView

public UIViewRoot restoreView(FacesContext context,
                              String viewId,
                              String renderKitId)

The default behavior of this method is to call StateManager.restoreView(javax.faces.context.FacesContext, String, String) on the wrapped StateManager object.

Specified by:
restoreView in class StateManager
Parameters:
context - FacesContext for the current request
viewId - View identifier of the view to be restored
renderKitId - the renderKitId used to render this response. Must not be null.
Since:
1.2
See Also:
StateManager.restoreView(javax.faces.context.FacesContext, String, String)

protected UIViewRoot restoreTreeStructure(FacesContext context, String viewId, String renderKitId)

此方法的默认行为是调用包装的 StateManager 对象上的 restoreTreeStructure(javax.faces.context.FacesContext, String, String)

since1.2
See also restoreTreeStructure(javax.faces.context.FacesContext, String, String)
英文文档:

restoreTreeStructure

protected UIViewRoot restoreTreeStructure(FacesContext context,
                                          String viewId,
                                          String renderKitId)

The default behavior of this method is to call StateManager.restoreTreeStructure(javax.faces.context.FacesContext, String, String) on the wrapped StateManager object.

Overrides:
restoreTreeStructure in class StateManager
Parameters:
context - FacesContext for the current request
viewId - View identifier of the view to be restored
renderKitId - the renderKitId used to render this response. Must not be null.
Since:
1.2
See Also:
StateManager.restoreTreeStructure(javax.faces.context.FacesContext, String, String)

protected void restoreComponentState(FacesContext context, UIViewRoot viewRoot, String renderKitId)

此方法的默认行为是调用包装的 StateManager 对象上的 restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, String)}。

since1.2
See also restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, String)
英文文档:

restoreComponentState

protected void restoreComponentState(FacesContext context,
                                     UIViewRoot viewRoot,
                                     String renderKitId)

The default behavior of this method is to call StateManager.restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, String) on the wrapped StateManager object.

Overrides:
restoreComponentState in class StateManager
Parameters:
context - FacesContext for the current request
viewRoot - UIViewRoot returned by a previous call to restoreTreeStructure()
renderKitId - the renderKitId used to render this response. Must not be null.
Since:
1.2
See Also:
StateManager.restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, String)

public boolean isSavingStateInClient(FacesContext context)

此方法的默认行为是调用包装的 StateManager 对象上的 isSavingStateInClient(javax.faces.context.FacesContext)

since1.2
See also isSavingStateInClient(javax.faces.context.FacesContext)
英文文档:

isSavingStateInClient

public boolean isSavingStateInClient(FacesContext context)

The default behavior of this method is to call StateManager.isSavingStateInClient(javax.faces.context.FacesContext) on the wrapped StateManager object.

Overrides:
isSavingStateInClient in class StateManager
Returns:
true if and only if the value of the ServletContext init parameter named by the value of the constant StateManager.STATE_SAVING_METHOD_PARAM_NAME is equal to the value of the constant StateManager.STATE_SAVING_METHOD_CLIENT. false otherwise.
Since:
1.2
See Also:
StateManager.isSavingStateInClient(javax.faces.context.FacesContext)


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!