| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.kew.api.action; |
| 17 | |
|
| 18 | |
import javax.xml.bind.annotation.XmlEnum; |
| 19 | |
import javax.xml.bind.annotation.XmlEnumValue; |
| 20 | |
import javax.xml.bind.annotation.XmlRootElement; |
| 21 | |
import javax.xml.bind.annotation.XmlType; |
| 22 | |
|
| 23 | |
import org.kuali.rice.core.api.mo.common.Coded; |
| 24 | |
|
| 25 | 0 | @XmlRootElement(name = "actionRequestType") |
| 26 | |
@XmlType(name = "ActionRequestTypeType") |
| 27 | |
@XmlEnum |
| 28 | |
public enum ActionRequestType implements Coded { |
| 29 | |
|
| 30 | 0 | @XmlEnumValue("C") COMPLETE("C"), |
| 31 | 0 | @XmlEnumValue("A") APPROVE("A"), |
| 32 | 0 | @XmlEnumValue("K") ACKNOWLEDGE("K"), |
| 33 | 0 | @XmlEnumValue("F") FYI("F"); |
| 34 | |
|
| 35 | |
private final String code; |
| 36 | |
|
| 37 | 0 | ActionRequestType(String code) { |
| 38 | 0 | this.code = code; |
| 39 | 0 | } |
| 40 | |
|
| 41 | |
@Override |
| 42 | |
public String getCode() { |
| 43 | 0 | return code; |
| 44 | |
} |
| 45 | |
|
| 46 | |
public String getLabel() { |
| 47 | 0 | return name(); |
| 48 | |
} |
| 49 | |
|
| 50 | |
public static ActionRequestType fromCode(String code) { |
| 51 | 0 | if (code == null) { |
| 52 | 0 | return null; |
| 53 | |
} |
| 54 | 0 | for (ActionRequestType request : values()) { |
| 55 | 0 | if (request.code.equals(code)) { |
| 56 | 0 | return request; |
| 57 | |
} |
| 58 | |
} |
| 59 | 0 | throw new IllegalArgumentException("Failed to locate the ActionRequestType with the given code: " + code); |
| 60 | |
} |
| 61 | |
|
| 62 | |
} |