@Test void testList() { Set<ClusterTemplateViewV4Response> responses = Set.of(); when(clusterTemplateService.listInWorkspaceAndCleanUpInvalids(WORKSPACE_ID)).thenReturn(responses); ClusterTemplateViewV4Responses result = underTest.list(WORKSPACE_ID); assertThat(result).isNotNull(); assertThat(result.getResponses()).isSameAs(responses); verify(blueprintService).updateDefaultBlueprintCollection(WORKSPACE_ID); verify(clusterTemplateService).updateDefaultClusterTemplates(WORKSPACE_ID); }
@Override @DisableCheckPermissions public ClusterTemplateViewV4Responses list(Long workspaceId) { blueprintService.updateDefaultBlueprintCollection(workspaceId); clusterTemplateService.updateDefaultClusterTemplates(workspaceId); Set<ClusterTemplateViewV4Response> result = clusterTemplateService.listInWorkspaceAndCleanUpInvalids(workspaceId); return new ClusterTemplateViewV4Responses(result); }
ClusterTemplateV4Controller extends NotificationController implements ClusterTemplateV4Endpoint { @Override @DisableCheckPermissions public ClusterTemplateViewV4Responses list(Long workspaceId) { blueprintService.updateDefaultBlueprintCollection(workspaceId); clusterTemplateService.updateDefaultClusterTemplates(workspaceId); Set<ClusterTemplateViewV4Response> result = clusterTemplateService.listInWorkspaceAndCleanUpInvalids(workspaceId); return new ClusterTemplateViewV4Responses(result); } }
ClusterTemplateV4Controller extends NotificationController implements ClusterTemplateV4Endpoint { @Override @DisableCheckPermissions public ClusterTemplateViewV4Responses list(Long workspaceId) { blueprintService.updateDefaultBlueprintCollection(workspaceId); clusterTemplateService.updateDefaultClusterTemplates(workspaceId); Set<ClusterTemplateViewV4Response> result = clusterTemplateService.listInWorkspaceAndCleanUpInvalids(workspaceId); return new ClusterTemplateViewV4Responses(result); }  }
ClusterTemplateV4Controller extends NotificationController implements ClusterTemplateV4Endpoint { @Override @DisableCheckPermissions public ClusterTemplateViewV4Responses list(Long workspaceId) { blueprintService.updateDefaultBlueprintCollection(workspaceId); clusterTemplateService.updateDefaultClusterTemplates(workspaceId); Set<ClusterTemplateViewV4Response> result = clusterTemplateService.listInWorkspaceAndCleanUpInvalids(workspaceId); return new ClusterTemplateViewV4Responses(result); }  @Override @CheckPermissionByAccount(action = AuthorizationResourceAction.CREATE_CLUSTER_DEFINITION) ClusterTemplateV4Response post(Long workspaceId, @Valid ClusterTemplateV4Request request); @Override @DisableCheckPermissions ClusterTemplateViewV4Responses list(Long workspaceId); @Override @CheckPermissionByResourceName(action = AuthorizationResourceAction.DESCRIBE_CLUSTER_DEFINITION) ClusterTemplateV4Response getByName(Long workspaceId, @ResourceName String name); @Override @CheckPermissionByResourceName(action = AuthorizationResourceAction.DELETE_CLUSTER_DEFINITION) ClusterTemplateV4Response deleteByName(Long workspaceId, @ResourceName String name); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_CLUSTER_DEFINITION) ClusterTemplateV4Response getByCrn(Long workspaceId, @ResourceCrn String crn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DELETE_CLUSTER_DEFINITION) ClusterTemplateV4Response deleteByCrn(Long workspaceId, @ResourceCrn String crn); @Override @CheckPermissionByResourceNameList(action = AuthorizationResourceAction.DELETE_CLUSTER_DEFINITION) ClusterTemplateV4Responses deleteMultiple(Long workspaceId, @ResourceNameList Set<String> names, String environmentName, String environmentCrn); }
ClusterTemplateV4Controller extends NotificationController implements ClusterTemplateV4Endpoint { @Override @DisableCheckPermissions public ClusterTemplateViewV4Responses list(Long workspaceId) { blueprintService.updateDefaultBlueprintCollection(workspaceId); clusterTemplateService.updateDefaultClusterTemplates(workspaceId); Set<ClusterTemplateViewV4Response> result = clusterTemplateService.listInWorkspaceAndCleanUpInvalids(workspaceId); return new ClusterTemplateViewV4Responses(result); }  @Override @CheckPermissionByAccount(action = AuthorizationResourceAction.CREATE_CLUSTER_DEFINITION) ClusterTemplateV4Response post(Long workspaceId, @Valid ClusterTemplateV4Request request); @Override @DisableCheckPermissions ClusterTemplateViewV4Responses list(Long workspaceId); @Override @CheckPermissionByResourceName(action = AuthorizationResourceAction.DESCRIBE_CLUSTER_DEFINITION) ClusterTemplateV4Response getByName(Long workspaceId, @ResourceName String name); @Override @CheckPermissionByResourceName(action = AuthorizationResourceAction.DELETE_CLUSTER_DEFINITION) ClusterTemplateV4Response deleteByName(Long workspaceId, @ResourceName String name); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_CLUSTER_DEFINITION) ClusterTemplateV4Response getByCrn(Long workspaceId, @ResourceCrn String crn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DELETE_CLUSTER_DEFINITION) ClusterTemplateV4Response deleteByCrn(Long workspaceId, @ResourceCrn String crn); @Override @CheckPermissionByResourceNameList(action = AuthorizationResourceAction.DELETE_CLUSTER_DEFINITION) ClusterTemplateV4Responses deleteMultiple(Long workspaceId, @ResourceNameList Set<String> names, String environmentName, String environmentCrn);  }