001/*
002 * (C) Copyright 2015 Nuxeo SA (http://nuxeo.com/) and others.
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 *
016 * Contributors:
017 *     <a href="mailto:grenard@nuxeo.com">Guillaume Renard</a>
018 *
019 */
020
021package org.nuxeo.elasticsearch.http.readonly.service;
022
023import org.apache.commons.logging.Log;
024import org.apache.commons.logging.LogFactory;
025import org.nuxeo.common.xmap.annotation.XNode;
026import org.nuxeo.common.xmap.annotation.XObject;
027
028/**
029 * @since 7.4
030 */
031@XObject("requestFilter")
032public class RequestFilterDescriptor {
033
034    private static final Log log = LogFactory.getLog(RequestFilterDescriptor.class);
035
036    @XNode("@index")
037    String index;
038
039    @XNode("@filterClass")
040    private Class filterClass;
041
042    public RequestFilterDescriptor() {
043    }
044
045    public RequestFilterDescriptor(String index, Class filterClass) {
046        super();
047        this.index = index;
048        this.filterClass = filterClass;
049    }
050
051    public Class getFilterClass() {
052        return filterClass;
053    }
054
055    public String getIndex() {
056        return index;
057    }
058
059    public void setFilterClass(Class filterClass) {
060        this.filterClass = filterClass;
061    }
062
063    public void setIndex(String index) {
064        this.index = index;
065    }
066
067}