All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.admingui.console-jca-plugin.3.1-b19.source-code.workSecurityMapButtons.inc Maven / Gradle / Ivy



   
        
            
                
                            //Remove the principal maps if there are any.
                            gf.getChildList(parentEndpoint="#{pageSession.selfUrl}", childType="principal-map", result="#{requestScope.oldPrincipalsInfo}", id="eisPrincipal");
                            gf.getMessageProps(messageListProps="#{requestScope.oldPrincipalsInfo}"
                               id="eisPrincipal"
                               keyList="#{requestScope.oldPrincipalsList}");
                            foreach(var="principal" list="#{requestScope.principalsList}") {
                                gf.restRequest(endpoint="#{pageSession.selfUrl}/principal-map/#{principal}" method="DELETE");
                            }
                        }
                        //Remove the remaining group old group elements if there are any.
                        foreach(var="group" list="#{pageSession.oldGroupsList}") {
                            gf.restRequest(endpoint="#{pageSession.selfUrl}/group-map/#{group}" method="DELETE");
                        }
                    }
                    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}");
                        foreach(var="principal" list="#{requestScope.principalsList}") {
                            //verify whether this principal already existing or not.
                            //If it is already there, update the entity or create a new one.
                            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}");
                            }
                            //TO DO: As of now not able to add a new prinicial element.
                            //Issue:13174. Remove the comments once it is available.
                            
                            //Remove the group maps if there are any.
                            gf.getChildList(parentEndpoint="#{pageSession.selfUrl}", childType="group-map", result="#{requestScope.oldGroupsInfo}", id="eisGroup");
                            gf.getMessageProps(messageListProps="#{requestScope.oldGroupsInfo}"
                               id="eisGroup"
                               keyList="#{requestScope.oldGroupsList}");
                            foreach(var="group" list="#{requestScope.groupsList}") {
                                gf.restRequest(endpoint="#{pageSession.selfUrl}/group-map/#{group}" method="DELETE");
                            }
                        }
                        //Remove the remaining principal elements#{pageSession.oldPrincipalsList}.
                        foreach(var="principal" list="#{pageSession.oldPrincipalsList}") {
                            gf.restRequest(endpoint="#{pageSession.selfUrl}/principal-map/#{principal}" method="DELETE");
                        }
                    }                   
                    prepareSuccessfulMsg();
                    gf.redirect(page="#{selfPage}&mapName=#{pageSession.valueMap['name']}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}");
                />
            
            
                
            
            
                
            
        
    




© 2015 - 2025 Weber Informatics LLC | Privacy Policy