Coverage Report - org.kuali.rice.kew.rule.WorkflowAttributeValidationError
 
Classes in this File Line Coverage Branch Coverage Complexity
WorkflowAttributeValidationError
0%
0/21
0%
0/2
1.222
 
 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.rule;
 18  
 
 19  
 import java.io.Serializable;
 20  
 import java.util.Map;
 21  
 
 22  
 import org.kuali.rice.krad.util.MessageMap;
 23  
 
 24  
 
 25  
 /**
 26  
  * An error returned from the validation of a {@link WorkflowAttribute}.
 27  
  * Returned by a call to {@link WorkflowAttributeXmlValidator#validateClientRoutingData()}
 28  
  * and {@link org.kuali.rice.kew.docsearch.SearchableAttributeOld#validateUserSearchInputs(Map)}
 29  
  *
 30  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 31  
  */
 32  
 public class WorkflowAttributeValidationError implements Serializable {
 33  
 
 34  
         private static final long serialVersionUID = 6785629049454272657L;
 35  
 
 36  
         private MessageMap messageMap;
 37  
 
 38  
         private String key;
 39  
         private String message;
 40  
 
 41  0
         public WorkflowAttributeValidationError(String key, String message) {
 42  0
                 this.key = key;
 43  0
                 this.message = message;
 44  0
         }
 45  
 
 46  0
         public WorkflowAttributeValidationError(String key, String message, MessageMap messageMap) {
 47  0
                 this.key = key;
 48  0
                 this.message = message;
 49  0
                 this.messageMap = messageMap;
 50  0
         }
 51  
 
 52  
         /**
 53  
          * @param key The key to set.
 54  
          */
 55  
         public void setKey(String key) {
 56  0
                 this.key = key;
 57  0
         }
 58  
 
 59  
         /**
 60  
          * @return Returns the key.
 61  
          */
 62  
         public String getKey() {
 63  0
                 return key;
 64  
         }
 65  
 
 66  
         /**
 67  
          * @param message The message to set.
 68  
          */
 69  
         public void setMessage(String message) {
 70  0
                 this.message = message;
 71  0
         }
 72  
 
 73  
         /**
 74  
          * @return Returns the message.
 75  
          */
 76  
         public String getMessage() {
 77  0
                 return message;
 78  
         }
 79  
 
 80  
         /**
 81  
          * @return the messageMap
 82  
          */
 83  
         public MessageMap getMessageMap() {
 84  0
                 return this.messageMap;
 85  
         }
 86  
 
 87  
         /**
 88  
          * @param messageMap the messageMap to set
 89  
          */
 90  
         public void setMessageMap(MessageMap messageMap) {
 91  0
                 this.messageMap = messageMap;
 92  0
         }
 93  
 
 94  
         public static org.kuali.rice.kew.api.document.attribute.WorkflowAttributeValidationError to(WorkflowAttributeValidationError validationError) {
 95  0
             if (validationError == null) {
 96  0
                 return null;
 97  
             }
 98  0
             return org.kuali.rice.kew.api.document.attribute.WorkflowAttributeValidationError
 99  
                 .create(validationError.getKey(), validationError.getMessage());
 100  
         }
 101  
 
 102  
 }