| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.kim.ldap; |
| 17 | |
|
| 18 | |
import org.springframework.ldap.core.ContextMapper; |
| 19 | |
import org.springframework.ldap.core.DirContextOperations; |
| 20 | |
import org.springframework.ldap.core.support.AbstractContextMapper; |
| 21 | |
|
| 22 | |
import org.kuali.rice.kim.api.identity.address.EntityAddress; |
| 23 | |
import org.kuali.rice.kim.api.identity.email.EntityEmail; |
| 24 | |
import org.kuali.rice.kim.api.identity.type.EntityTypeContactInfo; |
| 25 | |
import org.kuali.rice.kim.api.identity.type.EntityTypeContactInfoDefault; |
| 26 | |
import org.kuali.rice.kim.util.Constants; |
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | 0 | public class EntityTypeContactInfoDefaultMapper extends AbstractContextMapper { |
| 33 | |
private Constants constants; |
| 34 | |
|
| 35 | |
private EntityAddressMapper addressMapper; |
| 36 | |
private EntityPhoneMapper phoneMapper; |
| 37 | |
private EntityEmailMapper emailMapper; |
| 38 | |
|
| 39 | |
public EntityTypeContactInfoDefault.Builder mapFromContext(DirContextOperations context) { |
| 40 | 0 | return (EntityTypeContactInfoDefault.Builder) doMapFromContext(context); |
| 41 | |
} |
| 42 | |
|
| 43 | |
public Object doMapFromContext(DirContextOperations context) { |
| 44 | 0 | final EntityTypeContactInfoDefault.Builder retval = EntityTypeContactInfoDefault.Builder.create(); |
| 45 | |
|
| 46 | 0 | retval.setDefaultAddress(getAddressMapper().mapFromContext(context)); |
| 47 | 0 | retval.setDefaultPhoneNumber(getPhoneMapper().mapFromContext(context)); |
| 48 | 0 | retval.setDefaultEmailAddress(getEmailMapper().mapFromContext(context)); |
| 49 | 0 | retval.setEntityTypeCode(getConstants().getPersonEntityTypeCode()); |
| 50 | |
|
| 51 | |
|
| 52 | 0 | return retval; |
| 53 | |
} |
| 54 | |
|
| 55 | |
|
| 56 | |
|
| 57 | |
|
| 58 | |
|
| 59 | |
|
| 60 | |
public final Constants getConstants() { |
| 61 | 0 | return this.constants; |
| 62 | |
} |
| 63 | |
|
| 64 | |
|
| 65 | |
|
| 66 | |
|
| 67 | |
|
| 68 | |
|
| 69 | |
public final void setConstants(final Constants argConstants) { |
| 70 | 0 | this.constants = argConstants; |
| 71 | 0 | } |
| 72 | |
|
| 73 | |
|
| 74 | |
|
| 75 | |
|
| 76 | |
|
| 77 | |
public final EntityAddressMapper getAddressMapper() { |
| 78 | 0 | return this.addressMapper; |
| 79 | |
} |
| 80 | |
|
| 81 | |
|
| 82 | |
|
| 83 | |
|
| 84 | |
|
| 85 | |
|
| 86 | |
public final void setAddressMapper(final EntityAddressMapper argAddressMapper) { |
| 87 | 0 | this.addressMapper = argAddressMapper; |
| 88 | 0 | } |
| 89 | |
|
| 90 | |
|
| 91 | |
|
| 92 | |
|
| 93 | |
|
| 94 | |
|
| 95 | |
public final EntityPhoneMapper getPhoneMapper() { |
| 96 | 0 | return this.phoneMapper; |
| 97 | |
} |
| 98 | |
|
| 99 | |
|
| 100 | |
|
| 101 | |
|
| 102 | |
|
| 103 | |
|
| 104 | |
public final void setPhoneMapper(final EntityPhoneMapper argPhoneMapper) { |
| 105 | 0 | this.phoneMapper = argPhoneMapper; |
| 106 | 0 | } |
| 107 | |
|
| 108 | |
|
| 109 | |
|
| 110 | |
|
| 111 | |
|
| 112 | |
|
| 113 | |
public final EntityEmailMapper getEmailMapper() { |
| 114 | 0 | return this.emailMapper; |
| 115 | |
} |
| 116 | |
|
| 117 | |
|
| 118 | |
|
| 119 | |
|
| 120 | |
|
| 121 | |
|
| 122 | |
public final void setEmailMapper(final EntityEmailMapper argEmailMapper) { |
| 123 | 0 | this.emailMapper = argEmailMapper; |
| 124 | 0 | } |
| 125 | |
} |