Search in sources :

Example 1 with KeyValueTag

use of io.apiman.manager.api.beans.apis.KeyValueTag in project apiman by apiman.

the class ApiService method addTag.

/**
 * Tag an API
 */
public void addTag(@NotNull String orgId, @NotNull String apiId, @NotNull KeyValueTagDto tagDto) {
    var kvTag = new KeyValueTag().setKey(tagDto.getKey()).setValue(tagDto.getValue());
    ApiBean api = tryAction(() -> storage.getApi(orgId, apiId));
    api.addTag(kvTag);
    tryAction(() -> storage.updateApi(api));
}
Also used : UpdateApiBean(io.apiman.manager.api.beans.apis.UpdateApiBean) ApiBean(io.apiman.manager.api.beans.apis.ApiBean) NewApiBean(io.apiman.manager.api.beans.apis.NewApiBean) KeyValueTag(io.apiman.manager.api.beans.apis.KeyValueTag)

Aggregations

ApiBean (io.apiman.manager.api.beans.apis.ApiBean)1 KeyValueTag (io.apiman.manager.api.beans.apis.KeyValueTag)1 NewApiBean (io.apiman.manager.api.beans.apis.NewApiBean)1 UpdateApiBean (io.apiman.manager.api.beans.apis.UpdateApiBean)1