@Test public void testPopulateCrnCorrectly() { Blueprint blueprint = new Blueprint(); underTest.decorateWithCrn(blueprint, ACCOUNT_ID, CREATOR); assertThat(blueprint.getCreator(), is(CREATOR)); assertTrue(blueprint.getResourceCrn().matches("crn:cdp:datahub:us-west-1:" + ACCOUNT_ID + ":clustertemplate:.*")); }
public void decorateWithCrn(Blueprint bp, String accountId, String creator) { bp.setResourceCrn(createCRN(accountId)); bp.setCreator(creator); }
BlueprintService extends AbstractWorkspaceAwareResourceService<Blueprint> implements ResourceBasedCrnProvider { public void decorateWithCrn(Blueprint bp, String accountId, String creator) { bp.setResourceCrn(createCRN(accountId)); bp.setCreator(creator); } }
BlueprintService extends AbstractWorkspaceAwareResourceService<Blueprint> implements ResourceBasedCrnProvider { public void decorateWithCrn(Blueprint bp, String accountId, String creator) { bp.setResourceCrn(createCRN(accountId)); bp.setCreator(creator); }  }
BlueprintService extends AbstractWorkspaceAwareResourceService<Blueprint> implements ResourceBasedCrnProvider { public void decorateWithCrn(Blueprint bp, String accountId, String creator) { bp.setResourceCrn(createCRN(accountId)); bp.setCreator(creator); }  Blueprint get(Long id); Blueprint createForLoggedInUser(Blueprint blueprint, Long workspaceId, String accountId, String creator); Blueprint deleteByWorkspace(NameOrCrn nameOrCrn, Long workspaceId); Blueprint getByWorkspace(@NotNull NameOrCrn nameOrCrn, Long workspaceId); void decorateWithCrn(Blueprint bp, String accountId, String creator); PlatformRecommendation getRecommendation(Long workspaceId, String blueprintName, String credentialName,
            String region, String platformVariant, String availabilityZone, CdpResourceType cdpResourceType); PlatformRecommendation getRecommendationByCredentialCrn(Long workspaceId, String blueprintName, String credentialCrn,
            String region, String platformVariant, String availabilityZone, CdpResourceType cdpResourceType); AutoscaleRecommendation getAutoscaleRecommendation(Long workspaceId, String blueprintName); ScaleRecommendation getScaleRecommendation(Long workspaceId, String blueprintName); @Override Set<Blueprint> findAllByWorkspace(Workspace workspace); @Override Set<Blueprint> findAllByWorkspaceId(Long workspaceId); Set<BlueprintView> getAllAvailableViewInWorkspaceAndFilterBySdxReady(Long workspaceId, Boolean withSdx); Set<Blueprint> getAllAvailableInWorkspace(Workspace workspace); Blueprint getByNameForWorkspaceAndLoadDefaultsIfNecessary(String name, Workspace workspace); void updateDefaultBlueprintCollection(Long workspaceId); boolean isDatalakeBlueprint(Blueprint blueprint); boolean isClouderaManagerTemplate(Blueprint blueprint); String getBlueprintVariant(Blueprint blueprint); @Override Blueprint getByNameForWorkspace(String name, Workspace workspace); @Override Blueprint delete(Blueprint blueprint); @Override WorkspaceResourceRepository<Blueprint, Long> repository(); Map<String, String> queryCustomParametersMap(String name, Long workspaceId); Set<ConfigQueryEntry> queryFileSystemParameters(String blueprintName, String clusterName,
            String baseLocation, String fileSystemType, String accountName, boolean attachedCluster,
            boolean secure, Long workspaceId); @Override String getResourceCrnByResourceName(String resourceName); @Override List<String> getResourceCrnsInAccount(); @Override List<String> getResourceCrnListByResourceNameList(List<String> resourceNames); Blueprint getByResourceCrn(String resourceCrn); @Override AuthorizationResourceType getResourceType(); BlueprintStatusView getStatusViewByResourceCrn(String resourceCrn); }
BlueprintService extends AbstractWorkspaceAwareResourceService<Blueprint> implements ResourceBasedCrnProvider { public void decorateWithCrn(Blueprint bp, String accountId, String creator) { bp.setResourceCrn(createCRN(accountId)); bp.setCreator(creator); }  Blueprint get(Long id); Blueprint createForLoggedInUser(Blueprint blueprint, Long workspaceId, String accountId, String creator); Blueprint deleteByWorkspace(NameOrCrn nameOrCrn, Long workspaceId); Blueprint getByWorkspace(@NotNull NameOrCrn nameOrCrn, Long workspaceId); void decorateWithCrn(Blueprint bp, String accountId, String creator); PlatformRecommendation getRecommendation(Long workspaceId, String blueprintName, String credentialName,
            String region, String platformVariant, String availabilityZone, CdpResourceType cdpResourceType); PlatformRecommendation getRecommendationByCredentialCrn(Long workspaceId, String blueprintName, String credentialCrn,
            String region, String platformVariant, String availabilityZone, CdpResourceType cdpResourceType); AutoscaleRecommendation getAutoscaleRecommendation(Long workspaceId, String blueprintName); ScaleRecommendation getScaleRecommendation(Long workspaceId, String blueprintName); @Override Set<Blueprint> findAllByWorkspace(Workspace workspace); @Override Set<Blueprint> findAllByWorkspaceId(Long workspaceId); Set<BlueprintView> getAllAvailableViewInWorkspaceAndFilterBySdxReady(Long workspaceId, Boolean withSdx); Set<Blueprint> getAllAvailableInWorkspace(Workspace workspace); Blueprint getByNameForWorkspaceAndLoadDefaultsIfNecessary(String name, Workspace workspace); void updateDefaultBlueprintCollection(Long workspaceId); boolean isDatalakeBlueprint(Blueprint blueprint); boolean isClouderaManagerTemplate(Blueprint blueprint); String getBlueprintVariant(Blueprint blueprint); @Override Blueprint getByNameForWorkspace(String name, Workspace workspace); @Override Blueprint delete(Blueprint blueprint); @Override WorkspaceResourceRepository<Blueprint, Long> repository(); Map<String, String> queryCustomParametersMap(String name, Long workspaceId); Set<ConfigQueryEntry> queryFileSystemParameters(String blueprintName, String clusterName,
            String baseLocation, String fileSystemType, String accountName, boolean attachedCluster,
            boolean secure, Long workspaceId); @Override String getResourceCrnByResourceName(String resourceName); @Override List<String> getResourceCrnsInAccount(); @Override List<String> getResourceCrnListByResourceNameList(List<String> resourceNames); Blueprint getByResourceCrn(String resourceCrn); @Override AuthorizationResourceType getResourceType(); BlueprintStatusView getStatusViewByResourceCrn(String resourceCrn);  }