Search in sources :

Example 1 with UPDATE

use of io.gravitee.rest.api.model.permissions.RolePermissionAction.UPDATE in project gravitee-management-rest-api by gravitee-io.

the class PromotionTasksServiceImplTest method shouldGetPromotionTasks_withApiUpdate.

@Test
public void shouldGetPromotionTasks_withApiUpdate() throws JsonProcessingException {
    PromotionEntity aPromotionEntity = getAPromotionEntity();
    when(promotionService.search(argThat(query -> query != null && query.getStatuses().get(0) == PromotionEntityStatus.TO_BE_VALIDATED), any(), any())).thenReturn(new Page<>(singletonList(aPromotionEntity), 0, 0, 0));
    when(environmentService.findByOrganization(any())).thenReturn(singletonList(getAnEnvironmentEntity()));
    PromotionEntity previousPromotionEntity = getAPromotionEntity();
    previousPromotionEntity.setTargetApiId("api#target");
    when(promotionService.search(argThat(query -> query != null && query.getStatuses().get(0) == PromotionEntityStatus.ACCEPTED), any(), any())).thenReturn(new Page<>(singletonList(previousPromotionEntity), 0, 0, 0));
    when(permissionService.hasPermission(RolePermission.ENVIRONMENT_API, "env#1", UPDATE)).thenReturn(true);
    when(permissionService.hasPermission(RolePermission.ENVIRONMENT_API, "env#1", CREATE)).thenReturn(false);
    when(objectMapper.readValue(aPromotionEntity.getApiDefinition(), ApiEntity.class)).thenReturn(getAnApiEntity());
    when(apiService.exists("api#target")).thenReturn(true);
    final List<TaskEntity> result = cut.getPromotionTasks("org#1");
    assertThat(result).hasSize(1);
    Map<String, Object> taskData = (Map<String, Object>) result.get(0).getData();
    assertThat(taskData.get("apiName")).isEqualTo("API Name");
    assertThat(taskData.get("sourceEnvironmentName")).isEqualTo("Source Env");
    assertThat(taskData.get("targetEnvironmentName")).isEqualTo("Target Env");
    assertThat(taskData.get("authorDisplayName")).isEqualTo("Author");
    assertThat(taskData.get("authorEmail")).isEqualTo("author@gv.io");
    assertThat(taskData.get("authorPicture")).isEqualTo("https://picture.png");
    assertThat(taskData.get("apiId")).isEqualTo("api id");
    assertThat(taskData.get("isApiUpdate")).isEqualTo(true);
    assertThat(taskData.get("targetApiId")).isEqualTo("api#target");
}
Also used : java.util(java.util) ArgumentMatchers(org.mockito.ArgumentMatchers) Mock(org.mockito.Mock) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Page(io.gravitee.common.data.domain.Page) RunWith(org.junit.runner.RunWith) PromotionEntity(io.gravitee.rest.api.model.promotion.PromotionEntity) PromotionEntityStatus(io.gravitee.rest.api.model.promotion.PromotionEntityStatus) ApiService(io.gravitee.rest.api.service.ApiService) UPDATE(io.gravitee.rest.api.model.permissions.RolePermissionAction.UPDATE) Collections.singletonList(java.util.Collections.singletonList) PromotionEntityAuthor(io.gravitee.rest.api.model.promotion.PromotionEntityAuthor) PermissionService(io.gravitee.rest.api.service.PermissionService) Before(org.junit.Before) ApiEntity(io.gravitee.rest.api.model.api.ApiEntity) TaskEntity(io.gravitee.rest.api.model.TaskEntity) Collections.emptyList(java.util.Collections.emptyList) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) EnvironmentService(io.gravitee.rest.api.service.EnvironmentService) PromotionService(io.gravitee.rest.api.service.promotion.PromotionService) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) EnvironmentEntity(io.gravitee.rest.api.model.EnvironmentEntity) CREATE(io.gravitee.rest.api.model.permissions.RolePermissionAction.CREATE) MockitoJUnitRunner(org.mockito.junit.MockitoJUnitRunner) PromotionTasksService(io.gravitee.rest.api.service.promotion.PromotionTasksService) RolePermission(io.gravitee.rest.api.model.permissions.RolePermission) TaskEntity(io.gravitee.rest.api.model.TaskEntity) PromotionEntity(io.gravitee.rest.api.model.promotion.PromotionEntity) Test(org.junit.Test)

Example 2 with UPDATE

use of io.gravitee.rest.api.model.permissions.RolePermissionAction.UPDATE in project gravitee-management-rest-api by gravitee-io.

the class PromotionTasksServiceImplTest method shouldGetPromotionTasks_withApiUpdate_andApiCreation.

@Test
public void shouldGetPromotionTasks_withApiUpdate_andApiCreation() throws JsonProcessingException {
    PromotionEntity promotionEntity1 = getAPromotionEntity();
    PromotionEntity promotionEntity2 = getAPromotionEntity();
    when(promotionService.search(argThat(query -> query != null && query.getStatuses().get(0) == PromotionEntityStatus.TO_BE_VALIDATED), any(), any())).thenReturn(new Page<>(List.of(promotionEntity1, promotionEntity2), 0, 0, 0));
    when(environmentService.findByOrganization(any())).thenReturn(singletonList(getAnEnvironmentEntity()));
    PromotionEntity previousPromotionEntity = getAPromotionEntity();
    previousPromotionEntity.setTargetApiId("api#target");
    when(promotionService.search(argThat(query -> query != null && query.getStatuses().get(0) == PromotionEntityStatus.ACCEPTED), any(), any())).thenReturn(new Page<>(singletonList(previousPromotionEntity), 0, 0, 0));
    when(permissionService.hasPermission(RolePermission.ENVIRONMENT_API, "env#1", UPDATE)).thenReturn(true);
    when(permissionService.hasPermission(RolePermission.ENVIRONMENT_API, "env#1", CREATE)).thenReturn(false);
    when(objectMapper.readValue(promotionEntity1.getApiDefinition(), ApiEntity.class)).thenReturn(getAnApiEntity());
    when(objectMapper.readValue(promotionEntity2.getApiDefinition(), ApiEntity.class)).thenReturn(getAnApiEntity());
    when(apiService.exists("api#target")).thenReturn(true);
    final List<TaskEntity> result = cut.getPromotionTasks("org#1");
    assertThat(result).hasSize(2);
}
Also used : java.util(java.util) ArgumentMatchers(org.mockito.ArgumentMatchers) Mock(org.mockito.Mock) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Page(io.gravitee.common.data.domain.Page) RunWith(org.junit.runner.RunWith) PromotionEntity(io.gravitee.rest.api.model.promotion.PromotionEntity) PromotionEntityStatus(io.gravitee.rest.api.model.promotion.PromotionEntityStatus) ApiService(io.gravitee.rest.api.service.ApiService) UPDATE(io.gravitee.rest.api.model.permissions.RolePermissionAction.UPDATE) Collections.singletonList(java.util.Collections.singletonList) PromotionEntityAuthor(io.gravitee.rest.api.model.promotion.PromotionEntityAuthor) PermissionService(io.gravitee.rest.api.service.PermissionService) Before(org.junit.Before) ApiEntity(io.gravitee.rest.api.model.api.ApiEntity) TaskEntity(io.gravitee.rest.api.model.TaskEntity) Collections.emptyList(java.util.Collections.emptyList) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) EnvironmentService(io.gravitee.rest.api.service.EnvironmentService) PromotionService(io.gravitee.rest.api.service.promotion.PromotionService) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) EnvironmentEntity(io.gravitee.rest.api.model.EnvironmentEntity) CREATE(io.gravitee.rest.api.model.permissions.RolePermissionAction.CREATE) MockitoJUnitRunner(org.mockito.junit.MockitoJUnitRunner) PromotionTasksService(io.gravitee.rest.api.service.promotion.PromotionTasksService) RolePermission(io.gravitee.rest.api.model.permissions.RolePermission) TaskEntity(io.gravitee.rest.api.model.TaskEntity) PromotionEntity(io.gravitee.rest.api.model.promotion.PromotionEntity) Test(org.junit.Test)

Example 3 with UPDATE

use of io.gravitee.rest.api.model.permissions.RolePermissionAction.UPDATE in project gravitee-management-rest-api by gravitee-io.

the class PromotionTasksServiceImplTest method shouldGetPromotionTasks_withApiCreation.

@Test
public void shouldGetPromotionTasks_withApiCreation() throws JsonProcessingException {
    PromotionEntity aPromotionEntity = getAPromotionEntity();
    when(promotionService.search(argThat(query -> query != null && query.getStatuses().get(0) == PromotionEntityStatus.TO_BE_VALIDATED), any(), any())).thenReturn(new Page<>(singletonList(aPromotionEntity), 0, 0, 0));
    when(environmentService.findByOrganization(any())).thenReturn(singletonList(getAnEnvironmentEntity()));
    when(promotionService.search(argThat(query -> query != null && query.getStatuses().get(0) == PromotionEntityStatus.ACCEPTED), any(), any())).thenReturn(new Page<>(emptyList(), 0, 0, 0));
    when(permissionService.hasPermission(RolePermission.ENVIRONMENT_API, "env#1", CREATE)).thenReturn(true);
    when(permissionService.hasPermission(RolePermission.ENVIRONMENT_API, "env#1", UPDATE)).thenReturn(false);
    when(objectMapper.readValue(aPromotionEntity.getApiDefinition(), ApiEntity.class)).thenReturn(getAnApiEntity());
    final List<TaskEntity> result = cut.getPromotionTasks("org#1");
    assertThat(result).hasSize(1);
    Map<String, Object> taskData = (Map<String, Object>) result.get(0).getData();
    assertThat(taskData.get("apiName")).isEqualTo("API Name");
    assertThat(taskData.get("sourceEnvironmentName")).isEqualTo("Source Env");
    assertThat(taskData.get("targetEnvironmentName")).isEqualTo("Target Env");
    assertThat(taskData.get("authorDisplayName")).isEqualTo("Author");
    assertThat(taskData.get("authorEmail")).isEqualTo("author@gv.io");
    assertThat(taskData.get("authorPicture")).isEqualTo("https://picture.png");
    assertThat(taskData.get("apiId")).isEqualTo("api id");
    assertThat(taskData.get("isApiUpdate")).isEqualTo(false);
    assertThat(taskData.get("targetApiId")).isNull();
}
Also used : java.util(java.util) ArgumentMatchers(org.mockito.ArgumentMatchers) Mock(org.mockito.Mock) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Page(io.gravitee.common.data.domain.Page) RunWith(org.junit.runner.RunWith) PromotionEntity(io.gravitee.rest.api.model.promotion.PromotionEntity) PromotionEntityStatus(io.gravitee.rest.api.model.promotion.PromotionEntityStatus) ApiService(io.gravitee.rest.api.service.ApiService) UPDATE(io.gravitee.rest.api.model.permissions.RolePermissionAction.UPDATE) Collections.singletonList(java.util.Collections.singletonList) PromotionEntityAuthor(io.gravitee.rest.api.model.promotion.PromotionEntityAuthor) PermissionService(io.gravitee.rest.api.service.PermissionService) Before(org.junit.Before) ApiEntity(io.gravitee.rest.api.model.api.ApiEntity) TaskEntity(io.gravitee.rest.api.model.TaskEntity) Collections.emptyList(java.util.Collections.emptyList) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) EnvironmentService(io.gravitee.rest.api.service.EnvironmentService) PromotionService(io.gravitee.rest.api.service.promotion.PromotionService) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) EnvironmentEntity(io.gravitee.rest.api.model.EnvironmentEntity) CREATE(io.gravitee.rest.api.model.permissions.RolePermissionAction.CREATE) MockitoJUnitRunner(org.mockito.junit.MockitoJUnitRunner) PromotionTasksService(io.gravitee.rest.api.service.promotion.PromotionTasksService) RolePermission(io.gravitee.rest.api.model.permissions.RolePermission) TaskEntity(io.gravitee.rest.api.model.TaskEntity) PromotionEntity(io.gravitee.rest.api.model.promotion.PromotionEntity) Test(org.junit.Test)

Example 4 with UPDATE

use of io.gravitee.rest.api.model.permissions.RolePermissionAction.UPDATE in project gravitee-management-rest-api by gravitee-io.

the class PromotionTasksServiceImplTest method shouldGetPromotionTasks_withApiCreationBecauseItHasBeenDeleted.

@Test
public void shouldGetPromotionTasks_withApiCreationBecauseItHasBeenDeleted() throws JsonProcessingException {
    PromotionEntity aPromotionEntity = getAPromotionEntity();
    when(promotionService.search(argThat(query -> query != null && query.getStatuses().get(0) == PromotionEntityStatus.TO_BE_VALIDATED), any(), any())).thenReturn(new Page<>(singletonList(aPromotionEntity), 0, 0, 0));
    when(environmentService.findByOrganization(any())).thenReturn(singletonList(getAnEnvironmentEntity()));
    PromotionEntity previousPromotionEntity = getAPromotionEntity();
    previousPromotionEntity.setTargetApiId("api#target");
    when(promotionService.search(argThat(query -> query != null && query.getStatuses().get(0) == PromotionEntityStatus.ACCEPTED), any(), any())).thenReturn(new Page<>(singletonList(previousPromotionEntity), 0, 0, 0));
    when(permissionService.hasPermission(RolePermission.ENVIRONMENT_API, "env#1", CREATE)).thenReturn(true);
    when(permissionService.hasPermission(RolePermission.ENVIRONMENT_API, "env#1", UPDATE)).thenReturn(false);
    when(objectMapper.readValue(aPromotionEntity.getApiDefinition(), ApiEntity.class)).thenReturn(getAnApiEntity());
    when(apiService.exists("api#target")).thenReturn(false);
    final List<TaskEntity> result = cut.getPromotionTasks("org#1");
    assertThat(result).hasSize(1);
    Map<String, Object> taskData = (Map<String, Object>) result.get(0).getData();
    assertThat(taskData.get("apiName")).isEqualTo("API Name");
    assertThat(taskData.get("sourceEnvironmentName")).isEqualTo("Source Env");
    assertThat(taskData.get("targetEnvironmentName")).isEqualTo("Target Env");
    assertThat(taskData.get("authorDisplayName")).isEqualTo("Author");
    assertThat(taskData.get("authorEmail")).isEqualTo("author@gv.io");
    assertThat(taskData.get("authorPicture")).isEqualTo("https://picture.png");
    assertThat(taskData.get("apiId")).isEqualTo("api id");
    assertThat(taskData.get("isApiUpdate")).isEqualTo(false);
}
Also used : java.util(java.util) ArgumentMatchers(org.mockito.ArgumentMatchers) Mock(org.mockito.Mock) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Page(io.gravitee.common.data.domain.Page) RunWith(org.junit.runner.RunWith) PromotionEntity(io.gravitee.rest.api.model.promotion.PromotionEntity) PromotionEntityStatus(io.gravitee.rest.api.model.promotion.PromotionEntityStatus) ApiService(io.gravitee.rest.api.service.ApiService) UPDATE(io.gravitee.rest.api.model.permissions.RolePermissionAction.UPDATE) Collections.singletonList(java.util.Collections.singletonList) PromotionEntityAuthor(io.gravitee.rest.api.model.promotion.PromotionEntityAuthor) PermissionService(io.gravitee.rest.api.service.PermissionService) Before(org.junit.Before) ApiEntity(io.gravitee.rest.api.model.api.ApiEntity) TaskEntity(io.gravitee.rest.api.model.TaskEntity) Collections.emptyList(java.util.Collections.emptyList) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) EnvironmentService(io.gravitee.rest.api.service.EnvironmentService) PromotionService(io.gravitee.rest.api.service.promotion.PromotionService) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) EnvironmentEntity(io.gravitee.rest.api.model.EnvironmentEntity) CREATE(io.gravitee.rest.api.model.permissions.RolePermissionAction.CREATE) MockitoJUnitRunner(org.mockito.junit.MockitoJUnitRunner) PromotionTasksService(io.gravitee.rest.api.service.promotion.PromotionTasksService) RolePermission(io.gravitee.rest.api.model.permissions.RolePermission) TaskEntity(io.gravitee.rest.api.model.TaskEntity) PromotionEntity(io.gravitee.rest.api.model.promotion.PromotionEntity) Test(org.junit.Test)

Example 5 with UPDATE

use of io.gravitee.rest.api.model.permissions.RolePermissionAction.UPDATE in project gravitee-management-rest-api by gravitee-io.

the class PromotionServiceImpl method promote.

@Override
public PromotionEntity promote(String apiId, PromotionRequestEntity promotionRequest, String userId) {
    // TODO: do we have to use filteredFields like for duplicate (i think no need members and groups)
    // FIXME: can we get the version from target environment
    String apiDefinition = apiDuplicatorService.exportAsJson(apiId, ApiSerializer.Version.DEFAULT.getVersion(), "id", "members", "groups");
    EnvironmentEntity currentEnvironmentEntity = environmentService.findById(GraviteeContext.getCurrentEnvironment());
    UserEntity author = userService.findById(userId);
    PromotionQuery promotionQuery = new PromotionQuery();
    promotionQuery.setStatuses(List.of(PromotionEntityStatus.CREATED, PromotionEntityStatus.TO_BE_VALIDATED));
    promotionQuery.setApiId(apiId);
    List<PromotionEntity> inProgressPromotions = search(promotionQuery, null, null).getContent().stream().filter(promotionEntity -> promotionEntity.getTargetEnvCockpitId().equals(promotionRequest.getTargetEnvCockpitId())).collect(Collectors.toList());
    if (!inProgressPromotions.isEmpty()) {
        throw new PromotionAlreadyInProgressException(inProgressPromotions.get(0).getId());
    }
    Promotion promotionToSave = convert(apiId, apiDefinition, currentEnvironmentEntity, promotionRequest, author);
    promotionToSave.setId(UuidString.generateRandom());
    Promotion createdPromotion = null;
    try {
        createdPromotion = promotionRepository.create(promotionToSave);
        auditService.createApiAuditLog(createdPromotion.getApiId(), emptyMap(), PROMOTION_CREATED, createdPromotion.getCreatedAt(), null, createdPromotion);
    } catch (TechnicalException exception) {
        throw new TechnicalManagementException(String.format("An error occurs while trying to create a promotion request for API %s", apiId), exception);
    }
    PromotionEntity promotionEntity = convert(createdPromotion);
    CockpitReply<PromotionEntity> cockpitReply = cockpitService.requestPromotion(promotionEntity);
    promotionEntity.setStatus(cockpitReply.getStatus() != CockpitReplyStatus.SUCCEEDED ? PromotionEntityStatus.ERROR : PromotionEntityStatus.TO_BE_VALIDATED);
    try {
        promotionRepository.update(convert(promotionEntity));
    } catch (TechnicalException exception) {
        throw new TechnicalManagementException(String.format("An error occurs while trying to update promotion %s", promotionEntity.getId()), exception);
    }
    if (cockpitReply.getStatus() != CockpitReplyStatus.SUCCEEDED) {
        throw new BridgeOperationException(BridgeOperation.PROMOTE_API);
    }
    return promotionEntity;
}
Also used : PROMOTION_CREATED(io.gravitee.repository.management.model.Promotion.AuditEvent.PROMOTION_CREATED) io.gravitee.rest.api.service(io.gravitee.rest.api.service) CockpitService(io.gravitee.rest.api.service.cockpit.services.CockpitService) Pageable(io.gravitee.rest.api.model.common.Pageable) Date(java.util.Date) Page(io.gravitee.common.data.domain.Page) Sortable(io.gravitee.rest.api.model.common.Sortable) TechnicalException(io.gravitee.repository.exceptions.TechnicalException) Order(io.gravitee.repository.management.api.search.Order) CockpitReplyStatus(io.gravitee.rest.api.service.cockpit.services.CockpitReplyStatus) LoggerFactory(org.slf4j.LoggerFactory) GraviteeContext(io.gravitee.rest.api.service.common.GraviteeContext) UPDATE(io.gravitee.rest.api.model.permissions.RolePermissionAction.UPDATE) Collections.singletonList(java.util.Collections.singletonList) SortableImpl(io.gravitee.rest.api.model.common.SortableImpl) PageableBuilder(io.gravitee.repository.management.api.search.builder.PageableBuilder) AbstractService(io.gravitee.rest.api.service.impl.AbstractService) PromotionCriteria(io.gravitee.repository.management.api.search.PromotionCriteria) Collections.emptyMap(java.util.Collections.emptyMap) UuidString(io.gravitee.rest.api.service.common.UuidString) ApiEntity(io.gravitee.rest.api.model.api.ApiEntity) Logger(org.slf4j.Logger) ENVIRONMENT_API(io.gravitee.rest.api.model.permissions.RolePermission.ENVIRONMENT_API) Promotion(io.gravitee.repository.management.model.Promotion) BridgeOperation(io.gravitee.rest.api.service.cockpit.command.bridge.operation.BridgeOperation) CockpitReply(io.gravitee.rest.api.service.cockpit.services.CockpitReply) PromotionService(io.gravitee.rest.api.service.promotion.PromotionService) Collectors(java.util.stream.Collectors) EnvironmentEntity(io.gravitee.rest.api.model.EnvironmentEntity) io.gravitee.rest.api.model.promotion(io.gravitee.rest.api.model.promotion) List(java.util.List) Component(org.springframework.stereotype.Component) PromotionStatus(io.gravitee.repository.management.model.PromotionStatus) SortableBuilder(io.gravitee.repository.management.api.search.builder.SortableBuilder) io.gravitee.rest.api.service.exceptions(io.gravitee.rest.api.service.exceptions) CollectionUtils(org.springframework.util.CollectionUtils) CREATE(io.gravitee.rest.api.model.permissions.RolePermissionAction.CREATE) PromotionRepository(io.gravitee.repository.management.api.PromotionRepository) Optional(java.util.Optional) PromotionAuthor(io.gravitee.repository.management.model.PromotionAuthor) ApiSerializer(io.gravitee.rest.api.service.jackson.ser.api.ApiSerializer) Collections(java.util.Collections) UserEntity(io.gravitee.rest.api.model.UserEntity) StringUtils(org.springframework.util.StringUtils) TechnicalException(io.gravitee.repository.exceptions.TechnicalException) EnvironmentEntity(io.gravitee.rest.api.model.EnvironmentEntity) UuidString(io.gravitee.rest.api.service.common.UuidString) Promotion(io.gravitee.repository.management.model.Promotion) UserEntity(io.gravitee.rest.api.model.UserEntity)

Aggregations

Page (io.gravitee.common.data.domain.Page)6 UPDATE (io.gravitee.rest.api.model.permissions.RolePermissionAction.UPDATE)6 EnvironmentEntity (io.gravitee.rest.api.model.EnvironmentEntity)5 ApiEntity (io.gravitee.rest.api.model.api.ApiEntity)5 RolePermission (io.gravitee.rest.api.model.permissions.RolePermission)5 CREATE (io.gravitee.rest.api.model.permissions.RolePermissionAction.CREATE)5 PromotionService (io.gravitee.rest.api.service.promotion.PromotionService)5 java.util (java.util)5 Collections.singletonList (java.util.Collections.singletonList)5 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)4 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)4 TaskEntity (io.gravitee.rest.api.model.TaskEntity)4 PromotionEntity (io.gravitee.rest.api.model.promotion.PromotionEntity)4 PromotionEntityAuthor (io.gravitee.rest.api.model.promotion.PromotionEntityAuthor)4 PromotionEntityStatus (io.gravitee.rest.api.model.promotion.PromotionEntityStatus)4 ApiService (io.gravitee.rest.api.service.ApiService)4 EnvironmentService (io.gravitee.rest.api.service.EnvironmentService)4 PermissionService (io.gravitee.rest.api.service.PermissionService)4 PromotionTasksService (io.gravitee.rest.api.service.promotion.PromotionTasksService)4 Collections.emptyList (java.util.Collections.emptyList)4