001/* 002 * (C) Copyright 2006-2011 Nuxeo SA (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 * Nuxeo - initial API and implementation 018 * 019 * $Id: CoreEvent.java 30799 2008-03-01 12:36:18Z bstefanescu $ 020 */ 021 022package org.nuxeo.ecm.core.api.event; 023 024import java.security.Principal; 025import java.util.Date; 026import java.util.Map; 027 028/** 029 * Nuxeo core event. 030 * 031 * @author <a href="mailto:ja@nuxeo.com">Julien Anguenot</a> 032 * @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a> 033 */ 034public interface CoreEvent { 035 036 /** 037 * Returns the date when the event occurred. 038 * 039 * @return a java date object 040 */ 041 Date getDate(); 042 043 /** 044 * Returns the event identifier. 045 * 046 * @return the event identifier 047 */ 048 String getEventId(); 049 050 /** 051 * Returns the information attached to the event. 052 * 053 * @return a map holding the event information 054 */ 055 Map<String, ?> getInfo(); 056 057 /** 058 * Returns the source object that originated the event. 059 * 060 * @return the object that originated the event 061 */ 062 Object getSource(); 063 064 /** 065 * Returns the principal responsible for this event. 066 * 067 * @return the principal responsible for this event. 068 */ 069 Principal getPrincipal(); 070 071 /** 072 * Returns the event category. 073 * 074 * @return the event category 075 */ 076 String getCategory(); 077 078 /** 079 * Returns the associated event comment. 080 * 081 * @return the associated event comment 082 */ 083 String getComment(); 084 085}