1 40 41 package org.dspace.app.statistics; 42 43 import java.util.Date ; 44 45 54 public class LogLine 55 { 56 57 private Date date = null; 58 59 60 private String level = null; 61 62 63 private String user = null; 64 65 66 private String action = null; 67 68 69 private String params = null; 70 71 77 LogLine(Date date, String level, String user, String action, String params) 78 { 79 this.date = date; 80 this.level = level; 81 this.user = user; 82 this.action = action; 83 this.params = params; 84 } 85 86 91 public Date getDate() 92 { 93 return this.date; 94 } 95 96 97 102 public String getLevel() 103 { 104 return this.level; 105 } 106 107 108 113 public String getUser() 114 { 115 return this.user; 116 } 117 118 119 124 public String getAction() 125 { 126 return this.action; 127 } 128 129 130 135 public String getParams() 136 { 137 return this.params; 138 } 139 140 141 148 public boolean beforeDate(Date date) 149 { 150 if (date != null) 151 { 152 if (date.compareTo(this.getDate()) >= 0) 153 { 154 return true; 155 } 156 else 157 { 158 return false; 159 } 160 } 161 return false; 162 } 163 164 165 172 public boolean afterDate(Date date) 173 { 174 if (date != null) 175 { 176 if (date.compareTo(this.getDate()) <= 0) 177 { 178 return true; 179 } 180 else 181 { 182 return false; 183 } 184 } 185 return false; 186 } 187 188 189 197 public boolean isLevel(String level) 198 { 199 if (this.getLevel().equals(level)) 200 { 201 return true; 202 } 203 return false; 204 } 205 206 207 216 public boolean isAction(String action) 217 { 218 if (this.getAction().equals(action)) 219 { 220 return true; 221 } 222 return false; 223 } 224 225 } 226 | Popular Tags |