當前位置: 首頁>>代碼示例>>Java>>正文


Java PersonDocumentPhone.getPhoneType方法代碼示例

本文整理匯總了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);
   	}
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:38,代碼來源:UiDocumentServiceImpl.java

示例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);
   	}
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:39,代碼來源:UiDocumentServiceImpl.java


注:本文中的org.kuali.rice.kim.bo.ui.PersonDocumentPhone.getPhoneType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。