001/* 002 * (C) Copyright 2020 Nuxeo (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * bdelbosc 018 */ 019package org.nuxeo.ecm.platform.audit.stream; 020 021import org.apache.avro.reflect.Nullable; 022 023/** 024 * The audit domain event. 025 * 026 * @since 11.4 027 */ 028public class AuditDomainEvent { 029 030 public AuditDomainEvent() { 031 // Required 032 } 033 034 public String source; 035 036 public String name; 037 038 @Nullable 039 public String category; 040 041 // unix timestamp in UTC 042 @Nullable 043 public long date; 044 045 // Documents 046 @Nullable 047 public String docRepository; 048 049 @Nullable 050 public String docId; 051 052 @Nullable 053 public String docLifeCycle; 054 055 @Nullable 056 public String docPath; 057 058 @Nullable 059 public String docType; 060 061 // others 062 @Nullable 063 public String principalName; 064 065 @Nullable 066 public String comment; 067 068 @Nullable 069 public String extendedInfoAsJson; 070 071 @Override 072 public String toString() { 073 return "AuditDomainEvent{" + // 074 "source='" + source + '\'' + // 075 ", name='" + name + '\'' + // 076 ", category='" + category + '\'' + // 077 ", date=" + date + // 078 ", docRepository='" + docRepository + '\'' + // 079 ", docId='" + docId + '\'' + // 080 ", docLifeCycle='" + docLifeCycle + '\'' + // 081 ", docPath='" + docPath + '\'' + // 082 ", docType='" + docType + '\'' + // 083 ", principalName='" + principalName + '\'' + // 084 ", comment='" + comment + '\'' + // 085 ", extendedInfoAsJson='" + extendedInfoAsJson + '\'' + // 086 '}'; 087 } 088}