| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.seasar.teeda.core.config.faces.element.impl; |
| 17 | |
|
| 18 | |
import org.seasar.teeda.core.config.faces.element.NavigationCaseElement; |
| 19 | |
|
| 20 | |
|
| 21 | |
|
| 22 | |
|
| 23 | |
public class NavigationCaseElementImpl implements NavigationCaseElement { |
| 24 | |
|
| 25 | |
private String fromAction_; |
| 26 | |
|
| 27 | |
private String fromOutcome_; |
| 28 | |
|
| 29 | |
private String toViewId_; |
| 30 | |
|
| 31 | 5 | private boolean redirect_ = false; |
| 32 | |
|
| 33 | 5 | public NavigationCaseElementImpl() { |
| 34 | 5 | } |
| 35 | |
|
| 36 | |
public void setFromAction(String fromAction) { |
| 37 | 5 | fromAction_ = fromAction; |
| 38 | 5 | } |
| 39 | |
|
| 40 | |
public void setFromOutcome(String outcome) { |
| 41 | 4 | fromOutcome_ = outcome; |
| 42 | 4 | } |
| 43 | |
|
| 44 | |
public void setToViewId(String toViewId) { |
| 45 | 3 | if (toViewId == null) { |
| 46 | 0 | throw new IllegalArgumentException("toViewID"); |
| 47 | |
} |
| 48 | 3 | toViewId_ = toViewId; |
| 49 | 3 | } |
| 50 | |
|
| 51 | |
public void setRedirect(String dummy) { |
| 52 | 2 | redirect_ = true; |
| 53 | 2 | } |
| 54 | |
|
| 55 | |
public String getFromAction() { |
| 56 | 5 | return fromAction_; |
| 57 | |
} |
| 58 | |
|
| 59 | |
public String getFromOutcome() { |
| 60 | 5 | return fromOutcome_; |
| 61 | |
} |
| 62 | |
|
| 63 | |
public String getToViewId() { |
| 64 | 5 | return toViewId_; |
| 65 | |
} |
| 66 | |
|
| 67 | |
public boolean isRedirect() { |
| 68 | 5 | return redirect_; |
| 69 | |
} |
| 70 | |
|
| 71 | |
public boolean equals(Object obj) { |
| 72 | 0 | if (!(obj instanceof NavigationCaseElementImpl)) { |
| 73 | 0 | return false; |
| 74 | |
} |
| 75 | 0 | NavigationCaseElementImpl navCase = (NavigationCaseElementImpl) obj; |
| 76 | 0 | String fromAction = navCase.getFromAction(); |
| 77 | 0 | String fromOutcome = navCase.getFromOutcome(); |
| 78 | 0 | String toViewId = navCase.getToViewId(); |
| 79 | 0 | return (fromAction == null ? fromAction_ == null : fromAction |
| 80 | |
.equals(fromAction_)) |
| 81 | |
&& (fromOutcome == null ? fromOutcome_ == null : fromOutcome |
| 82 | |
.equals(fromOutcome_)) |
| 83 | |
&& (toViewId == null ? toViewId_ == null : toViewId |
| 84 | |
.equals(toViewId)); |
| 85 | |
} |
| 86 | |
} |