/*
 * oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
 *
 * Copyright (c) 2014, Gluu
 */

package org.gluu.oxauth.model.fido.u2f;

import java.util.HashMap;
import java.util.Map;

import org.gluu.persist.annotation.AttributeEnum;

/**
 * Device registration types
 * 
 * @author Yuriy Movchan Date: 06/02/2015
 */
public enum DeviceRegistrationStatus implements AttributeEnum {

    ACTIVE("active", "Active device registration"),
	COMPROMISED("compromised", "Compromised device registration");

    private final String value;
	private final String displayName;

	private static Map<String, DeviceRegistrationStatus> mapByValues = new HashMap<String, DeviceRegistrationStatus>();

	static {
		for (DeviceRegistrationStatus enumType : values()) {
			mapByValues.put(enumType.getValue(), enumType);
		}
	}

    private DeviceRegistrationStatus(String value, String displayName) {
        this.value = value;
        this.displayName = displayName;
    }

    public static DeviceRegistrationStatus fromString(String param) {
    	return getByValue(param);
    }

	@Override
	public String getValue() {
		return value;
	}

	/**
     * Gets display name
     *
     * @return display name name
     */
    public String getDisplayName() {
		return displayName;
	}

	public static DeviceRegistrationStatus getByValue(String value) {
		return mapByValues.get(value);
	}

	public Enum<? extends AttributeEnum> resolveByValue(String value) {
		return getByValue(value);
	}

    @Override
    public String toString() {
        return value;
    }

}
@@ -427,16 +427,81 @@
 eEnum %7B%0A
+%09//TODO: remove this class and reuse the one found in fido2-model
 %0A    ACT
@@ -607,16 +607,60 @@
 ration%22)
+,%0A%09MIGRATED(%22migrated%22, %22Migrated to Fido2%22)
 ;%0A%0A    p

Add missing enum value