c4d85bf2800ebc2cbad1513c272f4255294a6def
[ui/dmaapbc.git] /
1 package org.openecomp.dcae.dmaapbc.dbcapp.service;
2
3 import java.util.List;
4
5 import org.openecomp.dcae.dmaapbc.dbcapp.domain.DmaapAccess;
6 import org.openecomp.dcae.dmaapbc.dbcapp.domain.ManifestTransportModel;
7
8 /**
9  * Defines methods to manipulate the database table with DmaapAccess domain
10  * objects. No method throws a checked exception, in keeping with the Spring
11  * philosophy of throwing unchecked exceptions.
12  */
13 public interface DmaapAccessService {
14
15         /**
16          * Gets build information.
17          * 
18          * @return List of key-value pairs; implementations may return null.
19          */
20         ManifestTransportModel getManifest();
21
22         /**
23          * Gets the number of Dmaap Access entries.
24          * 
25          * @return Number of rows in the table.
26          */
27         int getDmaapAccessCount();
28
29         /**
30          * Gets all DMaaP access rows in the table for the specified user.
31          * 
32          * @param userId
33          *            Login ID of the user
34          * @return List of DMaaP instance objects, which may be empty.
35          */
36         List<DmaapAccess> getDmaapAccessList(String userId);
37
38         /**
39          * Gets the DMaaP access object with the specified row ID.
40          * 
41          * @param dmaapId
42          *            Access profile ID
43          * @return DMaap instance; null if none exists.
44          */
45         DmaapAccess getDmaapAccess(Long dmaapId);
46
47         /**
48          * Creates a new managed object (a new row in the table).
49          * 
50          * @param dmaap
51          *            DMaaP instance to create.
52          */
53         void saveDmaapAccess(DmaapAccess dmaap);
54
55         /**
56          * Deletes the DMaaP access row with the specified ID.
57          * 
58          * @param dmaapId
59          *            Access profile ID
60          */
61         void deleteDmaapAccess(Long dmaapId);
62
63 }