- throws IllegalArgumentException {
- if (policyName == null)
- throw new IllegalArgumentException("Unsupported NULL policy name conversion");
-
- if (policyName.startsWith("Config_Fault")) {
- return PolicyIndexType.closedloop;
- } else if (policyName.startsWith("Config_PM")) {
- return PolicyIndexType.closedloop;
- } else if (policyName.startsWith("Config_FW")) {
- return PolicyIndexType.config;
- } else if (policyName.startsWith("Config_MS")) {
- return PolicyIndexType.config;
- }else if (policyName.startsWith("Action")) {
- return PolicyIndexType.action;
- } else if (policyName.startsWith("Decision")) {
- return PolicyIndexType.decision;
- } else if (policyName.startsWith("Config")) {
- return PolicyIndexType.config;
- } else {
- throw new IllegalArgumentException
- ("Unsupported policy name conversion to index: " +
- policyName);
- }
- }
-
- public static PolicyType toPolicyType(String policyName)
- throws IllegalArgumentException {