本文整理匯總了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;
}
示例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;
}
示例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));
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
}
示例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;
}
示例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());
}
示例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);
}
示例12: getNewName
import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public PersonDocumentName getNewName() {
return this.newName;
}
示例13: setNewName
import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public void setNewName(PersonDocumentName newName) {
this.newName = newName;
}
示例14: getNames
import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public List<PersonDocumentName> getNames() {
return this.names;
}
示例15: setNames
import org.kuali.rice.kim.bo.ui.PersonDocumentName; //導入依賴的package包/類
public void setNames(List<PersonDocumentName> names) {
this.names = names;
}