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.net.URI;
021import java.time.Instant;
022import java.util.Map;
023import java.util.Set;
024
025/**
026 * A very simple abstraction to support downstream event-related machinery.
027 *
028 * @author ajs6f
029 * @author acoburn
030 * @since Feb 19, 2013
031 */
032public interface FedoraEvent {
033
034    /**
035     * @return the event types associated with this event.
036     */
037    Set<EventType> getTypes();
038
039    /**
040     * @return the RDF Types of the resource associated with this event.
041    **/
042    Set<String> getResourceTypes();
043
044    /**
045     * @return the path to the {@link org.fcrepo.kernel.api.models.FedoraResource}
046     */
047    String getPath();
048
049    /**
050     * @return the user ID associated with this event.
051     */
052    String getUserID();
053
054    /**
055     * @return the date of this event.
056     */
057    Instant getDate();
058
059    /**
060     * Get the event ID.
061     * @return Event identifier to use for building event URIs (e.g., in an external triplestore).
062    **/
063    String getEventID();
064
065    /**
066     * Get auxiliary information about the event
067     * @return Event information as a Map
068     */
069    Map<String, String> getInfo();
070
071    /**
072     * Get the user URI associated with this event.
073     * @return user URI
074     */
075    URI getUserURI();
076}