| 1 | |
package org.kuali.student.common.ui.shared; |
| 2 | |
|
| 3 | |
import org.kuali.student.common.rice.StudentIdentityConstants; |
| 4 | |
|
| 5 | 0 | public class IdAttributes { |
| 6 | |
|
| 7 | |
public static final String ID_TYPE = "ID_TYPE"; |
| 8 | |
|
| 9 | 0 | public enum IdType { |
| 10 | |
|
| 11 | 0 | KS_KEW_OBJECT_ID(StudentIdentityConstants.QUALIFICATION_KEW_OBJECT_ID), DOCUMENT_ID(StudentIdentityConstants.DOCUMENT_NUMBER), OBJECT_ID("objectId"), COPY_OF_OBJECT_ID("copyOfObjectId"), COPY_OF_KS_KEW_OBJECT_ID("copyOfKualiStudentObjectWorkflowId"); |
| 12 | |
|
| 13 | |
final String stringValue; |
| 14 | |
|
| 15 | 0 | private IdType(String value) { |
| 16 | 0 | this.stringValue = value; |
| 17 | 0 | } |
| 18 | |
|
| 19 | |
public String toString() { |
| 20 | 0 | return stringValue; |
| 21 | |
} |
| 22 | |
|
| 23 | |
public static IdType fromString(String name) { |
| 24 | 0 | for (IdType idTypeEnum : values()) { |
| 25 | 0 | if (name.equals(idTypeEnum.toString())) { |
| 26 | 0 | return idTypeEnum; |
| 27 | |
} |
| 28 | |
} |
| 29 | 0 | return null; |
| 30 | |
} |
| 31 | |
} |
| 32 | |
} |