001    package railo.runtime.debug;
002    
003    import railo.commons.lang.StringUtil;
004    
005    public final class DebugTraceImpl implements DebugTrace {
006    
007            private int type;
008            private String category;
009            private String text;
010            private String template;
011            private int line;
012            private String varValue;
013            private long time;
014            private String varName;
015            private String action;
016    
017            public DebugTraceImpl(int type, String category, String text, String template, int line, String action,String varName, String varValue, long time) {
018                    this.type=type;
019                    this.category=category;
020                    this.text=text;
021                    this.template=template;
022                    this.line=line;
023                    this.varName=varName;
024                    this.varValue=varValue;
025                    this.time=(time<0)?0:time;
026                    this.action=StringUtil.emptyIfNull(action);
027            }
028    
029            /**
030             * @return the category
031             */
032            public String getCategory() {
033                    return category;
034            }
035    
036            /**
037             * @return the line
038             */
039            public int getLine() {
040                    return line;
041            }
042    
043            /**
044             * @return the template
045             */
046            public String getTemplate() {
047                    return template;
048            }
049    
050            /**
051             * @return the text
052             */
053            public String getText() {
054                    return text;
055            }
056    
057            /**
058             * @return the time
059             */
060            public long getTime() {
061                    return time;
062            }
063    
064            /**
065             * @return the type
066             */
067            public int getType() {
068                    return type;
069            }
070    
071            /**
072             * @return the var value
073             */
074            public String getVarValue() {
075                    return varValue;
076            }
077            public String getVarName() {
078                    return varName;
079            }
080            public String getAction() {// FUTURE add to interface
081                    return action;
082            }
083            
084    }