001/* 002 * Copyright (c) 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * Nuxeo - initial API and implementation 011 * 012 * $Id: CoreEvent.java 30799 2008-03-01 12:36:18Z bstefanescu $ 013 */ 014 015package org.nuxeo.ecm.core.api.event; 016 017import java.security.Principal; 018import java.util.Date; 019import java.util.Map; 020 021/** 022 * Nuxeo core event. 023 * 024 * @author <a href="mailto:ja@nuxeo.com">Julien Anguenot</a> 025 * @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a> 026 */ 027public interface CoreEvent { 028 029 /** 030 * Returns the date when the event occurred. 031 * 032 * @return a java date object 033 */ 034 Date getDate(); 035 036 /** 037 * Returns the event identifier. 038 * 039 * @return the event identifier 040 */ 041 String getEventId(); 042 043 /** 044 * Returns the information attached to the event. 045 * 046 * @return a map holding the event information 047 */ 048 Map<String, ?> getInfo(); 049 050 /** 051 * Returns the source object that originated the event. 052 * 053 * @return the object that originated the event 054 */ 055 Object getSource(); 056 057 /** 058 * Returns the principal responsible for this event. 059 * 060 * @return the principal responsible for this event. 061 */ 062 Principal getPrincipal(); 063 064 /** 065 * Returns the event category. 066 * 067 * @return the event category 068 */ 069 String getCategory(); 070 071 /** 072 * Returns the associated event comment. 073 * 074 * @return the associated event comment 075 */ 076 String getComment(); 077 078}