Project

General

Profile

« Previous | Next » 

Revision 7815

refactor IndexEventLog a bit to simplify type/action information. prep for serializing IndexEvent objects to Metacat. https://projects.ecoinformatics.org/ecoinfo/issues/5944

View differences:

IndexEvent.java
23 23

  
24 24
import java.util.Date;
25 25

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

  
28 29

  
......
33 34
 */
34 35
public class IndexEvent {
35 36
    
36
    public static final int SUCCESSINSERT = 0;
37
    public static final int FAILUREINSERT = 6;
38
    public static final int SUCCESSDELETE = 12;
39
    public static final int FAILUREDELETE = 18;
40
    public static final int STARTTIMEDINDEX = 24;
41
    public static final int FINISHTIMEDINDEX = 30;
42
    private int type = -1;
37
    private Event action = null;
43 38
    private Date date = null;
44
    private Identifier pid = null;
39
    private Identifier identifier = null;
45 40
    private String description = null;
46 41
    
47
    
48
  
49

  
50 42
    /**
51
     * Get the type of the event.
52
     * @return the type of the event
43
     * Get the action of the event.
44
     * @return the action of the event
53 45
     */
54
    public int getType() {
55
        return this.type;
46
    public Event getAction() {
47
        return this.action;
56 48
    }
57 49
    
58 50
    /**
59
     * Set the type of the event
60
     * @param type
51
     * Set the action of the event
52
     * @param action
61 53
     */
62
    public void setType(int type) {
63
        this.type = type;
54
    public void setAction(Event action) {
55
        this.action = action;
64 56
    }
65 57
    
66 58
    /**
......
83 75
     * Get the identifier of the data object involving the event
84 76
     * @return
85 77
     */
86
    public Identifier getPid() {
87
        return pid;
78
    public Identifier getIdentifier() {
79
        return identifier;
88 80
    }
89 81
    
90 82
    /**
91 83
     * Set the identifier of the data object involving the event.
92 84
     * @param pid
93 85
     */
94
    public void setPid(Identifier pid) {
95
        this.pid = pid;
86
    public void setIdentifier(Identifier pid) {
87
        this.identifier = pid;
96 88
    }
97 89
    
98 90
    /**

Also available in: Unified diff