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