4b4342d40cd46dfc88df2b6c1e6a15f6c740fffe
[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          * 
13          * @param newCredential
14          *            BasicAuthCredentials
15          * @return Id of the newly created account
16          * @throws Exception
17          */
18         Long saveBasicAuthAccount(BasicAuthCredentials newCredential) throws Exception;
19
20         /**
21          * Saves Endpoint associated with a Basic Auth account
22          * 
23          * @param endpoint
24          *            EPEndpoint
25          * @return Id of the newly created endpoint
26          * @throws Exception
27          */
28         Long saveEndpoints(EPEndpoint endpoint) throws Exception;
29
30         /**
31          * Saves Endpoint associated with a Basic Auth account
32          * 
33          * @param accountId
34          * @param endpointId
35          * @throws Exception
36          */
37         void saveEndpointAccount(Long accountId, Long endpointId) throws Exception;
38
39         /**
40          * Returns list of all BasicAuthCredentials in the sytem
41          * 
42          * @return List<BasicAuthCredentials>
43          * @throws Exception
44          */
45         List<BasicAuthCredentials> getAccountData() throws Exception;
46
47         /**
48          * Deletes BasicAuthenticationAccount
49          * 
50          * @param accountId
51          * @throws Exception
52          */
53         void deleteEndpointAccout(Long accountId) throws Exception;
54
55         /**
56          * Updates BasicAuthenticationAccount
57          * 
58          * @param accountId
59          * @param newCredential
60          *            BasicAuthCredentials
61          * @throws Exception
62          */
63         void updateBasicAuthAccount(Long accountId, BasicAuthCredentials newCredential) throws Exception;
64 }