Search in sources :

Example 1 with KimAttributeField

use of org.kuali.kfs.kim.api.type.KimAttributeField in project cu-kfs by CU-CommunityApps.

the class IdentityManagementGroupDocument method setDefinitions.

public void setDefinitions(List<KimAttributeField> definitions) {
    super.setDefinitions(definitions);
    if (getQualifiers() == null || getQualifiers().size() < 1) {
        GroupDocumentQualifier qualifier;
        setQualifiers(new ArrayList<>());
        if (getDefinitions() != null) {
            for (KimAttributeField key : getDefinitions()) {
                qualifier = new GroupDocumentQualifier();
                qualifier.setKimAttrDefnId(getKimAttributeDefnId(key));
                getQualifiers().add(qualifier);
            }
        }
    }
}
Also used : KimAttributeField(org.kuali.kfs.kim.api.type.KimAttributeField) GroupDocumentQualifier(org.kuali.kfs.kim.bo.ui.GroupDocumentQualifier)

Example 2 with KimAttributeField

use of org.kuali.kfs.kim.api.type.KimAttributeField in project cu-kfs by CU-CommunityApps.

the class IdentityManagementRoleDocument method getBlankDelegationMember.

public RoleDocumentDelegationMember getBlankDelegationMember() {
    RoleDocumentDelegationMember member = new RoleDocumentDelegationMember();
    RoleDocumentDelegationMemberQualifier qualifier;
    if (getDefinitions() != null) {
        for (KimAttributeField key : getDefinitions()) {
            qualifier = new RoleDocumentDelegationMemberQualifier();
            setAttrDefnIdForDelMemberQualifier(qualifier, key);
            member.getQualifiers().add(qualifier);
        }
    }
    return member;
}
Also used : KimAttributeField(org.kuali.kfs.kim.api.type.KimAttributeField) RoleDocumentDelegationMemberQualifier(org.kuali.kfs.kim.bo.ui.RoleDocumentDelegationMemberQualifier) RoleDocumentDelegationMember(org.kuali.kfs.kim.bo.ui.RoleDocumentDelegationMember)

Example 3 with KimAttributeField

use of org.kuali.kfs.kim.api.type.KimAttributeField in project cu-kfs by CU-CommunityApps.

the class IdentityManagementRoleDocument method getBlankMember.

public KimDocumentRoleMember getBlankMember() {
    KimDocumentRoleMember member = new KimDocumentRoleMember();
    KimDocumentRoleQualifier qualifier;
    if (getDefinitions() != null) {
        for (KimAttributeField key : getDefinitions()) {
            qualifier = new KimDocumentRoleQualifier();
            qualifier.setKimAttrDefnId(getKimAttributeDefnId(key));
            member.getQualifiers().add(qualifier);
        }
    }
    setupMemberRspActions(member);
    return member;
}
Also used : KimAttributeField(org.kuali.kfs.kim.api.type.KimAttributeField) KimDocumentRoleMember(org.kuali.kfs.kim.bo.ui.KimDocumentRoleMember) KimDocumentRoleQualifier(org.kuali.kfs.kim.bo.ui.KimDocumentRoleQualifier)

Example 4 with KimAttributeField

use of org.kuali.kfs.kim.api.type.KimAttributeField in project cu-kfs by CU-CommunityApps.

the class IdentityManagementGroupDocument method prepareForSave.

@Override
public void prepareForSave() {
    String groupId;
    if (StringUtils.isBlank(getGroupId())) {
        SequenceAccessorService sas = getSequenceAccessorService();
        Long nextSeq = sas.getNextAvailableSequenceNumber("KRIM_GRP_ID_S", this.getClass());
        groupId = nextSeq.toString();
        setGroupId(groupId);
    } else {
        groupId = getGroupId();
    }
    if (getMembers() != null) {
        String groupMemberId;
        for (GroupDocumentMember member : getMembers()) {
            member.setGroupId(getGroupId());
            if (StringUtils.isBlank(member.getGroupMemberId())) {
                SequenceAccessorService sas = getSequenceAccessorService();
                Long nextSeq = sas.getNextAvailableSequenceNumber("KRIM_GRP_MBR_ID_S", this.getClass());
                groupMemberId = nextSeq.toString();
                member.setGroupMemberId(groupMemberId);
            }
            if (StringUtils.isBlank(member.getDocumentNumber())) {
                member.setDocumentNumber(getDocumentNumber());
            }
        }
    }
    int index = 0;
    // this needs to be checked - are all qualifiers present?
    if (getDefinitions() != null) {
        for (KimAttributeField key : getDefinitions()) {
            if (getQualifiers().size() > index) {
                GroupDocumentQualifier qualifier = getQualifiers().get(index);
                qualifier.setKimAttrDefnId(getKimAttributeDefnId(key));
                qualifier.setKimTypId(getKimType().getId());
                qualifier.setGroupId(groupId);
                qualifier.setDocumentNumber(getDocumentNumber());
            }
            index++;
        }
    }
}
Also used : SequenceAccessorService(org.kuali.kfs.krad.service.SequenceAccessorService) KimAttributeField(org.kuali.kfs.kim.api.type.KimAttributeField) GroupDocumentQualifier(org.kuali.kfs.kim.bo.ui.GroupDocumentQualifier) GroupDocumentMember(org.kuali.kfs.kim.bo.ui.GroupDocumentMember)

Aggregations

KimAttributeField (org.kuali.kfs.kim.api.type.KimAttributeField)4 GroupDocumentQualifier (org.kuali.kfs.kim.bo.ui.GroupDocumentQualifier)2 GroupDocumentMember (org.kuali.kfs.kim.bo.ui.GroupDocumentMember)1 KimDocumentRoleMember (org.kuali.kfs.kim.bo.ui.KimDocumentRoleMember)1 KimDocumentRoleQualifier (org.kuali.kfs.kim.bo.ui.KimDocumentRoleQualifier)1 RoleDocumentDelegationMember (org.kuali.kfs.kim.bo.ui.RoleDocumentDelegationMember)1 RoleDocumentDelegationMemberQualifier (org.kuali.kfs.kim.bo.ui.RoleDocumentDelegationMemberQualifier)1 SequenceAccessorService (org.kuali.kfs.krad.service.SequenceAccessorService)1