use of org.finos.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());
tagService.updateTags(entityReference, request.tags(), username);
}
return response;
}
use of org.finos.waltz.model.application.AppRegistrationResponse in project waltz by khartec.
the class EndUserAppService method promoteToApplication.
public AppRegistrationResponse promoteToApplication(Long id, ChangeLogComment comment, String username) {
AppRegistrationRequest appRegistrationRequest = mkAppRegistrationRequestForEuda(id);
checkNotNull(appRegistrationRequest, "EUDA has already been promoted");
endUserAppDao.updateIsPromotedFlag(id);
AppRegistrationResponse appRegistrationResponse = applicationDao.registerApp(appRegistrationRequest);
migrateEudaInvolvements(id, appRegistrationResponse);
changeLogDao.write(mkChangeLog(appRegistrationResponse, comment, username));
return appRegistrationResponse;
}
Aggregations