@Test public void givenResourceItemWhenBuildIdThenReturnCorrectId() { ResourceServer resourceServer = new ResourceServer(null, "containerHost", "127.0.0.1", "22", "root", "FBzGPMbCod8MXqoghHhOkA==", "docker", 1, "docker", "active", null, "Ben", null, null, null); resourceServer.initId(); ResourceItem domain = new ResourceItem(null, "service-mgmt-v1.8.4", "docker_container", "{\"volumeBindings\":\"/data/service-mgmt/log:/log\",\"imageName\":\"service-mgmt:v1.8.4\",\"portBindings\":\"20005:21000\",\"envVariables\":\"DB_HOST=127.0.0.1,DB_PORT=3306,DB_SCHEMA=service_mgmt,DB_USER=service_mgmt,DB_PWD=3284e2195ba5f03a,CORE_ADDR=http: "127.0.0.1__docker__containerHost", resourceServer, 1, "Create docker instance for plugin[service-mgmt]", "active", "Ben", null, null, null); String expectedRootMenuId = "127.0.0.1__docker__containerHost__docker_container__service-mgmt-v1.8.4"; assertThat(DomainIdBuilder.buildDomainId(domain)).isEqualTo(expectedRootMenuId); }
public static String buildDomainId(String... fields) { return buildDomainId(Lists.newArrayList(fields)); }
DomainIdBuilder { public static String buildDomainId(String... fields) { return buildDomainId(Lists.newArrayList(fields)); } }
DomainIdBuilder { public static String buildDomainId(String... fields) { return buildDomainId(Lists.newArrayList(fields)); }  }
DomainIdBuilder { public static String buildDomainId(String... fields) { return buildDomainId(Lists.newArrayList(fields)); }  static String buildDomainId(String... fields); static String buildDomainId(List<String> fields); static String buildDomainId(PluginPackage pluginPackage); static String buildDomainId(LazyPluginPackage pluginPackage); static String buildDomainId(PluginPackageDependency pluginPackageDependency); static String buildDomainId(PluginPackageMenu pluginPackageMenu); static String buildDomainId(LazyPluginPackageMenu pluginPackageMenu); static String buildDomainId(PluginPackageDataModel pluginPackageDataModel); static String buildDomainId(LazyPluginPackageDataModel pluginPackageDataModel); static String buildDomainId(PluginPackageEntity pluginPackageEntity); static String buildDomainId(LazyPluginPackageEntity pluginPackageEntity); static String buildDomainId(PluginPackageAttribute pluginPackageAttribute); static String buildDomainId(LazyPluginPackageAttribute pluginPackageAttribute); static String buildDomainId(SystemVariable systemVariable); static String buildDomainId(PluginPackageAuthority pluginPackageAuthority); static String buildDomainId(PluginPackageRuntimeResourcesDocker runtimeResourcesDocker); static String buildDomainId(PluginPackageRuntimeResourcesMysql runtimeResourcesMysql); static String buildDomainId(PluginPackageRuntimeResourcesS3 runtimeResourcesS3); static String buildDomainId(PluginConfig pluginConfig); static String buildDomainId(PluginConfigInterface pluginConfigInterface); static String buildDomainId(PluginConfigInterfaceParameter interfaceParameter); static String buildDomainId(PluginInstance pluginInstance); static String buildDomainId(PluginMysqlInstance mysqlInstance); static String buildDomainId(MenuItem menuItem); static String buildDomainId(ResourceServer resourceServer); static String buildDomainId(ResourceItem resourceItem); static String buildDomainId(BatchExecutionJob batchExecutionJob); }
DomainIdBuilder { public static String buildDomainId(String... fields) { return buildDomainId(Lists.newArrayList(fields)); }  static String buildDomainId(String... fields); static String buildDomainId(List<String> fields); static String buildDomainId(PluginPackage pluginPackage); static String buildDomainId(LazyPluginPackage pluginPackage); static String buildDomainId(PluginPackageDependency pluginPackageDependency); static String buildDomainId(PluginPackageMenu pluginPackageMenu); static String buildDomainId(LazyPluginPackageMenu pluginPackageMenu); static String buildDomainId(PluginPackageDataModel pluginPackageDataModel); static String buildDomainId(LazyPluginPackageDataModel pluginPackageDataModel); static String buildDomainId(PluginPackageEntity pluginPackageEntity); static String buildDomainId(LazyPluginPackageEntity pluginPackageEntity); static String buildDomainId(PluginPackageAttribute pluginPackageAttribute); static String buildDomainId(LazyPluginPackageAttribute pluginPackageAttribute); static String buildDomainId(SystemVariable systemVariable); static String buildDomainId(PluginPackageAuthority pluginPackageAuthority); static String buildDomainId(PluginPackageRuntimeResourcesDocker runtimeResourcesDocker); static String buildDomainId(PluginPackageRuntimeResourcesMysql runtimeResourcesMysql); static String buildDomainId(PluginPackageRuntimeResourcesS3 runtimeResourcesS3); static String buildDomainId(PluginConfig pluginConfig); static String buildDomainId(PluginConfigInterface pluginConfigInterface); static String buildDomainId(PluginConfigInterfaceParameter interfaceParameter); static String buildDomainId(PluginInstance pluginInstance); static String buildDomainId(PluginMysqlInstance mysqlInstance); static String buildDomainId(MenuItem menuItem); static String buildDomainId(ResourceServer resourceServer); static String buildDomainId(ResourceItem resourceItem); static String buildDomainId(BatchExecutionJob batchExecutionJob);  }