001/* 002 * Licensed to DuraSpace under one or more contributor license agreements. 003 * See the NOTICE file distributed with this work for additional information 004 * regarding copyright ownership. 005 * 006 * DuraSpace licenses this file to you under the Apache License, 007 * Version 2.0 (the "License"); you may not use this file except in 008 * compliance with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.fcrepo.kernel.api.observer; 019 020import java.time.Instant; 021import java.util.Map; 022import java.util.Set; 023 024/** 025 * A very simple abstraction to support downstream event-related machinery. 026 * 027 * @author ajs6f 028 * @author acoburn 029 * @since Feb 19, 2013 030 */ 031public interface FedoraEvent { 032 033 /** 034 * @return the event types associated with this event. 035 */ 036 Set<EventType> getTypes(); 037 038 /** 039 * @return the RDF Types of the resource associated with this event. 040 **/ 041 Set<String> getResourceTypes(); 042 043 /** 044 * @return the path to the {@link org.fcrepo.kernel.api.models.FedoraResource} 045 */ 046 String getPath(); 047 048 /** 049 * @return the user ID associated with this event. 050 */ 051 String getUserID(); 052 053 /** 054 * @return the date of this event. 055 */ 056 Instant getDate(); 057 058 /** 059 * Get the event ID. 060 * @return Event identifier to use for building event URIs (e.g., in an external triplestore). 061 **/ 062 String getEventID(); 063 064 /** 065 * Get auxiliary information about the event 066 * @return Event information as a Map 067 */ 068 Map<String, String> getInfo(); 069}