summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/vespa/model/builder/VespaModelBuilder.java
blob: d1062b9dfb5981e0fc160c3c7c7e0a17afc8e905 (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
// 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.builder;

import com.yahoo.config.application.api.DeployLogger;
import com.yahoo.config.model.ConfigModelRepo;
import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.model.producer.AbstractConfigProducer;
import com.yahoo.config.model.ApplicationConfigProducerRoot;
import com.yahoo.vespa.model.generic.service.ServiceCluster;

import java.util.List;

/**
 * Base class for classes capable of building vespa model.
 *
 * @author Vegard Havdal
 */
public abstract class VespaModelBuilder {

    public abstract ApplicationConfigProducerRoot getRoot(String name, DeployState deployState, AbstractConfigProducer parent);
    public abstract List<ServiceCluster> getClusters(DeployState pkg, AbstractConfigProducer parent);

    /**
     * Processing that requires access across plugins
     *
     * @param producerRoot the root producer.
     * @param configModelRepo a {@link com.yahoo.config.model.ConfigModelRepo instance}
     */
    public abstract void postProc(DeployLogger deployLogger, AbstractConfigProducer producerRoot, ConfigModelRepo configModelRepo);

}