Coverage Report - org.kuali.rice.kew.exception.InvalidParentDocTypeException
 
Classes in this File Line Coverage Branch Coverage Complexity
InvalidParentDocTypeException
0%
0/22
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
 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, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kew.exception;
 17  
 
 18  
 /**
 19  
  * This error is thrown whenever a child document type is trying to be processed before its 
 20  
  * parent document type has been parsed; this provides a means for delaying the processing
 21  
  * of child doc types until their parents are parsed.
 22  
  * 
 23  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 24  
  *
 25  
  */
 26  
 public class InvalidParentDocTypeException extends InvalidXmlException {
 27  
         
 28  
         /** The name of the parent document that still needs to be parsed. */
 29  
         private final String parentName;
 30  
         /** The name of the child document that was expecting the parentName document to exist. */
 31  
         private final String childName;
 32  
         
 33  
         /**
 34  
          * Constructs an InvalidParentDocTypeException with null document type parent & child names.
 35  
          */
 36  
         public InvalidParentDocTypeException() {
 37  0
                 super();
 38  0
                 parentName = null;
 39  0
                 childName = null;
 40  0
         }
 41  
         
 42  
         /**
 43  
          * Constructs an InvalidParentDocTypeException, given a document type parent name and a child name.
 44  
          * 
 45  
          * @param docParent The name of the unprocessed document type parent.
 46  
          * @param docChild The name of the unprocessed document type child.
 47  
          */
 48  
         public InvalidParentDocTypeException(String docParent, String docChild) {
 49  0
                 super();
 50  0
                 parentName = docParent;
 51  0
                 childName = docChild;
 52  0
         }
 53  
         
 54  
         /**
 55  
          * Constructs an InvalidParentDocTypeException, given a document type parent name, a child name, and an error message.
 56  
          * 
 57  
          * @param docParent The name of the unprocessed document type parent.
 58  
          * @param docChild The name of the unprocessed document type child.
 59  
          * @param message The error message.
 60  
          */
 61  
         public InvalidParentDocTypeException(String docParent, String docChild, String message) {
 62  0
                 super(message);
 63  0
                 parentName = docParent;
 64  0
                 childName = docChild;
 65  0
         }
 66  
 
 67  
         /**
 68  
          * Constructs an InvalidParentDocTypeException, given a document type parent name, a child name, an error message, and a cause.
 69  
          * 
 70  
          * @param docParent The name of the unprocessed document type parent.
 71  
          * @param docChild The name of the unprocessed document type child.
 72  
          * @param message The error message.
 73  
          * @param throwable The cause.
 74  
          */
 75  
         public InvalidParentDocTypeException(String docParent, String docChild, String message, Throwable throwable) {
 76  0
                 super(message, throwable);
 77  0
                 parentName = docParent;
 78  0
                 childName = docChild;
 79  0
         }
 80  
 
 81  
         /**
 82  
          * Constructs an InvalidParentDocTypeException, given a document type parent name, a child name, and a cause.
 83  
          * 
 84  
          * @param docParent The name of the unprocessed document type parent.
 85  
          * @param docChild The name of the unprocessed document type child.
 86  
          * @param throwable The cause.
 87  
          */
 88  
         public InvalidParentDocTypeException(String docParent, String docChild, Throwable throwable) {
 89  0
                 super(throwable);
 90  0
                 parentName = docParent;
 91  0
                 childName = docChild;
 92  0
         }
 93  
         
 94  
         /**
 95  
          * Retrieves the name of the parent document type that has not been processed yet.
 96  
          * 
 97  
          * @return The name of the unprocessed document type parent, which may or may not be null.
 98  
          */
 99  
         public String getParentName() {
 100  0
                 return parentName;
 101  
         }
 102  
         
 103  
         /**
 104  
          * Retrieves the name of the child document type that depends on the given parent.
 105  
          * 
 106  
          * @return The name of the unprocessed document type child, which may or may not be null.
 107  
          */
 108  
         public String getChildName() {
 109  0
                 return childName;
 110  
         }
 111  
 }