001/** 002 * Copyright 2015 DuraSpace, Inc. 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 */ 016package org.fcrepo.kernel.api.observer; 017 018import java.util.Set; 019 020import org.fcrepo.kernel.api.utils.EventType; 021 022/** 023 * A very simple abstraction to support downstream event-related machinery. 024 * 025 * @author ajs6f 026 * @author acoburn 027 * @since Feb 19, 2013 028 */ 029public interface FedoraEvent { 030 031 /** 032 * @return the event types associated with this event. 033 */ 034 Set<EventType> getTypes(); 035 036 /** 037 * @param type the type 038 * @return this object for continued use 039 */ 040 FedoraEvent addType(final EventType type); 041 042 /** 043 * @return the property names associated with this event. 044 **/ 045 Set<String> getProperties(); 046 047 /** 048 * Add a property name to this event 049 * @param property property name 050 * @return this object for continued use 051 **/ 052 FedoraEvent addProperty(final String property); 053 054 /** 055 * @return the path to the {@link org.fcrepo.kernel.api.models.FedoraResource} 056 */ 057 String getPath(); 058 059 /** 060 * @return the user ID associated with this event. 061 */ 062 String getUserID(); 063 064 /** 065 * @return the user data associated with this event. 066 */ 067 String getUserData(); 068 069 /** 070 * @return the date of this event. 071 */ 072 long getDate(); 073 074 /** 075 * Get the event ID. 076 * @return Event identifier to use for building event URIs (e.g., in an external triplestore). 077 **/ 078 String getEventID(); 079}