1 13 package org.ejbca.core.model.ra.userdatasource; 14 15 import java.io.Serializable ; 16 import java.util.Set ; 17 18 import org.ejbca.core.model.ra.UserDataVO; 19 import org.ejbca.util.dn.DNFieldExtractor; 20 21 22 33 34 public class UserDataSourceVO implements Serializable { 35 36 39 public static final int ISMODIFYABLE_USERNAME = 101; 40 public static final int ISMODIFYABLE_PASSWORD = 102; 41 public static final int ISMODIFYABLE_CAID = 103; 42 public static final int ISMODIFYABLE_EMAILDATA = 104; 43 public static final int ISMODIFYABLE_TYPE = 105; 44 public static final int ISMODIFYABLE_ENDENTITYPROFILE = 106; 45 public static final int ISMODIFYABLE_CERTIFICATEPROFILE = 107; 46 public static final int ISMODIFYABLE_TOKENTYPE = 108; 47 public static final int ISMODIFYABLE_HARDTOKENISSUER = 109; 48 49 public static final int[] AVAILABLEMODIFYABLEFIELDS = { 50 ISMODIFYABLE_USERNAME , ISMODIFYABLE_PASSWORD , ISMODIFYABLE_CAID , ISMODIFYABLE_EMAILDATA , 51 ISMODIFYABLE_TYPE , ISMODIFYABLE_ENDENTITYPROFILE , ISMODIFYABLE_CERTIFICATEPROFILE , ISMODIFYABLE_TOKENTYPE , ISMODIFYABLE_HARDTOKENISSUER, 52 DNFieldExtractor.UID , DNFieldExtractor.CN , DNFieldExtractor.SN , 53 DNFieldExtractor.GIVENNAME , DNFieldExtractor.INITIALS , DNFieldExtractor.SURNAME , DNFieldExtractor.T , 54 DNFieldExtractor.OU , DNFieldExtractor.O , DNFieldExtractor.L , DNFieldExtractor.ST , 55 DNFieldExtractor.DC , DNFieldExtractor.C , DNFieldExtractor.UNSTRUCTUREDADDRESS , DNFieldExtractor.UNSTRUCTUREDNAME , 56 DNFieldExtractor.DNSNAME , DNFieldExtractor.IPADDRESS , 57 DNFieldExtractor.DIRECTORYNAME, DNFieldExtractor.URI , 58 DNFieldExtractor.UPN , DNFieldExtractor.GUID , 59 DNFieldExtractor.DATEOFBIRTH , DNFieldExtractor.PLACEOFBIRTH , DNFieldExtractor.GENDER , DNFieldExtractor.COUNTRYOFCITIZENSHIP , 60 DNFieldExtractor.COUNTRYOFRESIDENCE 61 }; 62 63 private UserDataVO userDataVO = null; 64 private Set isModifyableSet = null; 65 66 70 public UserDataSourceVO(UserDataVO userDataVO) { 71 super(); 72 this.userDataVO = userDataVO; 73 } 74 75 79 void setIsModifyableSet(Set isModifyableSet){ 80 this.isModifyableSet = isModifyableSet; 81 } 82 83 86 public UserDataVO getUserDataVO(){ 87 return userDataVO; 88 } 89 90 97 public boolean isFieldModifyable(int field){ 98 return isModifyableSet.contains(new Integer (field)); 99 } 100 101 } 102 | Popular Tags |