use of com.yahoo.config.provision.ApplicationName in project vespa by vespa-engine.
the class ApplicationHandler method createFromRequestSimpleAppId.
// The URL pattern with only tenant and application given
private static ApplicationId createFromRequestSimpleAppId(BindingMatch<?> bm) {
TenantName tenant = TenantName.from(bm.group(2));
ApplicationName application = ApplicationName.from(bm.group(3));
return new ApplicationId.Builder().tenant(tenant).applicationName(application).build();
}
use of com.yahoo.config.provision.ApplicationName in project vespa by vespa-engine.
the class HttpConfigRequest method createFromRequestV2SimpleAppId.
// The URL pattern with only tenant and application given
private static HttpConfigRequest createFromRequestV2SimpleAppId(HttpRequest req, BindingMatch<?> bm) {
String cId;
String cName;
String cNamespace;
TenantName tenant = TenantName.from(bm.group(2));
ApplicationName application = ApplicationName.from(bm.group(3));
String conf = bm.group(4);
if (bm.groupCount() >= 6) {
cId = bm.group(5);
} else {
cId = "";
}
Tuple2<String, String> nns = nameAndNamespace(conf);
cName = nns.first;
cNamespace = nns.second;
return new HttpConfigRequest(new ConfigKey<>(cName, cId, cNamespace), new ApplicationId.Builder().applicationName(application).tenant(tenant).build(), req.getBooleanProperty(HTTP_PROPERTY_NOCACHE));
}
use of com.yahoo.config.provision.ApplicationName in project vespa by vespa-engine.
the class HttpListConfigsRequest method createFromListRequestSimpleAppId.
private static HttpListConfigsRequest createFromListRequestSimpleAppId(HttpRequest req, BindingMatch<?> bm) {
TenantName tenant = TenantName.from(bm.group(2));
ApplicationName application = ApplicationName.from(bm.group(3));
return new HttpListConfigsRequest(null, new ApplicationId.Builder().tenant(tenant).applicationName(application).build(), req.getBooleanProperty(HttpConfigRequests.RECURSIVE_QUERY_PROPERTY), false);
}
use of com.yahoo.config.provision.ApplicationName in project vespa by vespa-engine.
the class HttpListConfigsRequest method createFromNamedListRequestSimpleAppId.
private static HttpListConfigsRequest createFromNamedListRequestSimpleAppId(HttpRequest req, BindingMatch<?> bm) {
TenantName tenant = TenantName.from(bm.group(2));
ApplicationName application = ApplicationName.from(bm.group(3));
String conf = bm.group(4);
String cId;
String cName;
String cNamespace;
if (bm.groupCount() >= 6) {
cId = bm.group(5);
} else {
cId = "";
}
Tuple2<String, String> nns = HttpConfigRequest.nameAndNamespace(conf);
cName = nns.first;
cNamespace = nns.second;
ConfigKey<?> key = new ConfigKey<>(cName, cId, cNamespace);
return new HttpListConfigsRequest(key, new ApplicationId.Builder().tenant(tenant).applicationName(application).build(), req.getBooleanProperty(HttpConfigRequests.RECURSIVE_QUERY_PROPERTY), false);
}
Aggregations