001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.runtime.err; 020 021import lucee.runtime.PageSource; 022 023/** 024 * represent a Error Page 025 */ 026public interface ErrorPage { 027 028 public static final short TYPE_EXCEPTION=1; 029 public static final short TYPE_REQUEST=2; 030 public static final short TYPE_VALIDATION=4; 031 032 /** 033 * sets the mailto attribute 034 * @param mailto 035 */ 036 public abstract void setMailto(String mailto); 037 038 /** 039 * sets the template attribute 040 * @param template 041 */ 042 public abstract void setTemplate(PageSource template); 043 044 /** 045 * sets the exception attribute 046 * @param exception 047 * @deprecated use instead <code>setException(String exception);</code> 048 */ 049 public abstract void setTypeAsString(String exception); 050 051 /** 052 * sets the exception attribute 053 * @param exception 054 */ 055 public abstract void setException(String exception); 056 057 /** 058 * @return Returns the mailto. 059 */ 060 public abstract String getMailto(); 061 062 /** 063 * @return Returns the template. 064 */ 065 public abstract PageSource getTemplate(); 066 067 /** 068 * @return Returns the exception type. 069 * @deprecated use instead <code>getException();</code> 070 */ 071 public abstract String getTypeAsString(); 072 073 /** 074 * @return Returns the exception type. 075 */ 076 public abstract String getException(); 077 078 public void setType(short type); 079 080 public short getType(); 081 082}