# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /Users/anilam/Awork/V3/v3/admingui/common # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: src/main/java/org/glassfish/admingui/common/handlers/SecurityHandler.java --- src/main/java/org/glassfish/admingui/common/handlers/SecurityHandler.java Base (BASE) +++ src/main/java/org/glassfish/admingui/common/handlers/SecurityHandler.java Locally Modified (Based On LOCAL) @@ -582,7 +582,7 @@ String trueStr = GuiUtil.getMessage("common.true"); String falseStr = GuiUtil.getMessage("common.false"); for(Map oneRow : providerList){ - if ((defaultProvider != null && defaultProvider.length() > 0) || (defaultClientProvider != null && defaultClientProvider.length() > 0)){ + if ( oneRow.get("name").equals(defaultProvider) || oneRow.get("name").equals(defaultClientProvider)){ oneRow.put("default", trueStr); }else{ oneRow.put("default", falseStr); @@ -644,7 +644,7 @@ @Handler(id="saveMsgProviderInfo", input={ @HandlerInput(name="attrMap", type=Map.class, required=true), - @HandlerInput(name="configName", type=Map.class, required=true), + @HandlerInput(name="configName", type=String.class, required=true), @HandlerInput(name="edit", type=String.class, required=true), @HandlerInput(name = "propList", type = List.class) //propList used when edit is false. }, @@ -656,13 +656,13 @@ String edit = (String)handlerCtx.getInputValue("edit"); String providerName = attrMap.get("Name"); String msgSecurityName = attrMap.get("msgSecurityName"); - String configName = attrMap.get("configName"); + String configName = (String)handlerCtx.getInputValue("configName"); List propList = (List) handlerCtx.getInputValue("propList"); String endpoint = GuiUtil.getSessionValue("REST_URL") + "/configs/config/" + configName + "/security-service/message-security-config/" + msgSecurityName + "/provider-config"; String providerEndpoint = endpoint + "/" + providerName; - + try{ if (edit.equals("true")){ boolean providerExist = RestUtil.get(providerEndpoint).isSuccess(); if (!providerExist){ @@ -672,7 +672,7 @@ Map providerMap = (Map)RestUtil.getEntityAttrs(providerEndpoint, "entity"); providerMap.put("className", attrMap.get("ClassName")); providerMap.put("providerType", attrMap.get("ProviderType")); - RestUtil.sendUpdateRequest(endpoint, providerMap, null, null, null); + RestUtil.restRequest(providerEndpoint, providerMap, "POST", null, false); } }else{ endpoint = GuiUtil.getSessionValue("REST_URL") + "/configs/config/" + configName + @@ -682,7 +682,8 @@ attrs.put("classname", attrMap.get("ClassName")); attrs.put("providertype", attrMap.get("ProviderType")); attrs.put("layer", attrMap.get("msgSecurityName")); - RestUtil.sendCreateRequest(endpoint, attrs, null, null, null); + attrs.put("target", configName); + RestUtil.restRequest(endpoint, attrs, "POST", null, false); } //if we pass in "", backend will throw bean violation, since it only accepts certain values. @@ -697,14 +698,17 @@ reqPolicyMap.put("authSource", attrMap.get("Request-AuthSource")); reqPolicyMap.put("authRecipient", attrMap.get("Request-AuthRecipient")); String reqPolicyEP = providerEndpoint + "/request-policy"; - RestUtil.sendUpdateRequest(reqPolicyEP, reqPolicyMap, null, null, null); + RestUtil.restRequest(reqPolicyEP, reqPolicyMap, "POST", null, false); Map respPolicyMap = new HashMap(); respPolicyMap.put("authSource", attrMap.get("Response-AuthSource")); respPolicyMap.put("authRecipient", attrMap.get("Response-AuthRecipient")); String respPolicyEP = providerEndpoint + "/response-policy"; - RestUtil.sendUpdateRequest(respPolicyEP, respPolicyMap, null, null, null); + RestUtil.restRequest(respPolicyEP, respPolicyMap, "POST", null, false); + }catch(Exception ex){ + GuiUtil.handleException(handlerCtx, ex); } + } @Handler(id="saveSecurityManagerValue", Index: src/main/resources/security/msgSecurity/msgSecurity.jsf --- src/main/resources/security/msgSecurity/msgSecurity.jsf Base (BASE) +++ src/main/resources/security/msgSecurity/msgSecurity.jsf Locally Modified (Based On LOCAL) @@ -2,7 +2,7 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development @@ -109,12 +109,12 @@ + url="#{request.contextPath}/common/security/msgSecurity/providerEdit.jsf?name=#{td.value.defaultProvider}&msgSecurityName=#{td.value.name}&configName=#{configName}&cancelPage=#{request.contextPath}/common/security/msgSecurity/msgSecurity.jsf?" /> + url="#{request.contextPath}/common/security/msgSecurity/providerEdit.jsf?name=#{td.value.defaultClientProvider}&msgSecurityName=#{td.value.name}&configName=#{configName}&cancelPage=#{request.contextPath}/common/security/msgSecurity/msgSecurity.jsf?" /> Index: src/main/resources/security/msgSecurity/msgSecurityEdit.jsf --- src/main/resources/security/msgSecurity/msgSecurityEdit.jsf Base (BASE) +++ src/main/resources/security/msgSecurity/msgSecurityEdit.jsf Locally Modified (Based On LOCAL) @@ -2,7 +2,7 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development @@ -89,10 +89,10 @@ - + - + Index: src/main/resources/security/msgSecurity/providerAttr.inc --- src/main/resources/security/msgSecurity/providerAttr.inc Base (BASE) +++ src/main/resources/security/msgSecurity/providerAttr.inc Locally Modified (Based On LOCAL) @@ -2,7 +2,7 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development @@ -55,9 +55,12 @@ + Index: src/main/resources/security/msgSecurity/providerEdit.jsf --- src/main/resources/security/msgSecurity/providerEdit.jsf Base (BASE) +++ src/main/resources/security/msgSecurity/providerEdit.jsf Locally Modified (Based On LOCAL) @@ -2,7 +2,7 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development @@ -74,24 +74,29 @@ mapPut(map="#{pageSession.valueMap}" key="Request-AuthRecipient" value="#{pageSession.requestPolicyMap['authRecipient']}"); } setPageSessionAttribute(key="responsePolicyUrl", value="#{pageSession.selfUrl}/response-policy"); - gf.checkIfEndPointExist(endpoint="#{pageSession.requestPolicyUrl}" exists="#{pageSession.exist}"); + gf.checkIfEndPointExist(endpoint="#{pageSession.responsePolicyUrl}" exists="#{pageSession.exist}"); if(#{exist}) { - gf.getEntityAttrs(endpoint="#{pageSession.requestPolicyUrl}.json", valueMap="#{pageSession.responsePolicyMap}"); + gf.getEntityAttrs(endpoint="#{pageSession.responsePolicyUrl}.json", valueMap="#{pageSession.responsePolicyMap}"); mapPut(map="#{pageSession.valueMap}" key="Response-AuthSource" value="#{pageSession.responsePolicyMap['authSource']}"); mapPut(map="#{pageSession.valueMap}" key="Response-AuthRecipient" value="#{pageSession.responsePolicyMap['authRecipient']}"); } + + + gf.restRequest(endpoint="#{pageSession.selfUrl}/property.json" method="GET" result="#{requestScope.propTable}"); setPageSessionAttribute(key="tableList" value="#{requestScope.propTable.data.extraProperties.properties}"); setPageSessionAttribute(key="selfPage" value="#{request.contextPath}/common/security/msgSecurity/providerEdit.jsf?name=#{pageSession.encodedName}&msgSecurityName=#{pageSession.encodedMsgSecurityName}&configName=#{pageSession.encodedConfigName}"); - setPageSessionAttribute(key="cPage" value="#{request.contextPath}/common/security/msgSecurity/providers.jsf?name=#{pageSession.msgSecurityName}&configName=#{configName}"); - getRequestValue(key="cancelPage" - value="#{pageSession.cancelPage}" - default="#{request.contextPath}/common/security/msgSecurity/providers.jsf?name=#{pageSession.encodedMsgSecurityName}&configName=#{encodedConfigName}") + getRequestValue(key="cancelPage" value="#{requestScope.cPage}" + default="#{request.contextPath}/common/security/msgSecurity/providers.jsf?name=#{pageSession.encodedMsgSecurityName}") + setPageSessionAttribute(key="cancelPage" value="#{requestScope.cPage}&configName=#{pageSession.encodedConfigName}"); setPageSessionAttribute(key="edit" value="#{true}" ); />