1 15 package org.apache.hivemind.definition; 16 17 import org.apache.hivemind.impl.MessageFormatter; 18 19 24 public class DefinitionMessages 25 { 26 private static final MessageFormatter _formatter = new MessageFormatter(DefinitionMessages.class, 27 "DefinitionStrings"); 28 29 public static String duplicateModuleId(String moduleId) 30 { 31 return _formatter.format( 32 "duplicate-module-id", 33 moduleId); 34 } 35 36 public static String wrongNumberOfContributions(ModuleDefinition definingModule, ConfigurationPointDefinition point, int actualCount, 37 Occurances expectation) 38 { 39 return _formatter.format( 40 "wrong-number-of-contributions", 41 point.getQualifiedId(), 42 contributionCount(actualCount), 43 occurances(expectation)); 44 } 45 46 public static String duplicateServicePointId(String pointId, ModuleDefinition module) 47 { 48 return _formatter.format("duplicate-service-point", pointId, module.getId()); 49 } 50 51 public static String duplicateConfigurationPointId(String pointId, ModuleDefinition module) 52 { 53 return _formatter.format("duplicate-configuration-point", pointId, module.getId()); 54 } 55 56 public static String contributionCount(int count) 57 { 58 return _formatter.format("contribution-count", new Integer (count)); 59 } 60 61 public static String occurances(Occurances occurances) 62 { 63 return _formatter.getMessage("occurances." + occurances.getName()); 64 } 65 66 public static String dependencyOnUnknownModule(String toModuleId) 67 { 68 return _formatter.format("dependency-on-unknown-module", toModuleId); 69 } 70 71 public static String unknownConfigurationPoint(String moduleId, 72 String configurationId) 73 { 74 return _formatter.format("unknown-configuration-extension-point", moduleId, configurationId); 75 } 76 77 public static String unknownServicePoint(String moduleId, String pointId) 78 { 79 return _formatter.format( 80 "unknown-service-extension-point", 81 moduleId, 82 pointId); 83 } 84 85 public static String configurationPointNotVisible(ConfigurationPointDefinition point, 86 ModuleDefinition contributingModule) 87 { 88 return _formatter.format( 89 "configuration-point-not-visible", 90 point.getQualifiedId(), 91 contributingModule.getId()); 92 } 93 94 public static String duplicateParserInputFormat(String inputFormat, ConfigurationPointDefinition cp) 95 { 96 return _formatter.format("duplicate-parser-inputformat", inputFormat, cp.getQualifiedId()); 97 } 98 99 100 public static String servicePointNotVisible(ServicePointDefinition point, ModuleDefinition contributingModule) 101 { 102 return _formatter.format( 103 "service-point-not-visible", 104 point.getQualifiedId(), 105 contributingModule.getId()); 106 } 107 108 } | Popular Tags |