aboutsummaryrefslogtreecommitdiffstats
path: root/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/onap/dcae/dmaapbc/dbcapp/service/DmaapAccessService.java
blob: 38124a2449262542ca0df003c49f1a5ed9acde78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package org.onap.dcae.dmaapbc.dbcapp.service;

import java.util.List;

import org.onap.dcae.dmaapbc.dbcapp.domain.DmaapAccess;
import org.onap.dcae.dmaapbc.dbcapp.domain.ManifestTransportModel;

/**
 * Defines methods to manipulate the database table with DmaapAccess domain
 * objects. No method throws a checked exception, in keeping with the Spring
 * philosophy of throwing unchecked exceptions.
 */
public interface DmaapAccessService {

	/**
	 * Gets build information.
	 * 
	 * @return List of key-value pairs; implementations may return null.
	 */
	ManifestTransportModel getManifest();

	/**
	 * Gets the number of Dmaap Access entries.
	 * 
	 * @return Number of rows in the table.
	 */
	int getDmaapAccessCount();

	/**
	 * Gets all DMaaP access rows in the table for the specified user.
	 * 
	 * @param userId
	 *            Login ID of the user
	 * @return List of DMaaP instance objects, which may be empty.
	 */
	List<DmaapAccess> getDmaapAccessList(String userId);

	/**
	 * Gets the DMaaP access object with the specified row ID.
	 * 
	 * @param dmaapId
	 *            Access profile ID
	 * @return DMaap instance; null if none exists.
	 */
	DmaapAccess getDmaapAccess(Long dmaapId);

	/**
	 * Creates a new managed object (a new row in the table).
	 * 
	 * @param dmaap
	 *            DMaaP instance to create.
	 */
	void saveDmaapAccess(DmaapAccess dmaap);

	/**
	 * Deletes the DMaaP access row with the specified ID.
	 * 
	 * @param dmaapId
	 *            Access profile ID
	 */
	void deleteDmaapAccess(Long dmaapId);

}