本文整理汇总了Java中org.kuali.rice.kim.impl.type.KimTypeAttributesHelper类的典型用法代码示例。如果您正苦于以下问题:Java KimTypeAttributesHelper类的具体用法?Java KimTypeAttributesHelper怎么用?Java KimTypeAttributesHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KimTypeAttributesHelper类属于org.kuali.rice.kim.impl.type包,在下文中一共展示了KimTypeAttributesHelper类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getQualifiersToDisplay
import org.kuali.rice.kim.impl.type.KimTypeAttributesHelper; //导入依赖的package包/类
public String getQualifiersToDisplay(KimDocumentRoleMember roleMember) {
if (roleMember != null && StringUtils.isNotEmpty(roleMember.getRoleId()) &&
roleMember.getQualifiers() != null && !roleMember.getQualifiers().isEmpty()) {
Role role = getRoleService().getRole(roleMember.getRoleId());
KimType kimType = null;
if (role != null) {
kimType = getKimTypeInfoService().getKimType(role.getKimTypeId());
}
if (kimType != null) {
KimTypeAttributesHelper attributesHelper = new KimTypeAttributesHelper(kimType);
StringBuffer attributesToDisplay = new StringBuffer();
KimAttributeField attribDefn;
for (KimDocumentRoleQualifier attribute : roleMember.getQualifiers()) {
if (attribute.getKimAttribute() != null) {
attribDefn = attributesHelper.getAttributeDefinition(attribute.getKimAttribute().getAttributeName());
attributesToDisplay.append(attribDefn != null ? attribDefn.getAttributeField().getLongLabel() : "");
attributesToDisplay.append(KimConstants.KimUIConstants.NAME_VALUE_SEPARATOR);
attributesToDisplay.append(attribute.getAttrVal());
attributesToDisplay.append(KimConstants.KimUIConstants.COMMA_SEPARATOR);
}
}
return stripEnd(attributesToDisplay.toString(), KimConstants.KimUIConstants.COMMA_SEPARATOR);
}
}
return "";
}
示例2: addDelegationMember
import org.kuali.rice.kim.impl.type.KimTypeAttributesHelper; //导入依赖的package包/类
public ActionForward addDelegationMember(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
IdentityManagementPersonDocumentForm personDocumentForm = (IdentityManagementPersonDocumentForm) form;
IdentityManagementPersonDocument personDocument = personDocumentForm.getPersonDocument();
RoleDocumentDelegationMember newDelegationMember = personDocumentForm.getNewDelegationMember();
KimTypeAttributesHelper attrHelper = newDelegationMember.getAttributesHelper();
if (getKualiRuleService().applyRules(new AddPersonDelegationMemberEvent("", personDocumentForm.getPersonDocument(), newDelegationMember))) {
//RoleImpl roleBo = (RoleImpl)getUiDocumentService().getMember(KimApiConstants.KimUIConstants.MEMBER_TYPE_ROLE_CODE, newDelegationMember.getRoleDao().getRoleId());
Role role;
role = KimApiServiceLocator.getRoleService().getRole(newDelegationMember.getRoleBo().getId());
if (role != null) {
if(!validateRole(newDelegationMember.getRoleBo().getId(),role, PersonDocumentRoleRule.ERROR_PATH, "Person")){
return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
newDelegationMember.setRoleBo(RoleBo.from(role));
}
KimAttributeField attrDefinition;
RoleMemberBo roleMember = KIMServiceLocatorInternal.getUiDocumentService().getRoleMember(newDelegationMember.getRoleMemberId());
Map<String, String>
roleMemberAttributes = (new AttributeValidationHelper()).convertAttributesToMap(roleMember.getAttributeDetails());
for (KimAttributeField key: attrHelper.getDefinitions()) {
RoleDocumentDelegationMemberQualifier qualifier = new RoleDocumentDelegationMemberQualifier();
attrDefinition = key;
qualifier.setKimAttrDefnId(attrHelper.getKimAttributeDefnId(attrDefinition));
qualifier.setAttrVal(attrHelper.getAttributeValue(roleMemberAttributes, attrDefinition.getAttributeField().getName()));
newDelegationMember.setMemberTypeCode(MemberType.PRINCIPAL.getCode());
newDelegationMember.getQualifiers().add(qualifier);
}
//newDelegationMember.setAttributeEntry(getUiDocumentService().getAttributeEntries(newDelegationMember.getAttributesHelper().getDefinitions())));
newDelegationMember.setMemberId(personDocument.getPrincipalId());
personDocument.getDelegationMembers().add(newDelegationMember);
personDocumentForm.setNewDelegationMember(new RoleDocumentDelegationMember());
}
return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
示例3: addDelegationMember
import org.kuali.rice.kim.impl.type.KimTypeAttributesHelper; //导入依赖的package包/类
public ActionForward addDelegationMember(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
IdentityManagementPersonDocumentForm personDocumentForm = (IdentityManagementPersonDocumentForm) form;
IdentityManagementPersonDocument personDocument = personDocumentForm.getPersonDocument();
RoleDocumentDelegationMember newDelegationMember = personDocumentForm.getNewDelegationMember();
KimTypeAttributesHelper attrHelper = newDelegationMember.getAttributesHelper();
if (getKualiRuleService().applyRules(new AddPersonDelegationMemberEvent("", personDocumentForm.getPersonDocument(), newDelegationMember))) {
//RoleImpl roleBo = (RoleImpl)getUiDocumentService().getMember(KimApiConstants.KimUIConstants.MEMBER_TYPE_ROLE_CODE, newDelegationMember.getRoleDao().getRoleId());
Role role;
role = KimApiServiceLocator.getRoleService().getRole(newDelegationMember.getRoleBo().getId());
if (role != null) {
if(!validateRole(newDelegationMember.getRoleBo().getId(),role, PersonDocumentRoleRule.ERROR_PATH, "Person")){
return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
newDelegationMember.setRoleBo(RoleBo.from(role));
}
KimAttributeField attrDefinition;
RoleMemberBo roleMember = KIMServiceLocatorInternal.getUiDocumentService().getRoleMember(newDelegationMember.getRoleMemberId());
Map<String, String>
roleMemberAttributes = (new AttributeValidationHelper()).convertAttributesToMap(roleMember.getAttributeDetails());
for (KimAttributeField key: attrHelper.getDefinitions()) {
RoleDocumentDelegationMemberQualifier qualifier = new RoleDocumentDelegationMemberQualifier();
attrDefinition = key;
qualifier.setKimAttrDefnId(attrHelper.getKimAttributeDefnId(attrDefinition));
qualifier.setAttrVal(attrHelper.getAttributeValue(roleMemberAttributes, attrDefinition.getAttributeField().getName()));
newDelegationMember.setMemberId(personDocument.getPrincipalId());
newDelegationMember.setMemberTypeCode(MemberType.PRINCIPAL.getCode());
newDelegationMember.getQualifiers().add(qualifier);
}
//newDelegationMember.setAttributeEntry(getUiDocumentService().getAttributeEntries(newDelegationMember.getAttributesHelper().getDefinitions())));
personDocument.getDelegationMembers().add(newDelegationMember);
personDocumentForm.setNewDelegationMember(new RoleDocumentDelegationMember());
}
return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
示例4: setRoleBo
import org.kuali.rice.kim.impl.type.KimTypeAttributesHelper; //导入依赖的package包/类
/**
* @param roleBo the roleBo to set
*/
public void setRoleBo(RoleBo roleBo) {
this.roleBo = roleBo;
setAttributesHelper(new KimTypeAttributesHelper(KimTypeBo.to(roleBo.getKimRoleType())));
}
示例5: getAttributesHelper
import org.kuali.rice.kim.impl.type.KimTypeAttributesHelper; //导入依赖的package包/类
/**
* @return the attributesHelper
*/
public KimTypeAttributesHelper getAttributesHelper() {
return this.attributesHelper;
}
示例6: setAttributesHelper
import org.kuali.rice.kim.impl.type.KimTypeAttributesHelper; //导入依赖的package包/类
/**
* @param attributesHelper the attributesHelper to set
*/
public void setAttributesHelper(KimTypeAttributesHelper attributesHelper) {
this.attributesHelper = attributesHelper;
}
示例7: getKimTypeAttributesHelper
import org.kuali.rice.kim.impl.type.KimTypeAttributesHelper; //导入依赖的package包/类
public KimTypeAttributesHelper getKimTypeAttributesHelper(String roleId) {
Role role = KimApiServiceLocator.getRoleService().getRole(roleId);
KimType kimTypeInfo = KimApiServiceLocator.getKimTypeInfoService().getKimType(role.getKimTypeId());
return new KimTypeAttributesHelper(kimTypeInfo);
}
示例8: setRoleBo
import org.kuali.rice.kim.impl.type.KimTypeAttributesHelper; //导入依赖的package包/类
/**
* @param roleBo the roleBo to set
*/
public void setRoleBo(RoleBo roleBo) {
this.roleBo = roleBo;
setAttributesHelper(new KimTypeAttributesHelper(KimTypeBo.to(roleBo.getKimRoleType())));
}
示例9: getAttributesHelper
import org.kuali.rice.kim.impl.type.KimTypeAttributesHelper; //导入依赖的package包/类
/**
* @return the attributesHelper
*/
public KimTypeAttributesHelper getAttributesHelper() {
return this.attributesHelper;
}
示例10: setAttributesHelper
import org.kuali.rice.kim.impl.type.KimTypeAttributesHelper; //导入依赖的package包/类
/**
* @param attributesHelper the attributesHelper to set
*/
public void setAttributesHelper(KimTypeAttributesHelper attributesHelper) {
this.attributesHelper = attributesHelper;
}
示例11: getKimTypeAttributesHelper
import org.kuali.rice.kim.impl.type.KimTypeAttributesHelper; //导入依赖的package包/类
public KimTypeAttributesHelper getKimTypeAttributesHelper(String roleId) {
Role role = KimApiServiceLocator.getRoleService().getRole(roleId);
KimType kimTypeInfo = KimApiServiceLocator.getKimTypeInfoService().getKimType(role.getKimTypeId());
return new KimTypeAttributesHelper(kimTypeInfo);
//addDelegationRoleKimTypeAttributeHelper(roleId, helper);
}