本文整理匯總了Java中org.kuali.rice.kim.bo.ui.PersonDocumentPhone.getPhoneType方法的典型用法代碼示例。如果您正苦於以下問題:Java PersonDocumentPhone.getPhoneType方法的具體用法?Java PersonDocumentPhone.getPhoneType怎麽用?Java PersonDocumentPhone.getPhoneType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.kuali.rice.kim.bo.ui.PersonDocumentPhone
的用法示例。
在下文中一共展示了PersonDocumentPhone.getPhoneType方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setupPhone
import org.kuali.rice.kim.bo.ui.PersonDocumentPhone; //導入方法依賴的package包/類
protected void setupPhone(IdentityManagementPersonDocument identityManagementPersonDocument, EntityTypeContactInfoBo entityType, List<EntityPhoneBo> origPhones) {
if ( !identityManagementPersonDocument.getPrivacy().isSuppressPhone() || canOverrideEntityPrivacyPreferences(getInitiatorPrincipalId(identityManagementPersonDocument), identityManagementPersonDocument.getPrincipalId()) ) {
List<EntityPhoneBo> entityPhones = new ArrayList<EntityPhoneBo>();
if(CollectionUtils.isNotEmpty(identityManagementPersonDocument.getPhones())){
for (PersonDocumentPhone phone : identityManagementPersonDocument.getPhones()) {
EntityPhoneBo entityPhone = new EntityPhoneBo();
entityPhone.setPhoneTypeCode(phone.getPhoneTypeCode());
if (phone.getPhoneType() != null) {
entityPhone.setPhoneType(phone.getPhoneType());
} else {
if (StringUtils.isNotEmpty(phone.getPhoneTypeCode())) {
entityPhone.setPhoneType(EntityPhoneTypeBo
.from(getIdentityService().getAddressType(phone.getPhoneTypeCode())));
}
}
entityPhone.setEntityId(identityManagementPersonDocument.getEntityId());
entityPhone.setId(phone.getEntityPhoneId());
entityPhone.setEntityTypeCode(entityType.getEntityTypeCode());
entityPhone.setPhoneNumber(phone.getPhoneNumber());
entityPhone.setCountryCode(phone.getCountryCode());
entityPhone.setExtensionNumber(phone.getExtensionNumber());
entityPhone.setActive(phone.isActive());
entityPhone.setDefaultValue(phone.isDflt());
if(ObjectUtils.isNotNull(origPhones)){
for (EntityPhoneContract origPhone : origPhones) {
if (origPhone.getId()!=null && StringUtils.equals(origPhone.getId(), entityPhone.getId())) {
entityPhone.setVersionNumber(origPhone.getVersionNumber());
}
}
}
entityPhone.setId(phone.getEntityPhoneId());
entityPhones.add(entityPhone);
}
}
entityType.setPhoneNumbers(entityPhones);
}
}
示例2: setupPhone
import org.kuali.rice.kim.bo.ui.PersonDocumentPhone; //導入方法依賴的package包/類
protected void setupPhone(IdentityManagementPersonDocument identityManagementPersonDocument, EntityTypeContactInfoBo entityType, List<EntityPhoneBo> origPhones) {
if ( !identityManagementPersonDocument.getPrivacy().isSuppressPhone() || canOverrideEntityPrivacyPreferences(getInitiatorPrincipalId(identityManagementPersonDocument), identityManagementPersonDocument.getPrincipalId()) ) {
List<EntityPhoneBo> entityPhones = new ArrayList<EntityPhoneBo>();
if(CollectionUtils.isNotEmpty(identityManagementPersonDocument.getPhones())){
for (PersonDocumentPhone phone : identityManagementPersonDocument.getPhones()) {
EntityPhoneBo entityPhone = new EntityPhoneBo();
entityPhone.setPhoneTypeCode(phone.getPhoneTypeCode());
if (phone.getPhoneType() != null) {
entityPhone.setPhoneType(phone.getPhoneType());
} else {
if (StringUtils.isNotEmpty(phone.getPhoneTypeCode())) {
entityPhone.setPhoneType(EntityPhoneTypeBo
.from(getIdentityService().getAddressType(phone.getPhoneTypeCode())));
}
}
entityPhone.setEntityId(identityManagementPersonDocument.getEntityId());
entityPhone.setId(phone.getEntityPhoneId());
entityPhone.setEntityTypeCode(entityType.getEntityTypeCode());
entityPhone.setPhoneNumber(phone.getPhoneNumber());
entityPhone.setCountryCode(phone.getCountryCode());
entityPhone.setExtension(phone.getExtension());
entityPhone.setExtensionNumber(phone.getExtensionNumber());
entityPhone.setActive(phone.isActive());
entityPhone.setDefaultValue(phone.isDflt());
if(ObjectUtils.isNotNull(origPhones)){
for (EntityPhoneContract origPhone : origPhones) {
if (origPhone.getId()!=null && StringUtils.equals(origPhone.getId(), entityPhone.getId())) {
entityPhone.setVersionNumber(origPhone.getVersionNumber());
}
}
}
entityPhone.setId(phone.getEntityPhoneId());
entityPhones.add(entityPhone);
}
}
entityType.setPhoneNumbers(entityPhones);
}
}