1 4 package com.tc.config.schema.test; 5 6 10 public class SystemConfigBuilder extends BaseConfigBuilder { 11 12 public SystemConfigBuilder() { 13 super(1, ALL_PROPERTIES); 14 } 15 16 public void setLicenseLocation(String value) { 17 setProperty("location", value); 18 } 19 20 public static final String LICENSE_TYPE_NONE = "none"; 21 public static final String LICENSE_TYPE_TRIAL = "trial"; 22 public static final String LICENSE_TYPE_PRODUCTION = "production"; 23 24 public void setLicenseType(String value) { 25 setProperty("type", value); 26 } 27 28 public static final String CONFIG_MODEL_DEVELOPMENT = "development"; 29 public static final String CONFIG_MODEL_PRODUCTION = "production"; 30 31 public void setConfigurationModel(String value) { 32 setProperty("configuration-model", value); 33 } 34 35 private static final String [] LICENSE = new String [] { "location", "type" }; 36 private static final String [] TOP_LEVEL_PROPERTIES = new String [] { "configuration-model" }; 37 private static final String [] ALL_PROPERTIES = concat(new Object [] { LICENSE, TOP_LEVEL_PROPERTIES }); 38 39 public String toString() { 40 return elementGroup("license", LICENSE) + elements(TOP_LEVEL_PROPERTIES); 41 } 42 43 public static SystemConfigBuilder newMinimalInstance() { 44 return new SystemConfigBuilder(); 45 } 46 47 } | Popular Tags |