当前位置: 首页>>代码示例>>Java>>正文


Java ServiceDefinition.getMetadata方法代码示例

本文整理汇总了Java中org.springframework.cloud.servicebroker.model.ServiceDefinition.getMetadata方法的典型用法代码示例。如果您正苦于以下问题:Java ServiceDefinition.getMetadata方法的具体用法?Java ServiceDefinition.getMetadata怎么用?Java ServiceDefinition.getMetadata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.cloud.servicebroker.model.ServiceDefinition的用法示例。


在下文中一共展示了ServiceDefinition.getMetadata方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createBlueprint

import org.springframework.cloud.servicebroker.model.ServiceDefinition; //导入方法依赖的package包/类
@VisibleForTesting
  public String createBlueprint(ServiceDefinition serviceDefinition, CreateServiceInstanceRequest request) {
      String location = "localhost"; // default
      Plan selectedPlan = null;
      for(Plan p : serviceDefinition.getPlans()){
          if(p.getId().equals(request.getPlanId())){
              selectedPlan = p;
          }
      }

      Map<String, Object> metadata = serviceDefinition.getMetadata();
      String brooklynCatalogId = (String) metadata.get("brooklynCatalogId");
String blueprint = ((BlueprintPlan)selectedPlan).toBlueprint(brooklynCatalogId, location, request);
      LOG.info("launching from blueprint: [blueprint={}]", blueprint);
return blueprint;
  }
 
开发者ID:cloudfoundry-incubator,项目名称:apache-brooklyn-service-broker,代码行数:17,代码来源:BrooklynServiceInstanceService.java

示例2: toSuffixedServiceDefinition

import org.springframework.cloud.servicebroker.model.ServiceDefinition; //导入方法依赖的package包/类
private ServiceDefinition toSuffixedServiceDefinition(ServiceDefinition serviceDefinition) {
    return new ServiceDefinition(withSuffix(serviceDefinition.getId(), serviceOfferingSuffix),
            withSuffix(serviceDefinition.getName(), serviceOfferingSuffix),
            serviceDefinition.getDescription(),
            serviceDefinition.isBindable(),
            serviceDefinition.isPlanUpdateable(),
            serviceDefinition.getPlans()
                    .stream()
                    .map(this::toPlan)
                    .collect(Collectors.toList()),
            serviceDefinition.getTags(),
            serviceDefinition.getMetadata(),
            serviceDefinition.getRequires(),
            serviceDefinition.getDashboardClient());
}
 
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:16,代码来源:SuffixedCatalogMapper.java

示例3: testEcsBucketMetadata

import org.springframework.cloud.servicebroker.model.ServiceDefinition; //导入方法依赖的package包/类
@Test
public void testEcsBucketMetadata() {
    ServiceDefinition ecsBucketService = catalog.getServiceDefinitions()
            .get(1);
    Map<String, Object> metadata = ecsBucketService.getMetadata();
    testServiceDefinitionMetadata(metadata, "ecs-bucket",
            "http://www.emc.com/images/products/header-image-icon-ecs.png",
            "Dell EMC", "https://community.emc.com/docs/DOC-45012",
            "http://www.emc.com/products-solutions/trial-software-download/ecs.htm");
}
 
开发者ID:codedellemc,项目名称:ecs-cf-service-broker,代码行数:11,代码来源:CatalogConfigTest.java


注:本文中的org.springframework.cloud.servicebroker.model.ServiceDefinition.getMetadata方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。