001/*
002 * (C) Copyright 2006-2008 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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 *
016 * Contributors:
017 *     arussel, Benjamin JALON
018 */
019package org.nuxeo.ecm.platform.web.common.exceptionhandling;
020
021import java.util.List;
022
023import org.apache.commons.logging.Log;
024import org.apache.commons.logging.LogFactory;
025import org.nuxeo.ecm.platform.web.common.exceptionhandling.descriptor.ErrorHandler;
026import org.nuxeo.ecm.platform.web.common.exceptionhandling.service.ExceptionHandlingListener;
027import org.nuxeo.ecm.platform.web.common.exceptionhandling.service.RequestDumper;
028
029/**
030 * @author arussel, Benjamin JALON
031 */
032public class NuxeoExceptionHandlerParameters {
033
034    protected String bundleName;
035
036    protected String defaultErrorPage;
037
038    protected RequestDumper requestDumper;
039
040    protected Log errorLog;
041
042    protected List<ErrorHandler> handlers;
043
044    protected ExceptionHandlingListener listener;
045
046    public String getBundleName() {
047        return bundleName;
048    }
049
050    public void setBundleName(String bundleName) {
051        this.bundleName = bundleName;
052    }
053
054    public RequestDumper getRequestDumper() {
055        return requestDumper;
056    }
057
058    public void setRequestDumper(RequestDumper requestDumper) {
059        this.requestDumper = requestDumper;
060    }
061
062    public ExceptionHandlingListener getListener() {
063        return listener;
064    }
065
066    public void setListener(ExceptionHandlingListener listener) {
067        this.listener = listener;
068    }
069
070    public Log getLogger() {
071        return errorLog;
072    }
073
074    public void setLoggerName(String loggerName) {
075        errorLog = LogFactory.getLog(loggerName);
076    }
077
078    public List<ErrorHandler> getHandlers() {
079        return handlers;
080    }
081
082    public void setHandlers(List<ErrorHandler> handlers) {
083        this.handlers = handlers;
084    }
085
086    public String getDefaultErrorPage() {
087        return defaultErrorPage;
088    }
089
090    public void setDefaultErrorPage(String defaultErrorPage) {
091        this.defaultErrorPage = defaultErrorPage;
092    }
093
094}