@Test public void testSubstitutionIncludesDefaultSubs() throws Exception { entity.config().set(BrooklynConfigKeys.SUGGESTED_VERSION, "myversion"); String pattern = "version=${version},type=${type},simpletype=${simpletype}"; BasicDownloadRequirement req = new BasicDownloadRequirement(driver); String result = DownloadSubstituters.substitute(req, pattern); assertEquals(result, String.format("version=%s,type=%s,simpletype=%s", "myversion", TestEntity.class.getName(), TestEntity.class.getSimpleName())); }
public static String substitute(DownloadRequirement req, String basevalue) { return substitute(basevalue, getBasicSubstitutions(req)); }
DownloadSubstituters { public static String substitute(DownloadRequirement req, String basevalue) { return substitute(basevalue, getBasicSubstitutions(req)); } }
DownloadSubstituters { public static String substitute(DownloadRequirement req, String basevalue) { return substitute(basevalue, getBasicSubstitutions(req)); } private  DownloadSubstituters(); }
DownloadSubstituters { public static String substitute(DownloadRequirement req, String basevalue) { return substitute(basevalue, getBasicSubstitutions(req)); } private  DownloadSubstituters(); static String substitute(DownloadRequirement req, String basevalue); static Map<String,Object> getBasicSubstitutions(DownloadRequirement req); static Map<String,Object> getBasicEntitySubstitutions(EntityDriver driver); static Map<String,Object> getBasicAddonSubstitutions(EntityDriver driver, String addon); static String substitute(String basevalue, Map<String,?> substitutions); static Function<DownloadRequirement, DownloadTargets> substituter(Function<? super DownloadRequirement, String> basevalueProducer, Function<? super DownloadRequirement, ? extends Map<String,?>> subsProducer); }
DownloadSubstituters { public static String substitute(DownloadRequirement req, String basevalue) { return substitute(basevalue, getBasicSubstitutions(req)); } private  DownloadSubstituters(); static String substitute(DownloadRequirement req, String basevalue); static Map<String,Object> getBasicSubstitutions(DownloadRequirement req); static Map<String,Object> getBasicEntitySubstitutions(EntityDriver driver); static Map<String,Object> getBasicAddonSubstitutions(EntityDriver driver, String addon); static String substitute(String basevalue, Map<String,?> substitutions); static Function<DownloadRequirement, DownloadTargets> substituter(Function<? super DownloadRequirement, String> basevalueProducer, Function<? super DownloadRequirement, ? extends Map<String,?>> subsProducer);  }