Search in sources :

Example 1 with AppRegistrationResponse

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;
}
Also used : AppRegistrationResponse(org.finos.waltz.model.application.AppRegistrationResponse) ImmutableEntityReference(org.finos.waltz.model.ImmutableEntityReference) EntityReference(org.finos.waltz.model.EntityReference)

Example 2 with AppRegistrationResponse

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;
}
Also used : AppRegistrationResponse(org.finos.waltz.model.application.AppRegistrationResponse) ImmutableAppRegistrationRequest(org.finos.waltz.model.application.ImmutableAppRegistrationRequest) AppRegistrationRequest(org.finos.waltz.model.application.AppRegistrationRequest)

Aggregations

AppRegistrationResponse (org.finos.waltz.model.application.AppRegistrationResponse)2 EntityReference (org.finos.waltz.model.EntityReference)1 ImmutableEntityReference (org.finos.waltz.model.ImmutableEntityReference)1 AppRegistrationRequest (org.finos.waltz.model.application.AppRegistrationRequest)1 ImmutableAppRegistrationRequest (org.finos.waltz.model.application.ImmutableAppRegistrationRequest)1