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);
}
}
}
}
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;
}
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;
}
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++;
}
}
}
Aggregations