@Override
        public void doBuild(AdminModel model, Element adminElement, ConfigModelContext modelContext) {
            // admin v4 is used on hosted: Build a default V4 instead. We want to allow version 2.0 so
            // that self-hosted apps deploy without changes. TODO: Warn if tags from version 2.0 are used (and ignored)
            if (modelContext.getDeployState().isHosted()) {
                new BuilderV4().doBuild(model, adminElement, modelContext);
                return;
            }
            TreeConfigProducer<AnyConfigProducer> parent = modelContext.getParentProducer();
            ModelContext.Properties properties = modelContext.getDeployState().getProperties();
            DomAdminV2Builder domBuilder = new DomAdminV2Builder(modelContext,
                                                                 properties.multitenant(),
                                                                 properties.configServerSpecs());
            model.admin = domBuilder.build(modelContext.getDeployState(), parent, adminElement);

            // TODO: Is required since other models depend on admin.
            if (parent instanceof ApplicationConfigProducerRoot) {
                ((ApplicationConfigProducerRoot)parent).setupAdmin(model.admin);
            }
        }
Constructs a new config model given a context.

@param modelContext the model context.
config-model/src/main/java/com/yahoo/config/model/admin/AdminModel.java