Line data Source code
1 : // Copyright (C) 2013 The Android Open Source Project 2 : // 3 : // Licensed under the Apache License, Version 2.0 (the "License"); 4 : // you may not use this file except in compliance with the License. 5 : // You may obtain a copy of the License at 6 : // 7 : // http://www.apache.org/licenses/LICENSE-2.0 8 : // 9 : // Unless required by applicable law or agreed to in writing, software 10 : // distributed under the License is distributed on an "AS IS" BASIS, 11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 : // See the License for the specific language governing permissions and 13 : // limitations under the License. 14 : package com.google.gerrit.server.audit; 15 : 16 : import com.google.common.collect.ListMultimap; 17 : import com.google.gerrit.server.AuditEvent; 18 : import com.google.gerrit.server.CurrentUser; 19 : 20 : public class HttpAuditEvent extends AuditEvent { 21 : public final String httpMethod; 22 : public final int httpStatus; 23 : public final Object input; 24 : 25 : /** 26 : * Creates a new audit event with results 27 : * 28 : * @param sessionId session id the event belongs to 29 : * @param who principal that has generated the event 30 : * @param what object of the event 31 : * @param when time-stamp of when the event started 32 : * @param params parameters of the event 33 : * @param httpMethod HTTP method 34 : * @param input input 35 : * @param status HTTP status 36 : * @param result result of the event 37 : */ 38 : public HttpAuditEvent( 39 : String sessionId, 40 : CurrentUser who, 41 : String what, 42 : long when, 43 : ListMultimap<String, ?> params, 44 : String httpMethod, 45 : Object input, 46 : int status, 47 : Object result) { 48 36 : super(sessionId, who, what, when, params, result); 49 36 : this.httpMethod = httpMethod; 50 36 : this.input = input; 51 36 : this.httpStatus = status; 52 36 : } 53 : }