001/*
002 * (C) Copyright 2006-2008 Nuxeo SAS (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     arussel, Benjamin JALON
016 */
017package org.nuxeo.ecm.platform.web.common.exceptionhandling;
018
019import java.util.List;
020
021import org.apache.commons.logging.Log;
022import org.apache.commons.logging.LogFactory;
023import org.nuxeo.ecm.platform.web.common.exceptionhandling.descriptor.ErrorHandler;
024import org.nuxeo.ecm.platform.web.common.exceptionhandling.service.ExceptionHandlingListener;
025import org.nuxeo.ecm.platform.web.common.exceptionhandling.service.RequestDumper;
026
027/**
028 * @author arussel, Benjamin JALON
029 */
030public class NuxeoExceptionHandlerParameters {
031
032    protected String bundleName;
033
034    protected String defaultErrorPage;
035
036    protected RequestDumper requestDumper;
037
038    protected Log errorLog;
039
040    protected List<ErrorHandler> handlers;
041
042    protected ExceptionHandlingListener listener;
043
044    public String getBundleName() {
045        return bundleName;
046    }
047
048    public void setBundleName(String bundleName) {
049        this.bundleName = bundleName;
050    }
051
052    public RequestDumper getRequestDumper() {
053        return requestDumper;
054    }
055
056    public void setRequestDumper(RequestDumper requestDumper) {
057        this.requestDumper = requestDumper;
058    }
059
060    public ExceptionHandlingListener getListener() {
061        return listener;
062    }
063
064    public void setListener(ExceptionHandlingListener listener) {
065        this.listener = listener;
066    }
067
068    public Log getLogger() {
069        return errorLog;
070    }
071
072    public void setLoggerName(String loggerName) {
073        errorLog = LogFactory.getLog(loggerName);
074    }
075
076    public List<ErrorHandler> getHandlers() {
077        return handlers;
078    }
079
080    public void setHandlers(List<ErrorHandler> handlers) {
081        this.handlers = handlers;
082    }
083
084    public String getDefaultErrorPage() {
085        return defaultErrorPage;
086    }
087
088    public void setDefaultErrorPage(String defaultErrorPage) {
089        this.defaultErrorPage = defaultErrorPage;
090    }
091
092}