@@ -0,0 +1,3053 @@
+package com.yahoo.vespa.hosted.controller.application;%0A%0Aimport com.yahoo.config.provision.ApplicationId;%0Aimport com.yahoo.config.provision.ApplicationName;%0Aimport com.yahoo.config.provision.InstanceName;%0Aimport com.yahoo.config.provision.TenantName;%0A%0Aimport java.util.Objects;%0A%0A/**%0A * Tenant and application name pair.%0A *%0A * TODO jonmv: rename to ApplicationId if ApplicationId is renamed.%0A */%0Apublic class TenantAndApplicationId implements Comparable%3CTenantAndApplicationId%3E %7B%0A%0A    private final TenantName tenant;%0A    private final ApplicationName application;%0A%0A    private TenantAndApplicationId(TenantName tenant, ApplicationName application) %7B%0A        requireNonBlank(tenant.value(), %22Tenant name%22);%0A        requireNonBlank(application.value(), %22Application name%22);%0A        this.tenant = tenant;%0A        this.application = application;%0A    %7D%0A%0A    public static TenantAndApplicationId from(TenantName tenant, ApplicationName application) %7B%0A        return new TenantAndApplicationId(tenant, application);%0A    %7D%0A%0A    public static TenantAndApplicationId from(String tenant, String application) %7B%0A        return from(TenantName.from(tenant), ApplicationName.from(application));%0A    %7D%0A%0A    public static TenantAndApplicationId fromSerialized(String value) %7B%0A        String%5B%5D parts = value.split(%22:%22);%0A        if (parts.length != 2)%0A            throw new IllegalArgumentException(%22Serialized value should be '%3Ctenant%3E:%3Capplication%3E', but was '%22 + value + %22'%22);%0A%0A        return from(parts%5B0%5D, parts%5B1%5D);%0A    %7D%0A%0A    public static TenantAndApplicationId from(ApplicationId id) %7B%0A        return from(id.tenant(), id.application());%0A    %7D%0A%0A    public ApplicationId defaultInstance() %7B%0A        return ApplicationId.from(tenant, application, InstanceName.defaultName());%0A    %7D%0A%0A    public String serialized() %7B%0A        return tenant.value() + %22:%22 + application.value();%0A    %7D%0A%0A    public TenantName tenant() %7B%0A        return tenant;%0A    %7D%0A%0A    public ApplicationName application() %7B%0A        return application;%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object other) %7B%0A        if (this == other) return true;%0A        if (other == null %7C%7C getClass() != other.getClass()) return false;%0A        TenantAndApplicationId that = (TenantAndApplicationId) other;%0A        return tenant.equals(that.tenant) &&%0A               application.equals(that.application);%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return Objects.hash(tenant, application);%0A    %7D%0A%0A    @Override%0A    public int compareTo(TenantAndApplicationId other) %7B%0A        int tenantComparison = tenant.compareTo(other.tenant);%0A        return tenantComparison != 0 ? tenantComparison : application.compareTo(other.application);%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return tenant.value() + %22.%22 + application.value();%0A    %7D%0A%0A    private static void requireNonBlank(String value, String name) %7B%0A        Objects.requireNonNull(value, name + %22 cannot be null%22);%0A        if (name.isBlank())%0A            throw new IllegalArgumentException(name + %22 cannot be blank%22);%0A    %7D%0A%0A%7D%0A

Add TenantAndApplicationId for controller tenant.app references