diff options
Diffstat (limited to 'dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/dcae/dmaapbc/dbcapp/service/DmaapAccessService.java')
-rw-r--r-- | dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/dcae/dmaapbc/dbcapp/service/DmaapAccessService.java | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/dcae/dmaapbc/dbcapp/service/DmaapAccessService.java b/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/dcae/dmaapbc/dbcapp/service/DmaapAccessService.java new file mode 100644 index 0000000..c4d85bf --- /dev/null +++ b/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/dcae/dmaapbc/dbcapp/service/DmaapAccessService.java @@ -0,0 +1,63 @@ +package org.openecomp.dcae.dmaapbc.dbcapp.service; + +import java.util.List; + +import org.openecomp.dcae.dmaapbc.dbcapp.domain.DmaapAccess; +import org.openecomp.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); + +} |