Search in sources :

Example 6 with SecurityGroupTab

use of edu.cornell.kfs.ksr.businessobject.SecurityGroupTab in project cu-kfs by CU-CommunityApps.

the class SecurityRequestDocumentServiceImpl method buildSecurityRequestRoles.

protected void buildSecurityRequestRoles(SecurityRequestDocument document) {
    List<SecurityRequestRole> requestRoles = new ArrayList<SecurityRequestRole>();
    long roleRequestId = 1;
    for (SecurityGroupTab groupTab : document.getSecurityGroup().getSecurityGroupTabs()) {
        if (groupTab.isActive()) {
            for (SecurityProvisioningGroup provisioningGroup : groupTab.getSecurityProvisioningGroups()) {
                if (provisioningGroup.isActive()) {
                    SecurityRequestRole requestRole = new SecurityRequestRole();
                    requestRole.setDocumentNumber(document.getDocumentNumber());
                    requestRole.setRoleId(provisioningGroup.getRoleId());
                    requestRole.setRoleRequestId(Long.valueOf(roleRequestId));
                    buildSecurityRequestRoleQualifications(requestRole, document.getPrincipalId());
                    roleRequestId++;
                    requestRoles.add(requestRole);
                }
            }
        }
    }
    document.setSecurityRequestRoles(requestRoles);
}
Also used : SecurityProvisioningGroup(edu.cornell.kfs.ksr.businessobject.SecurityProvisioningGroup) SecurityGroupTab(edu.cornell.kfs.ksr.businessobject.SecurityGroupTab) ArrayList(java.util.ArrayList) SecurityRequestRole(edu.cornell.kfs.ksr.businessobject.SecurityRequestRole)

Aggregations

SecurityGroupTab (edu.cornell.kfs.ksr.businessobject.SecurityGroupTab)6 SecurityGroup (edu.cornell.kfs.ksr.businessobject.SecurityGroup)3 ArrayList (java.util.ArrayList)3 SecurityProvisioningGroup (edu.cornell.kfs.ksr.businessobject.SecurityProvisioningGroup)2 SecurityProvisioning (edu.cornell.kfs.ksr.businessobject.SecurityProvisioning)1 SecurityRequestRole (edu.cornell.kfs.ksr.businessobject.SecurityRequestRole)1 HashMap (java.util.HashMap)1 List (java.util.List)1 ConcreteKeyValue (org.kuali.kfs.core.api.util.ConcreteKeyValue)1 KeyValue (org.kuali.kfs.core.api.util.KeyValue)1 MaintenanceDocument (org.kuali.kfs.kns.document.MaintenanceDocument)1 KualiDocumentFormBase (org.kuali.kfs.kns.web.struts.form.KualiDocumentFormBase)1 KualiForm (org.kuali.kfs.kns.web.struts.form.KualiForm)1 Document (org.kuali.kfs.krad.document.Document)1 SequenceAccessorService (org.kuali.kfs.krad.service.SequenceAccessorService)1 BeanPropertyComparator (org.kuali.kfs.krad.util.BeanPropertyComparator)1