001/*
002 * (C) Copyright 2015 Nuxeo SA (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl-2.1.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     <a href="mailto:grenard@nuxeo.com">Guillaume Renard</a>
016 *
017 */
018
019package org.nuxeo.elasticsearch.http.readonly.service;
020
021import org.apache.commons.logging.Log;
022import org.apache.commons.logging.LogFactory;
023import org.nuxeo.common.xmap.annotation.XNode;
024import org.nuxeo.common.xmap.annotation.XObject;
025
026/**
027 * @since 7.4
028 */
029@XObject("requestFilter")
030public class RequestFilterDescriptor {
031
032    private static final Log log = LogFactory.getLog(RequestFilterDescriptor.class);
033
034    @XNode("@index")
035    String index;
036
037    @XNode("@filterClass")
038    private Class filterClass;
039
040    public RequestFilterDescriptor() {
041    }
042
043    public RequestFilterDescriptor(String index, Class filterClass) {
044        super();
045        this.index = index;
046        this.filterClass = filterClass;
047    }
048
049    public Class getFilterClass() {
050        return filterClass;
051    }
052
053    public String getIndex() {
054        return index;
055    }
056
057    public void setFilterClass(Class filterClass) {
058        this.filterClass = filterClass;
059    }
060
061    public void setIndex(String index) {
062        this.index = index;
063    }
064
065}