001    package railo.runtime.err;
002    
003    import railo.runtime.PageSource;
004    /**
005     * 
006     */
007    public final class ErrorPageImpl implements ErrorPage {
008            
009            /** Type of exception. Required if type = "exception" or "monitor". */
010            private String exception="any";
011    
012            /** The relative path to the custom error page. */
013            private PageSource template;
014    
015            /** The e-mail address of the administrator to notify of the error. The value
016            **      is available to your custom error page in the MailTo property of the error object. */
017            private String mailto="";
018    
019            private short type;
020            
021            
022    
023            
024            @Override
025            public void setMailto(String mailto) {
026                    this.mailto = mailto;
027            }
028            
029            @Override
030            public void setTemplate(PageSource template) {
031                    this.template = template;
032            }
033            
034            @Override
035            public void setTypeAsString(String exception) {
036                    setException(exception);
037            }       
038            
039            @Override
040            public void setException(String exception) {
041                    this.exception = exception;
042            }       
043            
044            @Override
045            public String getMailto() {
046                    return mailto;
047            }
048            @Override
049            public PageSource getTemplate() {
050                    return template;
051            }
052            
053            @Override
054            public String getTypeAsString() {
055                    return getException();
056            }
057            public String getException() {
058                    return exception;
059            }
060    
061            @Override
062            public void setType(short type) {
063                    this.type=type;
064            }
065    
066            @Override
067            public short getType() {
068                    return type;
069            }       
070    }