[PORTAL-7] Rebase
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / service / EPLoginService.java
1 /*-\r
2  * ================================================================================\r
3  * ECOMP Portal\r
4  * ================================================================================\r
5  * Copyright (C) 2017 AT&T Intellectual Property\r
6  * ================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  * \r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * \r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ================================================================================\r
19  */\r
20 package org.openecomp.portalapp.portal.service;\r
21 \r
22 import java.util.HashMap;\r
23 \r
24 import org.openecomp.portalapp.command.EPLoginBean;\r
25 import org.openecomp.portalapp.portal.domain.EPUser;\r
26 \r
27 public interface EPLoginService {\r
28 \r
29         /**\r
30          * Calls {@link #findUser(EPLoginBean, String, HashMap, boolean)} with the\r
31          * last parameter set to true.\r
32          * \r
33          * @param bean\r
34          * @param menuPropertiesFilename\r
35          * @param additionalParams\r
36          * @return EPUser object; null on error or if no match.\r
37          * @throws Exception\r
38          */\r
39         @SuppressWarnings("rawtypes")\r
40         EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams) throws Exception;\r
41 \r
42         /**\r
43          * Searches the fn_user table for a row that matches information in the\r
44          * bean. Uses the bean's Organization User ID property if present; if not, uses the bean's\r
45          * LoginId property and (optionally, depending on matchPassword parameter)\r
46          * loginPwd property.\r
47          * \r
48          * @param bean\r
49          *            EPLoginBean\r
50          * @param menuPropertiesFileName\r
51          *            Always ignored\r
52          * @param additionalParams\r
53          *            Used by DataAccessService when updating a matched user object\r
54          * @param matchPassword\r
55          *            If true, the search must match the password\r
56          * @return EPUser object; null on error or if no match.\r
57          */\r
58         @SuppressWarnings("rawtypes")\r
59         EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams,\r
60                         boolean matchPassword) throws Exception;\r
61 \r
62         /**\r
63          * Searches the fn_user table for a row with a value in column login_id that\r
64          * matches the specified value.\r
65          * \r
66          * @param loginId\r
67          * @return EPUser object; null on error or if no match.\r
68          */\r
69         public EPUser findUserWithoutPwd(String loginId);\r
70 }\r