Skip to content

Package: EventStoreRecord

EventStoreRecord

nameinstructionbranchcomplexitylinemethod
getType()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2017, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.commons.service.event.store.api;
14:
15: import java.util.Date;
16:
17: import javax.xml.bind.annotation.XmlAccessType;
18: import javax.xml.bind.annotation.XmlAccessorType;
19: import javax.xml.bind.annotation.XmlElement;
20: import javax.xml.bind.annotation.XmlRootElement;
21: import javax.xml.bind.annotation.XmlType;
22: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
23:
24: import org.eclipse.kapua.commons.service.event.store.api.EventStoreXmlRegistry;
25: import org.eclipse.kapua.event.ServiceEvent.EventStatus;
26: import org.eclipse.kapua.model.KapuaUpdatableEntity;
27: import org.eclipse.kapua.model.id.KapuaId;
28: import org.eclipse.kapua.model.id.KapuaIdAdapter;
29: import org.eclipse.kapua.model.xml.DateXmlAdapter;
30:
31: @XmlRootElement(name = "eventStoreRecord")
32: @XmlAccessorType(XmlAccessType.PROPERTY)
33: @XmlType(propOrder = { "contextId",
34: "timestamp",
35: "userId",
36: "service",
37: "entityType",
38: "scopeId",
39: "entityId",
40: "operation",
41: "inputs",
42: "outputs",
43: "status",
44: "note",
45: }, //
46: factoryClass = EventStoreXmlRegistry.class, //
47: factoryMethod = "newEventStoreRecord")
48: public interface EventStoreRecord extends KapuaUpdatableEntity {
49:
50: public static final String TYPE = "eventStoreRecord";
51:
52: public default String getType() {
53: return TYPE;
54: }
55:
56: @XmlElement(name = "contextId")
57: public String getContextId();
58:
59: public void setContextId(String contextId);
60:
61: @XmlElement(name = "timestamp")
62: @XmlJavaTypeAdapter(DateXmlAdapter.class)
63: public Date getTimestamp();
64:
65: public void setTimestamp(Date timestamp);
66:
67: @XmlElement(name = "userId")
68: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
69: public KapuaId getUserId();
70:
71: public void setUserId(KapuaId userId);
72:
73: @XmlElement(name = "service")
74: public String getService();
75:
76: public void setService(String service);
77:
78: @XmlElement(name = "entityType")
79: public String getEntityType();
80:
81: public void setEntityType(String entityType);
82:
83: @XmlElement(name = "scopeId")
84: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
85: public KapuaId getScopeId();
86:
87: public void setScopeId(KapuaId scopeId);
88:
89: @XmlElement(name = "entityId")
90: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
91: public KapuaId getEntityId();
92:
93: public void setEntityId(KapuaId entityId);
94:
95: @XmlElement(name = "operation")
96: public String getOperation();
97:
98: public void setOperation(String operation);
99:
100: @XmlElement(name = "inputs")
101: public String getInputs();
102:
103: public void setInputs(String inputs);
104:
105: @XmlElement(name = "outputs")
106: public String getOutputs();
107:
108: public void setOutputs(String outputs);
109:
110: @XmlElement(name = "status")
111: public EventStatus getStatus();
112:
113: public void setStatus(EventStatus status);
114:
115: @XmlElement(name = "note")
116: public String getNote();
117:
118: public void setNote(String note);
119:
120: }