Project

General

Profile

1
/**
2
 *  '$RCSfile$'
3
 *    Purpose: An interface to store and query the IndexEvent.
4
 *    Copyright: 2013 Regents of the University of California and the
5
 *             National Center for Ecological Analysis and Synthesis
6
 *    Authors: Jing Tao
7
 *
8
 * This program is free software; you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation; either version 2 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21
 */
22
package edu.ucsb.nceas.metacat.index.event;
23

    
24
import java.util.Date;
25
import java.util.List;
26

    
27
import org.dataone.service.types.v1.Identifier;
28

    
29
/**
30
 * An interface to store and query the IndexEvent.
31
 * @author tao
32
 *
33
 */
34
public interface IndexEventLog {
35
    
36
    /**
37
     * Write an IndexEvent into a storage
38
     * @param event
39
     * @throws IndexEventLogException
40
     */
41
    public void write(IndexEvent event) throws IndexEventLogException;
42
    
43
    
44
    /**
45
     * Gets the list of IndexEvent matching the specified set of filters. The filter parameters can be null
46
     * @param type  the type of the event
47
     * @param pid   the identifier of the data object in the event
48
     * @param start the start time of the time range for query
49
     * @param end   the end time of the time range for query
50
     * @return
51
     * @throws IndexEventLogException
52
     */
53
    public List<IndexEvent> getEvents(int type, Identifier pid, boolean archvied, Date start, Date end) throws IndexEventLogException;
54
    
55
}
(2-2/3)