001package org.kuali.common.util.log4j.model;
002
003import java.util.ArrayList;
004import java.util.Arrays;
005import java.util.List;
006
007import javax.xml.bind.annotation.XmlAttribute;
008import javax.xml.bind.annotation.XmlElement;
009
010import org.kuali.common.util.CollectionUtils;
011
012/**
013 * @deprecated
014 */
015@Deprecated
016public class Logger {
017
018        public static final Boolean DEFAULT_ADDITIVITY_VALUE = true;
019
020        Boolean additivity = DEFAULT_ADDITIVITY_VALUE;
021        String name;
022        List<AppenderRef> references = new ArrayList<AppenderRef>();
023        Level level;
024
025        public Logger() {
026                this((String) null);
027        }
028
029        public Logger(List<AppenderRef> references) {
030                this(null, references);
031        }
032
033        public Logger(AppenderRef reference, Level level) {
034                this(Arrays.asList(reference), level);
035        }
036
037        public Logger(List<AppenderRef> references, Level level) {
038                this(null, references, level);
039        }
040
041        public Logger(String name) {
042                this(name, (Level) null);
043        }
044
045        public Logger(String name, Level level) {
046                this(name, null, level);
047        }
048
049        public Logger(String name, List<AppenderRef> references) {
050                this(name, references, null);
051        }
052
053        public Logger(String name, List<AppenderRef> references, Level level) {
054                super();
055                this.name = name;
056                this.references = references;
057                this.level = level;
058        }
059
060        public Logger(Logger logger) {
061                super();
062                this.additivity = logger.getAdditivity();
063                this.name = logger.getName();
064                this.level = logger.getLevel();
065                for (AppenderRef reference : CollectionUtils.toEmptyList(logger.getReferences())) {
066                        this.references.add(new AppenderRef(reference));
067                }
068        }
069
070        @XmlElement(name = "appender-ref")
071        public List<AppenderRef> getReferences() {
072                return references;
073        }
074
075        @XmlAttribute
076        public Boolean getAdditivity() {
077                return additivity;
078        }
079
080        @XmlAttribute
081        public String getName() {
082                return name;
083        }
084
085        public void setAdditivity(Boolean additivity) {
086                this.additivity = additivity;
087        }
088
089        public void setName(String name) {
090                this.name = name;
091        }
092
093        public void setReferences(List<AppenderRef> references) {
094                this.references = references;
095        }
096
097        public Level getLevel() {
098                return level;
099        }
100
101        public void setLevel(Level level) {
102                this.level = level;
103        }
104
105}