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


Java PersonDocumentName類代碼示例

本文整理匯總了Java中org.kuali.rice.kim.bo.ui.PersonDocumentName的典型用法代碼示例。如果您正苦於以下問題:Java PersonDocumentName類的具體用法?Java PersonDocumentName怎麽用?Java PersonDocumentName使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PersonDocumentName類屬於org.kuali.rice.kim.bo.ui包,在下文中一共展示了PersonDocumentName類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: validateAffiliationAndName

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
protected boolean validateAffiliationAndName(IdentityManagementPersonDocument personDoc) {
	boolean valid = true;
	if (personDoc.getAffiliations().isEmpty()) {
 		GlobalVariables.getMessageMap().putError("affiliations[0]",RiceKeyConstants.ERROR_ONE_ITEM_REQUIRED, "affiliation");
 		valid = false;
	}
	if (personDoc.getNames().isEmpty()) {
 		GlobalVariables.getMessageMap().putError("names[0]",RiceKeyConstants.ERROR_ONE_ITEM_REQUIRED, "name");
 		valid = false;
	} else{
    	boolean activeExists = false;
    	for(PersonDocumentName name: personDoc.getNames()){
	    	if(name.isActive()){
	    		activeExists = true;
    		}
    	}
    	if(!activeExists){
    		GlobalVariables.getMessageMap().putError("names[0]", RiceKeyConstants.ERROR_ONE_ACTIVE_ITEM_REQUIRED, "name");
  		valid = false;
    	}
    	return valid;

	}
	return valid;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:26,代碼來源:IdentityManagementPersonDocumentRule.java

示例2: initNames

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
private List<PersonDocumentName> initNames() {
	List<PersonDocumentName> docNames = new ArrayList<PersonDocumentName>();
		PersonDocumentName docName = new PersonDocumentName();
		docName.setEntityNameId("nameId123");
		docName.setNameCode("PRFR");
           docName.setEntityNameType(
                   EntityNameTypeBo.from(KimApiServiceLocator.getIdentityService().getNameType("PRFR")));
		docName.setFirstName("John");
		docName.setLastName("Doe");
		docName.setMiddleName("M");
		docName.setNamePrefix("Mr");
		docName.setNameSuffix("Jr");
		docName.setActive(true);
		docName.setDflt(true);
		docNames.add(docName);
	return docNames;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:18,代碼來源:UiDocumentServiceImplTest.java

示例3: testLoadToPersonDocument

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
@Test
public void testLoadToPersonDocument() {

	Entity entity = KimApiServiceLocator.getIdentityService().getEntity("entity123eId");
	assertNotNull(entity);
	IdentityManagementPersonDocument personDoc = new IdentityManagementPersonDocument();
	uiDocumentService.loadEntityToPersonDoc(personDoc, "entity123pId");
       EntityTypeContactInfo entityType = entity.getEntityTypeContactInfos().get(0);
       personDoc.getExternalIdentifiers();
	assertAddressTrue((PersonDocumentAddress)personDoc.getAddrs().get(0), entityType.getAddresses().get(0));
	assertPhoneTrue((PersonDocumentPhone)personDoc.getPhones().get(0), entityType.getPhoneNumbers().get(0));
	assertEmailTrue((PersonDocumentEmail)personDoc.getEmails().get(0), entityType.getEmailAddresses().get(0));
	assertNameTrue((PersonDocumentName)personDoc.getNames().get(0), entity.getNames().get(0));
	//assertPrincipalTrue(personDoc, identity.getPrincipals().get(0));
	assertAffiliationTrue(personDoc.getAffiliations().get(0), entity.getAffiliations().get(0));
	assertEmpInfoTrue(personDoc.getAffiliations().get(0).getEmpInfos().get(0), entity.getEmploymentInformation().get(0));

}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:19,代碼來源:UiDocumentServiceImplTest.java

示例4: loadNames

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
@Override
protected List<PersonDocumentName> loadNames( IdentityManagementPersonDocument personDoc, String principalId, List <EntityName> names, boolean suppressDisplay ) {
	List<PersonDocumentName> docNames = new ArrayList<PersonDocumentName>();
	if(KRADUtils.isNotNull(names)){
		for (EntityName name: names) {
			if(name.isActive()){
				PersonDocumentName docName = new PersonDocumentName();
                   if (name.getNameType() != null) {
				    docName.setNameCode(name.getNameType().getCode());
                   }

				//We do not need to check the privacy setting here - The UI should care of it
				docName.setFirstName(name.getFirstNameUnmasked());
				docName.setLastName(name.getLastNameUnmasked());
				docName.setMiddleName(name.getMiddleNameUnmasked());
				docName.setNamePrefix(name.getNamePrefixUnmasked());
				docName.setNameSuffix(name.getNameSuffixUnmasked());

				docName.setActive(name.isActive());
				docName.setDflt(name.isDefaultValue());
				docName.setEdit(true);
				docName.setEntityNameId(name.getId());
				docNames.add(docName);
			}
		}
	}
	return docNames;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:29,代碼來源:LdapUiDocumentServiceImpl.java

示例5: IdentityManagementPersonDocumentForm

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public IdentityManagementPersonDocumentForm() {
    super();
    //this.registerEditableProperty("methodToCall.approve.x");
    this.setNewAffln(new PersonDocumentAffiliation());
    this.setNewAddress(new PersonDocumentAddress());
    this.setNewEmpInfo(new PersonDocumentEmploymentInfo());
    this.setNewName(new PersonDocumentName());
    this.setNewPhone(new PersonDocumentPhone());
    this.setNewEmail(new PersonDocumentEmail());
    this.setNewGroup(new PersonDocumentGroup());
    this.setNewRole(new PersonDocumentRole());
    this.setNewDelegationMember(new RoleDocumentDelegationMember());
    setFormatterType("document.groups.activeFromDate", DateDisplayTimestampObjectFormatter.class);
    setFormatterType("document.groups.activeToDate", DateDisplayTimestampObjectFormatter.class);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:16,代碼來源:IdentityManagementPersonDocumentForm.java

示例6: addName

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public ActionForward addName(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    IdentityManagementPersonDocumentForm personDocumentForm = (IdentityManagementPersonDocumentForm) form;
    PersonDocumentName newName = personDocumentForm.getNewName();
    newName.setDocumentNumber(personDocumentForm.getDocument().getDocumentNumber());
    personDocumentForm.getPersonDocument().getNames().add(newName);
    personDocumentForm.setNewName(new PersonDocumentName());        
    return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:9,代碼來源:IdentityManagementPersonDocumentAction.java

示例7: loadNames

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
protected List<PersonDocumentName> loadNames( IdentityManagementPersonDocument personDoc, String principalId, List <EntityName> names, boolean suppressDisplay ) {
	List<PersonDocumentName> docNames = new ArrayList<PersonDocumentName>();
	if(ObjectUtils.isNotNull(names)){
		for (EntityName name: names) {
			if(name.isActive()){
				PersonDocumentName docName = new PersonDocumentName();
                   if (name.getNameType() != null) {
				    docName.setNameCode(name.getNameType().getCode());
                   }

				//We do not need to check the privacy setting here - The UI should care of it
				docName.setFirstName(name.getFirstNameUnmasked());
				docName.setLastName(name.getLastNameUnmasked());
				docName.setMiddleName(name.getMiddleNameUnmasked());
				docName.setNamePrefix(name.getNamePrefixUnmasked());
				docName.setNameSuffix(name.getNameSuffixUnmasked());

				docName.setActive(name.isActive());
				docName.setDflt(name.isDefaultValue());
				docName.setEdit(true);
				docName.setEntityNameId(name.getId());
				docNames.add(docName);
			}
		}
	}
	return docNames;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:28,代碼來源:UiDocumentServiceImpl.java

示例8: setupName

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
protected void setupName(IdentityManagementPersonDocument identityManagementPersonDocument, EntityBo kimEntity, List<EntityNameBo> origNames) {
   	if ( !identityManagementPersonDocument.getPrivacy().isSuppressName() ||
   			canOverrideEntityPrivacyPreferences( getInitiatorPrincipalId(identityManagementPersonDocument), identityManagementPersonDocument.getPrincipalId() ) ) {
    	List<EntityNameBo> entityNames = new ArrayList<EntityNameBo>();
		if(CollectionUtils.isNotEmpty(identityManagementPersonDocument.getNames())){
			for (PersonDocumentName name : identityManagementPersonDocument.getNames()) {
			    EntityNameBo entityName = new EntityNameBo();
				entityName.setNameCode(name.getNameCode());
                   if (name.getEntityNameType() != null) {
                       entityName.setNameType(name.getEntityNameType());
                   } else {
                       if (StringUtils.isNotEmpty(name.getNameCode())) {
                           entityName.setNameType(
                                   EntityNameTypeBo.from(getIdentityService().getNameType(name.getNameCode())));
                       }
                   }
				entityName.setFirstName(name.getFirstName());
				entityName.setLastName(name.getLastName());
				entityName.setMiddleName(name.getMiddleName());
				entityName.setNamePrefix(name.getNamePrefix());
				entityName.setNameSuffix(name.getNameSuffix());
				entityName.setActive(name.isActive());
				entityName.setDefaultValue(name.isDflt());
				entityName.setId(name.getEntityNameId());
				entityName.setEntityId(identityManagementPersonDocument.getEntityId());
				if(ObjectUtils.isNotNull(origNames)){
					for (EntityNameBo origName : origNames) {
						if (origName.getId()!=null && StringUtils.equals(origName.getId(), entityName.getId())) {
							entityName.setVersionNumber(origName.getVersionNumber());
						}

					}
				}
				entityNames.add(entityName);
			}
		}
		kimEntity.setNames(entityNames);
   	}
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:40,代碼來源:UiDocumentServiceImpl.java

示例9: IdentityManagementPersonDocument

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public IdentityManagementPersonDocument() {
    affiliations = new ArrayList<PersonDocumentAffiliation>();
    citizenships = new ArrayList<PersonDocumentCitizenship>();
    // employmentInformations = new ArrayList<DocEmploymentInfo>();                       
    names = new ArrayList<PersonDocumentName>();
    addrs = new ArrayList<PersonDocumentAddress>();
    phones = new ArrayList<PersonDocumentPhone>();
    emails = new ArrayList<PersonDocumentEmail>();
    groups = new ArrayList<PersonDocumentGroup>();
    roles = new ArrayList<PersonDocumentRole>();
    privacy = new PersonDocumentPrivacy();
    this.active = true;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:14,代碼來源:IdentityManagementPersonDocument.java

示例10: assertNameTrue

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
private void assertNameTrue(PersonDocumentName docName, EntityNameContract entityName) {
	assertEquals(docName.getEntityNameId(), entityName.getId());
	assertEquals(docName.getFirstName(), entityName.getFirstName());
	assertEquals(docName.getLastName(), entityName.getLastName());
	assertEquals(docName.getNameCode(), entityName.getNameType().getCode());
	assertEquals(docName.getNameSuffix(), entityName.getNameSuffix());
	assertEquals(docName.getNamePrefix(), entityName.getNamePrefix());
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:9,代碼來源:UiDocumentServiceImplTest.java

示例11: IdentityManagementPersonDocument

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public IdentityManagementPersonDocument() {
    affiliations = new ArrayList<PersonDocumentAffiliation>();
    citizenships = new ArrayList<PersonDocumentCitizenship>();
    // employmentInformations = new ArrayList<DocEmploymentInfo>();
    names = new ArrayList<PersonDocumentName>();
    addrs = new ArrayList<PersonDocumentAddress>();
    phones = new ArrayList<PersonDocumentPhone>();
    emails = new ArrayList<PersonDocumentEmail>();
    groups = new ArrayList<PersonDocumentGroup>();
    roles = new ArrayList<PersonDocumentRole>();
    privacy = new PersonDocumentPrivacy();
    this.active = true;
    // privacy.setDocumentNumber(documentNumber);
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:15,代碼來源:IdentityManagementPersonDocument.java

示例12: getNewName

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public PersonDocumentName getNewName() {
	return this.newName;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:4,代碼來源:IdentityManagementPersonDocumentForm.java

示例13: setNewName

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public void setNewName(PersonDocumentName newName) {
	this.newName = newName;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:4,代碼來源:IdentityManagementPersonDocumentForm.java

示例14: getNames

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public List<PersonDocumentName> getNames() {
    return this.names;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:4,代碼來源:IdentityManagementPersonDocument.java

示例15: setNames

import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public void setNames(List<PersonDocumentName> names) {
    this.names = names;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:4,代碼來源:IdentityManagementPersonDocument.java


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