001/* 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 */ 006package org.fcrepo.kernel.api.observer; 007 008import org.fcrepo.kernel.api.identifiers.FedoraId; 009 010import java.net.URI; 011import java.time.Instant; 012import java.util.Set; 013 014/** 015 * A very simple abstraction to support downstream event-related machinery. 016 * 017 * @author ajs6f 018 * @author acoburn 019 * @since Feb 19, 2013 020 */ 021public interface Event { 022 023 /** 024 * @return the FedoraId of the resource associated with this event. 025 */ 026 FedoraId getFedoraId(); 027 028 /** 029 * @return the event types associated with this event. 030 */ 031 Set<EventType> getTypes(); 032 033 /** 034 * @return the RDF Types of the resource associated with this event. 035 **/ 036 Set<String> getResourceTypes(); 037 038 /** 039 * @return the path to the {@link org.fcrepo.kernel.api.models.FedoraResource} 040 */ 041 String getPath(); 042 043 /** 044 * @return the user ID associated with this event. 045 */ 046 String getUserID(); 047 048 /** 049 * Get the user URI associated with this event. 050 * @return user URI 051 */ 052 URI getUserURI(); 053 054 /** 055 * @return The user-agent associated to the request 056 */ 057 String getUserAgent(); 058 059 /** 060 * @return the date of this event. 061 */ 062 Instant getDate(); 063 064 /** 065 * Get the event ID. 066 * @return Event identifier to use for building event URIs (e.g., in an external triplestore). 067 **/ 068 String getEventID(); 069 070 /** 071 * @return The originating request's baseUrl 072 */ 073 String getBaseUrl(); 074 075}