Coverage Report - org.kuali.rice.kew.routelog.web.RouteLogForm
 
Classes in this File Line Coverage Branch Coverage Complexity
RouteLogForm
0%
0/69
0%
0/8
1.088
 
 1  
 /*
 2  
  * Copyright 2005-2007 The Kuali Foundation
 3  
  *
 4  
  *
 5  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  *
 9  
  * http://www.opensource.org/licenses/ecl2.php
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.kuali.rice.kew.routelog.web;
 18  
 
 19  
 import java.util.ArrayList;
 20  
 import java.util.List;
 21  
 import java.util.Properties;
 22  
 
 23  
 import org.kuali.rice.core.config.ConfigContext;
 24  
 import org.kuali.rice.kew.util.Utilities;
 25  
 import org.kuali.rice.kns.util.UrlFactory;
 26  
 import org.kuali.rice.kns.web.struts.form.KualiForm;
 27  
 
 28  
 
 29  
 /**
 30  
  * The Struts ActionForm used with {@link RouteLogAction} to display the routelog.
 31  
  *
 32  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 33  
  */
 34  0
 public class RouteLogForm extends KualiForm {
 35  
 
 36  
     private static final long serialVersionUID = -3997667167734868281L;
 37  0
     private String methodToCall = "";
 38  
     private String routeHeaderId;
 39  0
     private List rootRequests = new ArrayList();
 40  
     private int pendingActionRequestCount;
 41  0
     private List futureRootRequests = new ArrayList();
 42  
     private int futureActionRequestCount;
 43  
     private boolean showFuture;
 44  
     private String showFutureError;
 45  
     private boolean removeHeader;
 46  
     private boolean lookFuture;
 47  
     private boolean showNotes;
 48  
     private String docId;
 49  0
     private String returnUrlLocation = null;
 50  0
     private boolean showCloseButton = false;
 51  
     private String newRouteLogActionMessage;
 52  0
     private boolean enableLogAction = false;
 53  
 
 54  
     public boolean isShowCloseButton() {
 55  0
         return showCloseButton;
 56  
     }
 57  
     public void setShowCloseButton(boolean showCloseButton) {
 58  0
         this.showCloseButton = showCloseButton;
 59  0
     }
 60  
     public String getReturnUrlLocation() {
 61  0
         return returnUrlLocation;
 62  
     }
 63  
     public void setReturnUrlLocation(String returnUrlLocation) {
 64  0
         this.returnUrlLocation = returnUrlLocation;
 65  0
     }
 66  
     public String getDocId() {
 67  0
         return docId;
 68  
     }
 69  
     public void setDocId(String docId) {
 70  0
         this.docId = docId;
 71  0
     }
 72  
     public boolean isShowFutureHasError() {
 73  0
         return !Utilities.isEmpty(getShowFutureError());
 74  
     }
 75  
     public String getShowFutureError() {
 76  0
         return showFutureError;
 77  
     }
 78  
     public void setShowFutureError(String showFutureError) {
 79  0
         this.showFutureError = showFutureError;
 80  0
     }
 81  
     public boolean isShowFuture() {
 82  0
         return showFuture;
 83  
     }
 84  
     public void setShowFuture(boolean showReportURL) {
 85  0
         this.showFuture = showReportURL;
 86  0
     }
 87  
     public String getMethodToCall() {
 88  0
         return methodToCall;
 89  
     }
 90  
     public void setMethodToCall(String methodToCall) {
 91  0
         this.methodToCall = methodToCall;
 92  0
     }
 93  
     public String getRouteHeaderId() {
 94  0
         return routeHeaderId;
 95  
     }
 96  
     public void setRouteHeaderId(String routeHeaderId) {
 97  0
         this.routeHeaderId = routeHeaderId;
 98  0
     }
 99  
 
 100  
     public int getPendingActionRequestCount() {
 101  0
         return pendingActionRequestCount;
 102  
     }
 103  
 
 104  
     public void setPendingActionRequestCount(int pendingActionRequestCount) {
 105  0
         this.pendingActionRequestCount = pendingActionRequestCount;
 106  0
     }
 107  
 
 108  
     public List getRootRequests() {
 109  0
         return rootRequests;
 110  
     }
 111  
     public void setRootRequests(List rootRequests) {
 112  0
         this.rootRequests = rootRequests;
 113  0
     }
 114  
     public int getFutureActionRequestCount() {
 115  0
         return futureActionRequestCount;
 116  
     }
 117  
     public void setFutureActionRequestCount(int futureActionRequestCount) {
 118  0
         this.futureActionRequestCount = futureActionRequestCount;
 119  0
     }
 120  
     public List getFutureRootRequests() {
 121  0
         return futureRootRequests;
 122  
     }
 123  
     public void setFutureRootRequests(List futureRootRequests) {
 124  0
         this.futureRootRequests = futureRootRequests;
 125  0
     }
 126  
     public boolean isRemoveHeader() {
 127  0
         return removeHeader;
 128  
     }
 129  
     public void setRemoveHeader(boolean removeBar) {
 130  0
         this.removeHeader = removeBar;
 131  0
     }
 132  
     public boolean isLookFuture() {
 133  0
         return lookFuture;
 134  
     }
 135  
     public void setLookFuture(boolean showFutureLink) {
 136  0
         this.lookFuture = showFutureLink;
 137  0
     }
 138  
         public boolean isShowNotes() {
 139  0
                 return showNotes;
 140  
         }
 141  
         public void setShowNotes(boolean showNotes) {
 142  0
                 this.showNotes = showNotes;
 143  0
         }
 144  
         
 145  
         public String getNewRouteLogActionMessage() {
 146  0
                 return this.newRouteLogActionMessage;
 147  
         }
 148  
         
 149  
         public void setNewRouteLogActionMessage(String newRouteLogActionMessage) {
 150  0
                 this.newRouteLogActionMessage = newRouteLogActionMessage;
 151  0
         }
 152  
         
 153  
         public boolean isEnableLogAction() {
 154  0
                 return this.enableLogAction;
 155  
         }
 156  
         
 157  
         public void setEnableLogAction(boolean enableLogAction) {
 158  0
                 this.enableLogAction = enableLogAction;
 159  0
         }
 160  
         
 161  
         public String getHeaderMenuBar() {
 162  0
                 Properties parameters = new Properties();
 163  0
         parameters.put("showFuture", isShowFuture());
 164  0
         parameters.put("showNotes", isShowNotes());
 165  0
                 if (getRouteHeaderId() != null) {
 166  0
                         parameters.put("routeHeaderId", getRouteHeaderId());
 167  
                 }
 168  0
                 if (getDocId() != null) {
 169  0
                         parameters.put("docId", getDocId());
 170  
                 }
 171  0
                 if (getReturnUrlLocation() != null) {
 172  0
                         parameters.put("backUrl", getReturnUrlLocation());
 173  
                 }
 174  0
         String url = UrlFactory.parameterizeUrl("RouteLog.do", parameters);
 175  0
         String krBaseUrl = ConfigContext.getCurrentContextConfig().getKRBaseURL();
 176  0
         url = "<div class=\"lookupcreatenew\" title=\"Refresh\"><a href=\"" + url + "\"><img src=\""+krBaseUrl+"/images/tinybutton-refresh.gif\" alt=\"refresh\"></a></div>";
 177  0
         return url;
 178  
         }
 179  
 }