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