Skip to content

Package: DeviceCreator

DeviceCreator

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 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.service.device.registry;
14:
15: import org.eclipse.kapua.model.KapuaUpdatableEntityCreator;
16: import org.eclipse.kapua.model.id.KapuaId;
17: import org.eclipse.kapua.model.id.KapuaIdAdapter;
18: import org.eclipse.kapua.service.authorization.group.Group;
19: import org.eclipse.kapua.service.device.registry.connection.DeviceConnection;
20: import org.eclipse.kapua.service.device.registry.event.DeviceEvent;
21:
22: import javax.xml.bind.annotation.XmlAccessType;
23: import javax.xml.bind.annotation.XmlAccessorType;
24: import javax.xml.bind.annotation.XmlElement;
25: import javax.xml.bind.annotation.XmlRootElement;
26: import javax.xml.bind.annotation.XmlType;
27: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
28: import java.util.List;
29:
30: /**
31: * {@link DeviceCreator} encapsulates all the information needed to create a new {@link Device} in the system.<br>
32: * The data provided will be used to seed the new {@link Device} and its related information.<br>
33: * The fields of the {@link DeviceCreator} presents the attributes that are searchable for a given device.<br>
34: * The DeviceCreator Properties field can be used to provide additional properties associated to the Device;
35: * those properties will not be searchable through Device queries.<br>
36: * The clientId field of the Device is used to store the MAC address of the primary network interface of the device.
37: *
38: * @since 1.0.0
39: */
40: @XmlRootElement(name = "deviceCreator")
41: @XmlAccessorType(XmlAccessType.PROPERTY)
42: @XmlType(propOrder = {
43: "groupId",
44: "clientId",
45: "status",
46: "connectionId",
47: "lastEventId",
48: "displayName",
49: "serialNumber",
50: "modelId",
51: "modelName",
52: "imei",
53: "imsi",
54: "iccid",
55: "biosVersion",
56: "firmwareVersion",
57: "osVersion",
58: "jvmVersion",
59: "osgiFrameworkVersion",
60: "applicationFrameworkVersion",
61: "connectionInterface",
62: "connectionIp",
63: "applicationIdentifiers",
64: "acceptEncoding",
65: "customAttribute1",
66: "customAttribute2",
67: "customAttribute3",
68: "customAttribute4",
69: "customAttribute5",
70: "extendedProperties"
71: }, factoryClass = DeviceXmlRegistry.class, factoryMethod = "newDeviceCreator")
72: public interface DeviceCreator extends KapuaUpdatableEntityCreator<Device> {
73:
74: /**
75: * Gets the {@link Group#getId()}.
76: *
77: * @return The {@link Group#getId()}.
78: * @since 1.0.0
79: */
80: @XmlElement(name = "groupId")
81: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
82: KapuaId getGroupId();
83:
84: /**
85: * Sets the {@link Group#getId()}.
86: *
87: * @param groupId The {@link Group#getId()}.
88: * @since 1.0.0
89: */
90: void setGroupId(KapuaId groupId);
91:
92: /**
93: * Gets the client identifier.
94: *
95: * @return The client identifier.
96: * @since 1.0.0
97: */
98: @XmlElement(name = "clientId")
99: String getClientId();
100:
101: /**
102: * Sets the client identifier.
103: *
104: * @param clientId The client identifier.
105: * @since 1.0.0
106: */
107: void setClientId(String clientId);
108:
109: /**
110: * Gets the {@link DeviceConnection#getId()}.
111: *
112: * @return The {@link DeviceConnection#getId()}.
113: * @since 1.0.0
114: */
115: @XmlElement(name = "connectionId")
116: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
117: KapuaId getConnectionId();
118:
119: /**
120: * Sets the {@link DeviceConnection#getId()}.
121: *
122: * @param connectionId The {@link DeviceConnection#getId()}.
123: * @since 1.0.0
124: */
125: void setConnectionId(KapuaId connectionId);
126:
127: /**
128: * Gets the {@link DeviceStatus}.
129: *
130: * @return The {@link DeviceStatus}.
131: * @since 1.0.0
132: */
133: @XmlElement(name = "status")
134: DeviceStatus getStatus();
135:
136: /**
137: * Sets the {@link DeviceStatus}.
138: *
139: * @param status The {@link DeviceStatus}.
140: * @since 1.0.0
141: */
142: void setStatus(DeviceStatus status);
143:
144: /**
145: * Gets the display name.
146: *
147: * @return The display name.
148: * @since 1.0.0
149: */
150: @XmlElement(name = "displayName")
151: String getDisplayName();
152:
153: /**
154: * Sets the display name.
155: *
156: * @param diplayName The display name.
157: * @since 1.0.0
158: */
159: void setDisplayName(String diplayName);
160:
161: /**
162: * Gets the last {@link DeviceEvent#getId()}.
163: *
164: * @return The last {@link DeviceEvent#getId()}.
165: * @since 1.0.0
166: */
167: @XmlElement(name = "lastEventId")
168: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
169: KapuaId getLastEventId();
170:
171: /**
172: * Sets the last {@link DeviceEvent#getId()}.
173: *
174: * @param lastEventId The last {@link DeviceEvent#getId()}.
175: * @since 1.0.0
176: */
177: void setLastEventId(KapuaId lastEventId);
178:
179: /**
180: * Gets the serial number.
181: *
182: * @return The serial number.
183: * @since 1.0.0
184: */
185: @XmlElement(name = "serialNumber")
186: String getSerialNumber();
187:
188: /**
189: * Sets the serial number.
190: *
191: * @param serialNumber The serial number.
192: * @since 1.0.0
193: */
194: void setSerialNumber(String serialNumber);
195:
196: /**
197: * Gets the model identifier.
198: *
199: * @return The model identifier.
200: * @since 1.0.0
201: */
202: @XmlElement(name = "modelId")
203: String getModelId();
204:
205: /**
206: * Sets the model identifier.
207: *
208: * @param modelId The model identifier.
209: * @since 1.0.0
210: */
211: void setModelId(String modelId);
212:
213: /**
214: * Gets the model name.
215: *
216: * @return The model name.
217: * @since 1.0.0
218: */
219: @XmlElement(name = "modelName")
220: String getModelName();
221:
222: /**
223: * Sets the model name.
224: *
225: * @param modelName The model name.
226: * @since 1.0.0
227: */
228: void setModelName(String modelName);
229:
230: /**
231: * Gets the modem imei.
232: *
233: * @return The modem imei.
234: * @since 1.0.0
235: */
236: @XmlElement(name = "imei")
237: String getImei();
238:
239: /**
240: * Sets the modem imei.
241: *
242: * @param imei The modem imei.
243: * @since 1.0.0
244: */
245: void setImei(String imei);
246:
247: /**
248: * Gets the modem imsi.
249: *
250: * @return The modem imsi.
251: * @since 1.0.0
252: */
253: @XmlElement(name = "imsi")
254: String getImsi();
255:
256: /**
257: * Sets the modem imsi.
258: *
259: * @param imsi The modem imsi.
260: * @since 1.0.0
261: */
262: void setImsi(String imsi);
263:
264: /**
265: * Gets the modem iccid.
266: *
267: * @return The modem iccid.
268: * @since 1.0.0
269: */
270: @XmlElement(name = "iccid")
271: String getIccid();
272:
273: /**
274: * Sets the modem iccid.
275: *
276: * @param iccid The modem iccid.
277: * @since 1.0.0
278: */
279: void setIccid(String iccid);
280:
281: /**
282: * Gets the bios version.
283: *
284: * @return The bios version.
285: * @since 1.0.0
286: */
287: @XmlElement(name = "biosVersion")
288: String getBiosVersion();
289:
290: /**
291: * Sets the bios version.
292: *
293: * @param biosVersion The bios version.
294: * @since 1.0.0
295: */
296: void setBiosVersion(String biosVersion);
297:
298: /**
299: * Gets the firmware version.
300: *
301: * @return The firmware version.
302: * @since 1.0.0
303: */
304: @XmlElement(name = "firmwareVersion")
305: String getFirmwareVersion();
306:
307: /**
308: * Sets the firmware version.
309: *
310: * @param firmwareVersion The firmware version.
311: * @since 1.0.0
312: */
313: void setFirmwareVersion(String firmwareVersion);
314:
315: /**
316: * Gets the OS version.
317: *
318: * @return The OS version.
319: * @since 1.0.0
320: */
321: @XmlElement(name = "osVersion")
322: String getOsVersion();
323:
324: /**
325: * Sets the OS version.
326: *
327: * @param osVersion The OS version.
328: * @since 1.0.0
329: */
330: void setOsVersion(String osVersion);
331:
332: /**
333: * Gets the JVM version.
334: *
335: * @return The JVM version.
336: * @since 1.0.0
337: */
338: @XmlElement(name = "jvmVersion")
339: String getJvmVersion();
340:
341: /**
342: * Sets the JVM version.
343: *
344: * @param jvmVersion The JVM version.
345: * @since 1.0.0
346: */
347: void setJvmVersion(String jvmVersion);
348:
349: /**
350: * Gets the OSGi framework version.
351: *
352: * @return The OSGi framework version.
353: * @since 1.0.0
354: */
355: @XmlElement(name = "osgiFrameworkVersion")
356: String getOsgiFrameworkVersion();
357:
358: /**
359: * Sets the OSGi framework version.
360: *
361: * @param osgiFrameworkVersion The OSGi framework version.
362: * @since 1.0.0
363: */
364: void setOsgiFrameworkVersion(String osgiFrameworkVersion);
365:
366: /**
367: * Gets the application framework version.
368: *
369: * @return The application framework version.
370: * @since 1.0.0
371: */
372: @XmlElement(name = "applicationFrameworkVersion")
373: String getApplicationFrameworkVersion();
374:
375: /**
376: * Sets the application framework version.
377: *
378: * @param appFrameworkVersion The application framework version.
379: * @since 1.0.0
380: */
381: void setApplicationFrameworkVersion(String appFrameworkVersion);
382:
383: /**
384: * Gets the device network interfaces name.
385: *
386: * @return The device network interfaces name.
387: * @since 1.0.0
388: */
389: @XmlElement(name = "connectionInterface")
390: String getConnectionInterface();
391:
392: /**
393: * Sets the device network interfaces name.
394: *
395: * @param connectionInterface The device network interfaces name.
396: * @since 1.0.0
397: */
398: void setConnectionInterface(String connectionInterface);
399:
400: /**
401: * Gets the device network interfaces IP.
402: *
403: * @return The device network interfaces IP.
404: * @since 1.0.0
405: */
406: @XmlElement(name = "connectionIp")
407: String getConnectionIp();
408:
409: /**
410: * Sets the device network interfaces IP.
411: *
412: * @param connectionIp The device network interfaces IP.
413: * @since 1.0.0
414: */
415: void setConnectionIp(String connectionIp);
416:
417: /**
418: * Gets the application identifiers supported.
419: *
420: * @return The application identifiers supported.
421: * @since 1.0.0
422: */
423: @XmlElement(name = "applicationIdentifiers")
424: String getApplicationIdentifiers();
425:
426: /**
427: * Sets the application identifiers supported.
428: *
429: * @param applicationIdentifiers The application identifiers supported.
430: * @since 1.0.0
431: */
432: void setApplicationIdentifiers(String applicationIdentifiers);
433:
434: /**
435: * Gets the accept encodings.
436: *
437: * @return The accept encodings.
438: * @since 1.0.0
439: */
440: @XmlElement(name = "acceptEncoding")
441: String getAcceptEncoding();
442:
443: /**
444: * Sets the accept encodings.
445: *
446: * @param acceptEncoding The accept encodings.
447: * @since 1.0.0
448: */
449: void setAcceptEncoding(String acceptEncoding);
450:
451: /**
452: * Gets the custom attribute 1.
453: *
454: * @return The custom attribute 1.
455: * @since 1.0.0
456: */
457: @XmlElement(name = "customAttribute1")
458: String getCustomAttribute1();
459:
460: /**
461: * Sets the custom attribute 1.
462: *
463: * @param customAttribute1 The custom attribute 1.
464: * @since 1.0.0
465: */
466: void setCustomAttribute1(String customAttribute1);
467:
468: /**
469: * Gets the custom attribute 2.
470: *
471: * @return The custom attribute 2.
472: * @since 1.0.0
473: */
474: @XmlElement(name = "customAttribute2")
475: String getCustomAttribute2();
476:
477: /**
478: * Sets the custom attribute 2.
479: *
480: * @param customAttribute2 The custom attribute 2.
481: * @since 1.0.0
482: */
483: void setCustomAttribute2(String customAttribute2);
484:
485: /**
486: * Gets the custom attribute 3.
487: *
488: * @return The custom attribute 3.
489: * @since 1.0.0
490: */
491: @XmlElement(name = "customAttribute3")
492: String getCustomAttribute3();
493:
494: /**
495: * Sets the custom attribute 3.
496: *
497: * @param customAttribute3 The custom attribute 3.
498: * @since 1.0.0
499: */
500: void setCustomAttribute3(String customAttribute3);
501:
502: /**
503: * Gets the custom attribute 4.
504: *
505: * @return The custom attribute 4.
506: * @since 1.0.0
507: */
508: @XmlElement(name = "customAttribute4")
509: String getCustomAttribute4();
510:
511: /**
512: * Sets the custom attribute 4.
513: *
514: * @param customAttribute4 The custom attribute 4.
515: * @since 1.0.0
516: */
517: void setCustomAttribute4(String customAttribute4);
518:
519: /**
520: * Gets the custom attribute 5.
521: *
522: * @return The custom attribute 5.
523: * @since 1.0.0
524: */
525: @XmlElement(name = "customAttribute5")
526: String getCustomAttribute5();
527:
528: /**
529: * Sets the custom attribute 5.
530: *
531: * @param customAttribute5 The custom attribute 5.
532: * @since 1.0.0
533: */
534: void setCustomAttribute5(String customAttribute5);
535:
536: /**
537: * Gets the {@link DeviceExtendedProperty} {@link List}.
538: *
539: * @return The {@link DeviceExtendedProperty} {@link List}.
540: * @since 1.5.0
541: */
542: @XmlElement(name = "extendedProperties")
543: List<DeviceExtendedProperty> getExtendedProperties();
544:
545: /**
546: * Add a {@link DeviceExtendedProperty} to the {@link List}.
547: *
548: * @param extendedProperty The {@link DeviceExtendedProperty} to add.
549: * @since 1.5.0
550: */
551: void addExtendedProperty(DeviceExtendedProperty extendedProperty);
552:
553: /**
554: * Sets the {@link DeviceExtendedProperty} {@link List}.
555: *
556: * @param extendedProperties The {@link DeviceExtendedProperty} {@link List}.
557: * @since 1.5.0
558: */
559: void setExtendedProperties(List<DeviceExtendedProperty> extendedProperties);
560: }