1 package org.kuali.common.util.log.log4j.jaxb; 2 3 import javax.xml.bind.annotation.adapters.XmlAdapter; 4 5 import org.kuali.common.util.log.log4j.model.Debug; 6 7 public class DebugAdapter extends XmlAdapter<String, Debug> { 8 9 @Override 10 public final String marshal(Debug value) { 11 if (Debug.DEFAULT_VALUE.equals(value)) { 12 return null; 13 } else { 14 return value.name().toLowerCase(); 15 } 16 } 17 18 @Override 19 public final Debug unmarshal(String value) { 20 if (value == null) { 21 return Debug.DEFAULT_VALUE; 22 } else { 23 return Debug.valueOf(value.toUpperCase()); 24 } 25 } 26 27 }