001/** 002 * Copyright 2015 DuraSpace, Inc. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.fcrepo.http.commons.webxml.bind; 017 018import static java.util.Collections.emptyList; 019 020import java.util.List; 021 022import javax.xml.bind.annotation.XmlElement; 023import javax.xml.bind.annotation.XmlElements; 024 025/** 026 * <p>Filter class.</p> 027 * 028 * @author awoods 029 */ 030public class Filter extends Displayable { 031 032 @XmlElements(value = {@XmlElement( 033 namespace = "http://java.sun.com/xml/ns/javaee", 034 name = "init-param")}) 035 List<InitParam> initParams; 036 037 @XmlElements(value = {@XmlElement( 038 namespace = "http://java.sun.com/xml/ns/javaee", 039 name = "filter-name")}) 040 String filterName; 041 042 @XmlElements(value = {@XmlElement( 043 namespace = "http://java.sun.com/xml/ns/javaee", 044 name = "filter-class")}) 045 String filterClass; 046 047 public String filterName() { 048 return this.filterName; 049 } 050 051 public String filterClass() { 052 return this.filterClass; 053 } 054 055 public List<InitParam> initParams() { 056 if (initParams != null) { 057 return initParams; 058 } 059 return emptyList(); 060 } 061 062}