Revision 39:11d31244edf5
WebContent/WEB-INF/config/ss221_settings/struts-config.xml | ||
---|---|---|
18 | 18 |
type="com.ib.ibss.controller.actions.ss221_settings.IBSSUpassMaintenanceDetailsAction" |
19 | 19 |
validate="false"> |
20 | 20 |
<forward name="success" path=".ibss.upass.maintenance.details" /> |
21 |
<forward name="back" path=".ibss.maintenance.main.page" /> |
|
22 |
<forward name="failure" path=".ibss.maintenance.main.page" /> |
|
21 |
<!-- <forward name="back" path=".ibss.maintenance.main.page" />
|
|
22 |
<forward name="failure" path=".ibss.maintenance.main.page" /> -->
|
|
23 | 23 |
</action> |
24 | 24 |
|
25 | 25 |
<action name="settingsForm" path="/ss221/upassMaintenanceEdit" scope="session" |
WebContent/jsp/ss221_settings/ibssUpassMaintenanceConfirm.jsp | ||
---|---|---|
10 | 10 |
<bean:define id="upassSettingsView" name="settingsForm" property="upassSettingsView" /> |
11 | 11 |
|
12 | 12 |
<h3 class="title"><strong> |
13 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 0}">System</c:if> |
|
14 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 1}">Admin</c:if> |
|
15 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 2}">RIB</c:if> |
|
16 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 3}">BIB</c:if> |
|
13 |
Admin |
|
17 | 14 |
<c:out value="${sessionScope.displayDesc}"/> |
18 | 15 |
</strong></h3> |
19 | 16 |
<table id="errorTable"> |
... | ... | |
38 | 35 |
<tr> |
39 | 36 |
|
40 | 37 |
<td height="28"> </td> |
41 |
<td colspan="2"><bean:message key="settings.upass"/> <strong><c:if test="${settingsForm.map.upassApplicationSelect eq 0}">System</c:if> |
|
42 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 1}">Admin</c:if> |
|
43 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 2}">RIB</c:if> |
|
44 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 3}">BIB</c:if> </strong> |
|
38 |
<td colspan="2"><bean:message key="settings.upass"/> <strong>Admin </strong> |
|
45 | 39 |
<bean:message key="general.status.edit.confirm"/> |
46 | 40 |
</td> |
47 | 41 |
<td> </td> |
... | ... | |
75 | 69 |
</strong></td> |
76 | 70 |
<td><bean:message key="upass.period.day"/></td> |
77 | 71 |
</tr> |
78 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 1}"> |
|
72 |
|
|
79 | 73 |
<tr> |
80 | 74 |
<td width="10%"> </td> |
81 | 75 |
<td width="35%"><bean:message key="upass.password.expiry.day"/>:</td> |
... | ... | |
103 | 97 |
</strong></td> |
104 | 98 |
<td><bean:message key="upass.period.day"/></td> |
105 | 99 |
</tr> |
106 |
</c:if> |
|
107 |
<!-- <tr> --> |
|
108 |
<!-- <td width="10%"> </td> --> |
|
109 |
<%-- <td width="35%"><bean:message key="upass.auto.logoff.time"/>:</td> --%> |
|
110 |
<!-- <td width="35%"><strong> --> |
|
111 |
<%-- <c:choose> --%> |
|
112 |
<%-- <c:when test="${not empty settingsForm.map.AUTO_LOGOFF}"> --%> |
|
113 |
<%-- <c:out value="${settingsForm.map.AUTO_LOGOFF}"/> --%> |
|
114 |
<%-- </c:when> --%> |
|
115 |
<%-- <c:otherwise>-</c:otherwise> --%> |
|
116 |
<%-- </c:choose> --%> |
|
117 |
<!-- </strong></td> --> |
|
118 |
<%-- <td><bean:message key="upass.period.minute"/></td> --%> |
|
119 |
<!-- </tr> --> |
|
120 | 100 |
<tr> |
121 | 101 |
<td width="10%"> </td> |
122 | 102 |
<td width="35%"><bean:message key="upass.password.max.error.attempt"/>:</td> |
WebContent/jsp/ss221_settings/ibssUpassMaintenanceDetails.jsp | ||
---|---|---|
9 | 9 |
|
10 | 10 |
<bean:define id="upassSettingsView" name="settingsForm" property="upassSettingsView" /> |
11 | 11 |
|
12 |
<h3 class="title"><strong> |
|
13 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 0}">System</c:if> |
|
14 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 1}">Admin</c:if> |
|
15 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 2}">RIB</c:if> |
|
16 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 3}">BIB</c:if> |
|
12 |
<h3 class="title"><strong>Admin |
|
17 | 13 |
<c:out value="${sessionScope.displayDesc}"/> |
18 | 14 |
</strong></h3> |
19 | 15 |
<table id="errorTable"> |
... | ... | |
51 | 47 |
</c:choose> |
52 | 48 |
</strong></td> |
53 | 49 |
</tr> |
54 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 1}"> |
|
55 | 50 |
<tr> |
56 | 51 |
<td width="10%"> </td> |
57 | 52 |
<td width="35%"><bean:message key="upass.password.expiry.day"/>:</td> |
... | ... | |
79 | 74 |
</strong></td> |
80 | 75 |
<td><bean:message key="upass.period.day"/></td> |
81 | 76 |
</tr> |
82 |
</c:if> |
|
83 |
|
|
84 |
<!-- <tr> --> |
|
85 |
<!-- <td width="10%"> </td> --> |
|
86 |
<%-- <td width="35%"><bean:message key="upass.auto.logoff.time"/>:</td> --%> |
|
87 |
<!-- <td width="5%"><strong> --> |
|
88 |
<%-- <c:choose> --%> |
|
89 |
<%-- <c:when test="${not empty upassSettingsView.map.AUTO_LOGOFF}"> --%> |
|
90 |
<%-- <c:out value="${upassSettingsView.map.AUTO_LOGOFF}"/> --%> |
|
91 |
<%-- </c:when> --%> |
|
92 |
<%-- <c:otherwise>-</c:otherwise> --%> |
|
93 |
<%-- </c:choose> --%> |
|
94 |
<!-- </strong></td> --> |
|
95 |
<%-- <td><bean:message key="upass.period.minute"/></td> --%> |
|
96 |
<!-- </tr> --> |
|
97 | 77 |
|
98 | 78 |
<tr> |
99 | 79 |
<td width="10%"> </td> |
... | ... | |
169 | 149 |
<htmlEL:submit property="action" styleClass="button floatRight" onclick="overlay();"><bean:message key="general.button.edit" /></htmlEL:submit> |
170 | 150 |
</htmlEL:form> |
171 | 151 |
</div> |
172 |
</c:if> |
|
173 |
|
|
174 |
<div class="floatRight"> |
|
175 |
<htmlEL:form action="/ss221/settings.do"> |
|
176 |
<htmlEL:submit property="action" styleClass="button floatRight" onclick="overlay();"><bean:message key="general.button.back" /></htmlEL:submit> |
|
177 |
</htmlEL:form> |
|
178 |
</div> |
|
179 |
|
|
152 |
</c:if> |
WebContent/jsp/ss221_settings/ibssUpassSettingsEdit.jsp | ||
---|---|---|
6 | 6 |
<%@ taglib uri="/WEB-INF/tld/struts-logic-el" prefix="logicEL" %> |
7 | 7 |
<%@ taglib uri="/WEB-INF/tld/c" prefix="c" %> |
8 | 8 |
|
9 |
<h3 class="title"><strong> |
|
10 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 0}">System</c:if> |
|
11 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 1}">Admin</c:if> |
|
12 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 2}">RIB</c:if> |
|
13 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 3}">BIB</c:if> |
|
9 |
<h3 class="title"><strong>Admin |
|
14 | 10 |
<c:out value="${sessionScope.displayDesc}"/> |
15 | 11 |
</strong></h3> |
16 | 12 |
<table id="errorTable"> |
... | ... | |
42 | 38 |
<td>:</td> |
43 | 39 |
<td><htmlEL:text property="PASSWORD_GENERATION" name="settingsForm" maxlength="2" autocomplete="off" size="40"/></td> |
44 | 40 |
</tr> |
45 |
<c:if test="${settingsForm.map.upassApplicationSelect eq 1}"> |
|
46 | 41 |
<htmlEL:hidden property="passExpiryInd" value="0"></htmlEL:hidden> |
47 | 42 |
<tr> |
48 | 43 |
<td> </td> |
... | ... | |
56 | 51 |
<td>:</td> |
57 | 52 |
<td><htmlEL:text property="NOTIF_ALERT" name="settingsForm" maxlength="4" autocomplete="off" size="40"/> <bean:message key="upass.period.day"/></td> |
58 | 53 |
</tr> |
59 |
</c:if> |
|
60 |
|
|
61 |
<!-- <tr> --> |
|
62 |
<!-- <td> </td> --> |
|
63 |
<%-- <td><bean:message key="upass.auto.logoff.time"/></td> --%> |
|
64 |
<!-- <td>:</td> --> |
|
65 |
<%-- <td><htmlEL:text property="AUTO_LOGOFF" name="settingsForm" maxlength="2" autocomplete="off" size="40"/> <bean:message key="upass.period.minute"/></td> --%> |
|
66 |
<!-- </tr> --> |
|
67 | 54 |
<tr> |
68 | 55 |
<td> </td> |
69 | 56 |
<td><bean:message key="upass.password.max.error.attempt"/></td> |
WebContent/jsp/ss221_settings/ibssUpassSettingsResult.jsp | ||
---|---|---|
9 | 9 |
|
10 | 10 |
<bean:define id="viewBean" name="settingsForm" property="upassSettingsView" /> |
11 | 11 |
|
12 |
<h3 class="title"><strong><c:out value="${sessionScope.displayDesc}"/></strong></h3> |
|
12 |
<h3 class="title"><strong>Admin <c:out value="${sessionScope.displayDesc}"/></strong></h3>
|
|
13 | 13 |
|
14 | 14 |
<table class="stepTable"> |
15 | 15 |
<tr> |
src/com/ib/ibss/controller/actions/ss221_settings/IBSSUpassMaintenanceDetailsAction.java | ||
---|---|---|
13 | 13 |
import javax.servlet.http.HttpServletRequest; |
14 | 14 |
import javax.servlet.http.HttpServletResponse; |
15 | 15 |
|
16 |
import org.apache.struts.action.ActionErrors; |
|
17 | 16 |
import org.apache.struts.action.ActionForm; |
18 | 17 |
import org.apache.struts.action.ActionForward; |
19 | 18 |
import org.apache.struts.action.ActionMapping; |
20 | 19 |
|
21 |
import com.ib.ibss.common.constant.JSPValidator; |
|
22 | 20 |
import com.ib.ibss.common.constant.FunctionConstants.FunctionCodeEnum; |
23 | 21 |
import com.ib.ibss.enterprise.services.ss221_settings.IBSSUpassMaintenanceDetailsServices; |
24 | 22 |
import com.ib.ibss.error.exception.IBSSGenericException; |
... | ... | |
46 | 44 |
{ |
47 | 45 |
public ActionForward execute (ActionMapping p_oMapping, ActionForm p_oForm, HttpServletRequest p_oRequest, HttpServletResponse p_oResponse) throws Exception |
48 | 46 |
{ |
49 |
ActionErrors m_oError = p_oForm.validate(createNewActionMapping(p_oMapping, JSPValidator.UPASS_SELECT_APPID_VALIDATION), p_oRequest); |
|
50 |
|
|
51 |
if(!m_oError.isEmpty ()) |
|
52 |
{ |
|
53 |
|
|
54 |
errorHandling(p_oRequest, p_oMapping, m_oError); |
|
55 |
} |
|
56 |
else{ |
|
57 |
|
|
58 | 47 |
try |
59 | 48 |
{ |
60 | 49 |
IBSSDynaBean m_oIBDynaBean = IBSSDynaBeanManager.createIBSSDynaBean (p_oForm, p_oMapping); |
... | ... | |
73 | 62 |
e.printStackTrace(); |
74 | 63 |
errorHandling(p_oRequest, p_oMapping, e); |
75 | 64 |
} |
76 |
} |
|
77 | 65 |
return super.execute (p_oMapping, p_oForm, p_oRequest, p_oResponse); |
78 | 66 |
} |
79 | 67 |
} |
src/com/ib/ibss/enterprise/services/ss221_settings/IBSSSettingConstants.java | ||
---|---|---|
75 | 75 |
public static final Integer MINIMUM_PASS_REQUIREMENT =8; |
76 | 76 |
|
77 | 77 |
public static final String HAS_EDIT_ACCESS ="hasEditAccess"; |
78 |
|
|
79 |
//upass application id |
|
80 |
public static final String UPASS_ADMIN_APP_ID ="1"; |
|
78 | 81 |
} |
src/com/ib/ibss/enterprise/services/ss221_settings/IBSSUpassMaintenanceDetailsServices.java | ||
---|---|---|
13 | 13 |
import com.ib.ibss.error.exception.IBSSGenericException; |
14 | 14 |
import com.ib.ibss.error.handler.IBSSErrorHandler; |
15 | 15 |
import com.ib.ibss.struts.utils.IBSSDynaBean; |
16 |
import com.ib.ibss.struts.utils.IBSSDynaBeanManager; |
|
16 | 17 |
import com.ib.ibss.struts.utils.IBSSSessionObjects; |
17 | 18 |
|
18 | 19 |
public class IBSSUpassMaintenanceDetailsServices extends IBSSEnterpriseServicesWorkspace { |
... | ... | |
23 | 24 |
super(m_oIBSessionObjects); |
24 | 25 |
} |
25 | 26 |
|
27 |
@SuppressWarnings("unchecked") |
|
26 | 28 |
public void getUpassConfigurationFromDatabase () throws IBSSGenericException |
27 | 29 |
{ |
30 |
IBSSDynaBean viewBean = null; |
|
31 |
|
|
28 | 32 |
try { |
29 |
String applicationId = (String) getIBSSDynaBean().get(IBSSSettingConstants.UPASS_APPLICATION_SELECT); |
|
30 |
|
|
31 |
IBSSDynaBean viewBean = (IBSSDynaBean)getIBSSDynaBean().get(IBSSSettingConstants.UPASS_SETTINGS_VIEW); |
|
32 |
List<ConfigurationBean> conf = getTbAmConfigDAO().getTbAmConfigByapplicationId(Integer.parseInt(applicationId)); |
|
33 |
viewBean = IBSSDynaBeanManager.createIBSSDynaBean(IBSSSettingConstants.UPASS_SETTINGS_VIEW, getIBSSDynaBean ().getActionMapping ()); |
|
33 | 34 |
|
34 |
|
|
35 |
List<ConfigurationBean> conf = getTbAmConfigDAO().getTbAmConfigByapplicationId(Integer.parseInt(IBSSSettingConstants.UPASS_ADMIN_APP_ID)); |
|
36 |
|
|
35 | 37 |
ConfigurationBean config; |
36 | 38 |
IBSSSettingField setting; |
37 | 39 |
|
38 | 40 |
Iterator<ConfigurationBean> itr = conf.iterator (); |
39 | 41 |
while(itr.hasNext ()) |
40 | 42 |
{ |
41 |
|
|
42 | 43 |
config = itr.next (); |
43 | 44 |
setting = IBSSSettingField.valueOf(config.getConfigName()); |
44 | 45 |
setting.setDynabean(viewBean, config.getConfigValue()); |
45 |
|
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
getIBSSDynaBean().set(IBSSSettingConstants.UPASS_SETTINGS_VIEW.toString(), viewBean); |
src/com/ib/ibss/enterprise/services/ss221_settings/IBSSUpassMaintenanceEditServices.java | ||
---|---|---|
27 | 27 |
IBSSLogger.debug (c_oClass, "Entering execute"); |
28 | 28 |
|
29 | 29 |
try { |
30 |
String applicationId = (String) getIBSSDynaBean().get(IBSSSettingConstants.UPASS_APPLICATION_SELECT); |
|
31 |
|
|
32 | 30 |
IBSSDynaBean formBean = getIBSSDynaBean(); |
33 |
List<ConfigurationBean> conf = getTbAmConfigDAO().getTbAmConfigByapplicationId(Integer.parseInt(applicationId));
|
|
31 |
List<ConfigurationBean> conf = getTbAmConfigDAO().getTbAmConfigByapplicationId(Integer.parseInt(IBSSSettingConstants.UPASS_ADMIN_APP_ID));
|
|
34 | 32 |
|
35 | 33 |
ConfigurationBean config; |
36 | 34 |
IBSSSettingField setting; |
src/com/ib/ibss/enterprise/services/ss221_settings/IBSSUpassMaintenanceResultServices.java | ||
---|---|---|
1 | 1 |
package com.ib.ibss.enterprise.services.ss221_settings; |
2 | 2 |
|
3 |
import java.util.ArrayList; |
|
4 | 3 |
import java.util.List; |
5 | 4 |
|
6 | 5 |
import my.com.upass.pojo.ConfigurationBean; |
7 | 6 |
import net.penril.ibss.audit.log.AuditLogConstants; |
8 | 7 |
import net.penril.ibss.audit.log.USER_ACTIVITY_TYTPE; |
9 | 8 |
|
10 |
import com.ib.ibss.common.constant.AdminPermissionModeType.IBAMPermission; |
|
11 | 9 |
import com.ib.ibss.common.utils.DataValidator; |
12 | 10 |
import com.ib.ibss.common.utils.IBSSLogger; |
13 | 11 |
import com.ib.ibss.common.utils.ResourcesUtils; |
14 | 12 |
import com.ib.ibss.enterprise.services.IBSSEnterpriseServicesWorkspace; |
15 |
import com.ib.ibss.enterprise.services.ss102_user_admin.AdminSharedServices; |
|
16 | 13 |
import com.ib.ibss.enterprise.services.ss102_user_admin.constants.IBSSUserConstants; |
17 | 14 |
import com.ib.ibss.error.exception.IBSSGenericException; |
18 | 15 |
import com.ib.ibss.error.handler.IBSSErrorHandler; |
... | ... | |
33 | 30 |
|
34 | 31 |
Long m_oLogStatus = AuditLogConstants.UNSUCCESSFUL; |
35 | 32 |
String m_sLogReason = ""; |
36 |
String applicationName = ""; |
|
37 | 33 |
|
38 | 34 |
try { |
39 | 35 |
|
40 |
String applicationId = (String) getIBSSDynaBean().get(IBSSSettingConstants.UPASS_APPLICATION_SELECT); |
|
41 |
|
|
42 |
// List<ConfigurationBean> updatedConfigList = new ArrayList<ConfigurationBean>(); |
|
43 |
// List<ConfigurationBean> currentConfigList = getTbAmConfigDAO().getTbAmConfigByapplicationId(Integer.parseInt(applicationId)); |
|
44 |
|
|
45 |
/* This service to be shared among admin features and MK features */ |
|
46 |
// AdminSharedServices m_oAdminService = new AdminSharedServices (); |
|
47 |
// Long actionId = IBAMPermission.EDIT_UPASS.getActionId(); |
|
48 |
// boolean isMakerChecker = m_oAdminService.determineMakerChecker (actionId, getAdminActionDAO(), getIBSSessionObjects()); |
|
49 |
|
|
50 |
if(applicationId.equals("1")){ |
|
51 |
applicationName = "Admin"; |
|
52 |
}else if(applicationId.equals("2")){ |
|
53 |
applicationName = "RIB"; |
|
54 |
}else if(applicationId.equals("3")){ |
|
55 |
applicationName = "BIB"; |
|
56 |
} |
|
57 |
|
|
58 |
getSettingField(applicationId,null); |
|
36 |
getSettingField(null); |
|
59 | 37 |
/* Update configuration */ |
60 | 38 |
getTbAmConfigDAO().updateConfigChange(); |
61 | 39 |
/* Log successful */ |
62 | 40 |
m_oLogStatus = AuditLogConstants.SUCCESSFUL; |
63 | 41 |
|
64 | 42 |
setBeanMessage (IBSSUserConstants.JSP_TITLE, |
65 |
ResourcesUtils.getApplicationResourceMessage ("settings.upass") + " " + applicationName + " " +
|
|
43 |
ResourcesUtils.getApplicationResourceMessage ("settings.upass") + " " + "Admin" + " " +
|
|
66 | 44 |
ResourcesUtils.getApplicationResourceMessage ("user.has.been.successfully") + " " + |
67 | 45 |
ResourcesUtils.getApplicationResourceMessage ("user.edited")); |
68 | 46 |
|
... | ... | |
95 | 73 |
IBSSLogger.debug (c_oClass, "Exiting updateUpass"); |
96 | 74 |
} |
97 | 75 |
|
98 |
public List<ConfigurationBean> getSettingField (String applicationId,List<ConfigurationBean> updatedConfigList) throws Exception{
|
|
76 |
public List<ConfigurationBean> getSettingField (List<ConfigurationBean> updatedConfigList) throws Exception{ |
|
99 | 77 |
|
100 | 78 |
ConfigurationBean updateTbAmConfig; |
101 | 79 |
String configValue; |
102 | 80 |
|
103 | 81 |
for (IBSSSettingField each : IBSSSettingField.values()) |
104 | 82 |
{ |
105 |
updateTbAmConfig = getTbAmConfigDAO().getTbAmConfigByConfigNameAppId(each.toString(),Integer.parseInt(applicationId));
|
|
83 |
updateTbAmConfig = getTbAmConfigDAO().getTbAmConfigByConfigNameAppId(each.toString(),Integer.parseInt(IBSSSettingConstants.UPASS_ADMIN_APP_ID));
|
|
106 | 84 |
configValue = (String) getIBSSDynaBean().get(each.toString()); |
107 | 85 |
|
108 | 86 |
|
Also available in: Unified diff