b3e469d128bd26cf0f7e550caa10e87318ea8286
[platform/core/security/suspicious-activity-monitor.git] / server / src / main / java / com / samsung / samserver / service / DeviceService.java
1 /*
2  * In Samsung Ukraine R&D Center (SRK under a contract between)
3  * LLC "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
4  * Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved.
5  */
6 package com.samsung.samserver.service;
7
8 import com.samsung.samserver.domain.Device;
9 import java.util.List;
10 import java.util.Optional;
11
12 /**
13  * Service Interface for managing Device.
14  */
15 public interface DeviceService {
16
17     /**
18      * Save a device.
19      *
20      * @param device the entity to save
21      * @return the persisted entity
22      */
23     Device save(Device device);
24
25     /**
26      * Get all the devices.
27      *
28      * @return the list of entities
29      */
30     List<Device> findAll();
31
32     /**
33      * Get the "id" device.
34      *
35      * @param id the id of the entity
36      * @return the entity
37      */
38     Device findOne(Long id);
39
40     /**
41      * Delete the "id" device.
42      *
43      * @param id the id of the entity
44      */
45     void delete(Long id);
46
47     /**
48      * Get the "duid" device.
49      *
50      * @param duid the duid of the entity
51      * @return the entity
52      */
53     Optional<Device> findOne(String duid);
54
55     /**
56      * Get the device uid.
57      *
58      * @param dtypename device type name
59      * @param model device model
60      * @param sn device serial number
61      * @return the String
62      */
63     String getDeviceUID(String dtypename, String model, String sn);
64
65 }