001/*
002 * The contents of this file are subject to the license and copyright
003 * detailed in the LICENSE and NOTICE files at the root of the source
004 * tree.
005 */
006package org.fcrepo.http.commons.webxml.bind;
007
008import static java.util.Collections.emptyList;
009
010import java.util.List;
011
012import javax.xml.bind.annotation.XmlElement;
013import javax.xml.bind.annotation.XmlElements;
014
015/**
016 * <p>Filter class.</p>
017 *
018 * @author awoods
019 */
020public class Filter extends Displayable {
021
022    @XmlElements(value = {@XmlElement(
023            namespace = "http://java.sun.com/xml/ns/javaee",
024            name = "init-param")})
025    List<InitParam> initParams;
026
027    @XmlElements(value = {@XmlElement(
028            namespace = "http://java.sun.com/xml/ns/javaee",
029            name = "filter-name")})
030    String filterName;
031
032    @XmlElements(value = {@XmlElement(
033            namespace = "http://java.sun.com/xml/ns/javaee",
034            name = "filter-class")})
035    String filterClass;
036
037    public String filterName() {
038        return this.filterName;
039    }
040
041    public String filterClass() {
042        return this.filterClass;
043    }
044
045    public List<InitParam> initParams() {
046        if (initParams != null) {
047            return initParams;
048        }
049        return emptyList();
050    }
051
052}