edu.amherst.acdc.event.Event Maven / Gradle / Ivy
The newest version!
/*
* Copyright Amherst College
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package edu.amherst.acdc.event;
import java.time.Instant;
import java.util.Map;
import java.util.Set;
import org.fcrepo.kernel.api.observer.EventType;
import org.fcrepo.kernel.api.observer.FedoraEvent;
/**
* @author acoburn
*/
public class Event implements FedoraEvent {
private final String id;
private final String path;
private final String userId;
private final Instant date;
private final Set types;
private final Set resourceTypes;
private final Map info;
/**
* Create a new event
* @param id the id
* @param path the path
* @param userId the user id
* @param date the date
* @param types the types
* @param resourceTypes the resource types
* @param info the info
*/
public Event(final String id, final String path, final String userId, final Instant date,
final Set types, final Set resourceTypes, final Map info) {
this.id = id;
this.path = path;
this.userId = userId;
this.date = date;
this.types = types;
this.resourceTypes = resourceTypes;
this.info = info;
}
@Override
public Set getTypes() {
return types;
}
@Override
public Set getResourceTypes() {
return resourceTypes;
}
@Override
public String getPath() {
return path;
}
@Override
public String getUserID() {
return userId;
}
@Override
public Instant getDate() {
return date;
}
@Override
public String getEventID() {
return id;
}
@Override
public Map getInfo() {
return info;
}
}