1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.teeda.core.mock; |
17 | |
|
18 | |
import java.io.IOException; |
19 | |
|
20 | |
import javax.faces.application.StateManager.SerializedView; |
21 | |
import javax.faces.context.FacesContext; |
22 | |
|
23 | |
import org.seasar.teeda.core.application.TreeStructure; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | 3 | public class MockResponseStateManagerImpl extends MockResponseStateManager { |
30 | |
|
31 | |
private TreeStructure struct_; |
32 | |
|
33 | |
private Object state_; |
34 | |
|
35 | |
public void writeState(FacesContext context, SerializedView state) |
36 | |
throws IOException { |
37 | |
|
38 | 0 | } |
39 | |
|
40 | |
public Object getTreeStructureToRestore(FacesContext context, String viewId) { |
41 | 1 | return struct_; |
42 | |
} |
43 | |
|
44 | |
public Object getComponentStateToRestore(FacesContext context) { |
45 | 1 | return state_; |
46 | |
} |
47 | |
|
48 | |
public void setTreeStructureToRestore(TreeStructure struct) { |
49 | 2 | struct_ = struct; |
50 | 2 | } |
51 | |
|
52 | |
public void setComponentStateToRestore(Object state) { |
53 | 2 | state_ = state; |
54 | 2 | } |
55 | |
|
56 | |
} |