Coverage Report - org.seasar.teeda.core.application.navigation.NavigationCaseContext
 
Classes in this File Line Coverage Branch Coverage Complexity
NavigationCaseContext
94%
30/32
N/A
1
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package org.seasar.teeda.core.application.navigation;
 17  
 
 18  
 /**
 19  
  * @author shot
 20  
  */
 21  
 public class NavigationCaseContext {
 22  
 
 23  
     private String fromAction_;
 24  
 
 25  
     private String fromOutcome_;
 26  
 
 27  
     private String toViewId_;
 28  
 
 29  20
     private boolean redirect_ = false;
 30  
 
 31  
     public NavigationCaseContext(String fromAction, String outcome,
 32  17
             String toViewId, boolean redirect) {
 33  17
         fromAction_ = fromAction;
 34  17
         fromOutcome_ = outcome;
 35  17
         toViewId_ = toViewId;
 36  17
         redirect_ = redirect;
 37  17
     }
 38  
 
 39  
     public NavigationCaseContext(String fromAction, String outcome) {
 40  0
         this(fromAction, outcome, null, false);
 41  0
     }
 42  
 
 43  3
     public NavigationCaseContext() {
 44  3
     }
 45  
 
 46  
     public String getFromAction() {
 47  26
         return fromAction_;
 48  
     }
 49  
 
 50  
     public String getFromOutcome() {
 51  26
         return fromOutcome_;
 52  
     }
 53  
 
 54  
     public boolean isRedirect() {
 55  13
         return redirect_;
 56  
     }
 57  
 
 58  
     public String getToViewId() {
 59  17
         return toViewId_;
 60  
     }
 61  
 
 62  
     public void setFromAction(String fromAction) {
 63  3
         fromAction_ = fromAction;
 64  3
     }
 65  
 
 66  
     public void setFromOutcome(String fromOutcome) {
 67  3
         fromOutcome_ = fromOutcome;
 68  3
     }
 69  
 
 70  
     public void setRedirect(boolean redirect) {
 71  3
         redirect_ = redirect;
 72  3
     }
 73  
 
 74  
     public void setToViewId(String toViewId) {
 75  3
         toViewId_ = toViewId;
 76  3
     }
 77  
 
 78  
     public String toString() {
 79  1
         StringBuffer buf = new StringBuffer(50);
 80  1
         buf.append("navigation-case = ");
 81  1
         buf.append("[");
 82  1
         buf.append(" from-action = \"" + fromAction_ + "\"");
 83  1
         buf.append(" from-outcome = \"" + fromOutcome_ + "\"");
 84  1
         buf.append(" to-view-id = \"" + toViewId_ + "\"");
 85  1
         buf.append(" redirect = \"" + redirect_ + "\"");
 86  1
         buf.append("]");
 87  1
         return buf.toString();
 88  
     }
 89  
 
 90  
 }