blob: c7b85056cbd1b045e2a0135a82c0ee5c39ecf128 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.container.http.xml;
import com.yahoo.component.chain.model.ChainSpecification;
import com.yahoo.config.model.producer.AbstractConfigProducer;
import com.yahoo.vespa.model.builder.xml.dom.chains.DomChainBuilderBase;
import com.yahoo.vespa.model.container.component.chain.Chain;
import com.yahoo.vespa.model.container.http.Filter;
import org.w3c.dom.Element;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import static com.yahoo.vespa.model.builder.xml.dom.chains.ComponentsBuilder.ComponentType;
/**
* @author tonytv
*/
public class FilterChainBuilder extends DomChainBuilderBase<Filter, Chain<Filter>> {
private static Collection<ComponentType<Filter>> allowedComponentTypes = Collections.singleton(ComponentType.filter);
public FilterChainBuilder(Map<String, ComponentType> outerFilterTypeByComponentName) {
super(allowedComponentTypes, outerFilterTypeByComponentName);
}
@Override
protected Chain<Filter> buildChain(AbstractConfigProducer ancestor, Element producerSpec, ChainSpecification specWithoutInnerComponents) {
return new Chain<>(specWithoutInnerComponents);
}
}
|