From b9a6ae1246c02031deb7f5e0d016f242e7d99452 Mon Sep 17 00:00:00 2001 From: Dominic Lunanuova Date: Wed, 7 Feb 2018 22:10:00 +0000 Subject: Refactor to use org.onap local packages This is stage 1 of refactoring to use org.onap instead of org.openecomp in java packages and class names. Leaving the update from openecomp portalsdk to onap epsdk for a future exercise since I'm trying to get a standalone GUI working (i.e. non-portal). Issue-ID: DMAAP-159 Change-Id: I6a9368c66fa3603b1d9984f600802326ff2f0592 Signed-off-by: Dominic Lunanuova --- .../dmaapbc/dbcapp/service/DmaapAccessService.java | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 dcae_dmaapbc_webapp/dbca-common/src/main/java/org/onap/dcae/dmaapbc/dbcapp/service/DmaapAccessService.java (limited to 'dcae_dmaapbc_webapp/dbca-common/src/main/java/org/onap/dcae/dmaapbc/dbcapp/service/DmaapAccessService.java') diff --git a/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/onap/dcae/dmaapbc/dbcapp/service/DmaapAccessService.java b/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/onap/dcae/dmaapbc/dbcapp/service/DmaapAccessService.java new file mode 100644 index 0000000..38124a2 --- /dev/null +++ b/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/onap/dcae/dmaapbc/dbcapp/service/DmaapAccessService.java @@ -0,0 +1,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 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); + +} -- cgit 1.2.3-korg