Search in sources :

Example 1 with AppRegistrationResponse

use of com.khartec.waltz.model.application.AppRegistrationResponse in project waltz by khartec.

the class ApplicationService method registerApp.

public AppRegistrationResponse registerApp(AppRegistrationRequest request, String username) {
    checkNotEmpty(request.name(), "Cannot register app with no name");
    AppRegistrationResponse response = applicationDao.registerApp(request);
    if (response.registered()) {
        EntityReference entityReference = ImmutableEntityReference.builder().id(response.id().get()).kind(EntityKind.APPLICATION).build();
        entityAliasDao.updateAliases(entityReference, request.aliases());
        entityTagDao.updateTags(entityReference, request.tags(), username);
    }
    return response;
}
Also used : AppRegistrationResponse(com.khartec.waltz.model.application.AppRegistrationResponse) ImmutableEntityReference(com.khartec.waltz.model.ImmutableEntityReference) EntityReference(com.khartec.waltz.model.EntityReference)

Aggregations

EntityReference (com.khartec.waltz.model.EntityReference)1 ImmutableEntityReference (com.khartec.waltz.model.ImmutableEntityReference)1 AppRegistrationResponse (com.khartec.waltz.model.application.AppRegistrationResponse)1