001/**
002 * Copyright 2005-2016 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.kew.exception;
017
018import org.kuali.rice.kew.api.WorkflowRuntimeException;
019import org.kuali.rice.kew.engine.RouteContext;
020
021
022/**
023 * Thrown from the engine when a problem is encountered.  Wraps a {@link RouteContext}
024 * which contains information about the state of the engine at the time the
025 * problem was encountered.
026 *
027 * @author Kuali Rice Team (rice.collab@kuali.org)
028 */
029public class RouteManagerException extends WorkflowRuntimeException {
030
031    private static final long serialVersionUID = -7957245610622538745L;
032
033    private RouteContext routeContext;
034    
035    public RouteManagerException(String message) {
036        super(message);
037    }
038    
039    public RouteManagerException(String message, RouteContext routeContext) {
040        super(message);
041        this.routeContext = routeContext;
042    }
043    
044    public RouteManagerException(String message, Throwable throwable) {
045        super(message, throwable);
046    }
047    
048    public RouteManagerException(String message, Throwable throwable, RouteContext routeContext) {
049        super(message, throwable);
050        this.routeContext = routeContext;
051    }
052    
053    public RouteManagerException(Throwable throwable, RouteContext routeContext) {
054        super(throwable);
055        this.routeContext = routeContext;
056    }
057        
058    public RouteContext getRouteContext() {
059        return routeContext;
060    }
061
062    public void setRouteContext(RouteContext routeContext) {
063        this.routeContext = routeContext;
064    }
065    
066}