[PORTAL-7] Rebase
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / service / BasicAuthAccountService.java
1 package org.openecomp.portalapp.portal.service;
2
3 import java.util.List;
4
5 import org.openecomp.portalapp.portal.domain.BasicAuthCredentials;
6 import org.openecomp.portalapp.portal.domain.EPEndpoint;
7
8 public interface BasicAuthAccountService {
9         
10         /**
11          * Saves Basic Authentication account for external systems 
12          * @param BasicAuthCredentials
13          * @return Id of the newly created account
14          */
15         Long saveBasicAuthAccount(BasicAuthCredentials newCredential) throws Exception;
16         
17         /**
18          * Saves Endpoint associated with a Basic Auth account 
19          * @param EPEndpoint
20          * @return Id of the newly created endpoint
21          */
22         Long saveEndpoints(EPEndpoint endpoint) throws Exception;
23         
24         /**
25          * Saves Endpoint associated with a Basic Auth account 
26          * @param accountId, endpointId
27          */
28         void saveEndpointAccount(Long accountId, Long endpointId) throws Exception;
29         
30         /**
31          * Returns list of all  BasicAuthCredentials in the sytem
32          * @return List<BasicAuthCredentials>
33          */
34         List<BasicAuthCredentials> getAccountData() throws Exception;
35         
36         /**
37          * Deletes BasicAuthenticationAccount
38          * @param accountId
39          */
40         void deleteEndpointAccout(Long accountId) throws Exception;
41         
42         /**
43          * Updates BasicAuthenticationAccount
44          * @param accountId, BasicAuthCredentials
45          */
46         void updateBasicAuthAccount(Long accountId, BasicAuthCredentials newCredential) throws Exception;
47 }