.main.admingui.console-jca-plugin.8.0.0-JDK17-M7.source-code.workSecurityMapButtons.inc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of console-jca-plugin Show documentation
Show all versions of console-jca-plugin Show documentation
Connectors plugin bundle for GlassFish Admin Console
The newest version!
$attribute{groupsToAddStr});
convertListToCommaString(list="#{pageSession.oldGroupsList}" commaString=>$attribute{oldGroupsStr});
createMap(result="#{requestScope.attrsMap}");
mapPut(map="#{requestScope.attrsMap}" key="raname" value="#{pageSession.valueMap['resourceAdapterName']}");
mapPut(map="#{requestScope.attrsMap}" key="addgroups" value="#{groupsToAddStr}");
mapPut(map="#{requestScope.attrsMap}" key="removegroups" value="#{oldGroupsStr}");
gf.restRequest(endpoint="#{pageSession.selfUrl}/update-connector-work-security-map" attrs="#{requestScope.attrsMap}" method="POST");
}
}
if ('#{usersOptionP}=principals') {
convertStringToMap(str="#{pageSession.valueMap2['principalMapping']}" result="#{requestScope.principalsMap}");
gf.getMapKeys(Map="#{requestScope.principalsMap}" Keys="#{requestScope.principalsList}");
gf.getChildList(parentEndpoint="#{pageSession.selfUrl}", childType="principal-map", result="#{requestScope.oldPrincipalsInfo}", id="eisPrincipal");
gf.getMessageProps(messageListProps="#{requestScope.oldPrincipalsInfo}"
id="eisPrincipal"
keyList="#{pageSession.oldPrincipalsList}");
setPageSessionAttribute(key="principalsToAddList" value={});
foreach(var="principal" list="#{requestScope.principalsList}") {
//verify whether this principal already existing or not.
//If it is already there, update the entity or add to the new principals list.
gf.containedIn(list="#{pageSession.oldPrincipalsList}" testStr="#{principal}" contain="#{requestScope.isExists}");
if (#{requestScope.isExists}) {
createMap(result="#{requestScope.attrsMap}");
mapGet(Map="#{requestScope.principalsMap}" Key="#{principal}" Value="#{requestScope.val}");
mapPut(map="#{requestScope.attrsMap}" key="mappedPrincipal" value="#{val}");
gf.restRequest(endpoint="#{pageSession.selfUrl}/principal-map/#{principal}" attrs="#{requestScope.attrsMap}" method="POST");
removeListElement(list="#{pageSession.oldPrincipalsList}" name="#{principal}" finalList="#{pageSession.oldPrincipalsList}");
}
if (!#{requestScope.isExists}) {
mapGet(Map="#{requestScope.principalsMap}" Key="#{principal}" Value="#{requestScope.val}");
listAdd(list="#{pageSession.principalsToAddList}" value="#{principal}=#{val}" result="#{pageSession.principalsToAddList}");
}
}
if(!#{pageSession.isAppScopedRes}){
convertListToCommaString(list="#{pageSession.principalsToAddList}" commaString=>$attribute{principalsToAddStr});
convertListToCommaString(list="#{pageSession.oldPrincipalsList}" commaString=>$attribute{oldPrincipalsStr});
createMap(result="#{requestScope.attrsMap}");
mapPut(map="#{requestScope.attrsMap}" key="raname" value="#{pageSession.valueMap['resourceAdapterName']}");
mapPut(map="#{requestScope.attrsMap}" key="addprincipals" value="#{principalsToAddStr}");
mapPut(map="#{requestScope.attrsMap}" key="removeprincipals" value="#{oldPrincipalsStr}");
gf.restRequest(endpoint="#{pageSession.selfUrl}/update-connector-work-security-map" attrs="#{requestScope.attrsMap}" method="POST");
}
}
prepareSuccessfulMsg();
gf.redirect(page="#{selfPage}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}");
/>