001 /**
002 * Copyright 2010 The Kuali Foundation Licensed under the
003 * Educational Community License, Version 2.0 (the "License"); you may
004 * not use this file except in compliance with the License. You may
005 * obtain a copy of the License at
006 *
007 * http://www.osedu.org/licenses/ECL-2.0
008 *
009 * Unless required by applicable law or agreed to in writing,
010 * software distributed under the License is distributed on an "AS IS"
011 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
012 * or implied. See the License for the specific language governing
013 * permissions and limitations under the License.
014 */
015
016 package org.kuali.student.common.ui.client.mvc;
017
018 /**
019 * Passed to ModelRequestCallback when the model is not found.
020 *
021 * @author Kuali Student Team
022 */
023 public class ModelNotFoundException extends RuntimeException {
024
025 private static final long serialVersionUID = 1631884923519293731L;
026 private final Class<?> requestedType;
027
028 /**
029 * This constructs a ModelNotFoundException
030 *
031 * @param message
032 * @param requestedType
033 * the type associated with the model request
034 */
035 public ModelNotFoundException(String message, Class<?> requestedType) {
036 super(message);
037 this.requestedType = requestedType;
038 }
039
040 /**
041 * Returns the type associated with the model request
042 *
043 * @return the type associated with the model request
044 */
045 public Class<?> getRequestedType() {
046 return requestedType;
047 }
048
049 }