1 18 19 package cowsultants.itracker.ejb.client.interfaces; 20 21 import java.util.*; 22 import javax.ejb.EJBLocalObject ; 23 24 import cowsultants.itracker.ejb.client.models.*; 25 26 public interface SystemConfiguration extends EJBLocalObject { 27 public static final String JNDI_NAME = "ejb/SystemConfiguration"; 28 29 public Properties getProperties(); 30 31 public String getProperty(String name); 32 public String getProperty(String name, String defaultValue); 33 public boolean getBooleanProperty(String name, boolean defaultValue); 34 public int getIntegerProperty(String name, int defaultValue); 35 public long getLongProperty(String name, long defaultValue); 36 37 public ConfigurationModel getConfigurationItem(Integer id); 38 44 public ConfigurationModel[] getConfigurationItemsByType(int type); 45 53 public ConfigurationModel[] getConfigurationItemsByType(int type, Locale locale); 54 59 public ConfigurationModel createConfigurationItem(ConfigurationModel model); 60 66 public ConfigurationModel updateConfigurationItem(ConfigurationModel model); 67 public ConfigurationModel[] updateConfigurationItems(ConfigurationModel[] models, int type); 68 69 public boolean configurationItemExists(ConfigurationModel model); 70 public boolean configurationItemUpToDate(ConfigurationModel model); 71 72 76 public void removeConfigurationItem(Integer id); 77 82 public void removeConfigurationItems(int type); 83 89 public void removeConfigurationItems(ConfigurationModel model); 90 91 95 public void resetConfigurationCache(); 96 101 public void resetConfigurationCache(int type); 102 103 104 109 public CustomFieldModel getCustomField(Integer id); 110 114 public CustomFieldModel[] getCustomFields(); 115 121 public CustomFieldModel[] getCustomFields(Locale locale); 122 128 public CustomFieldModel createCustomField(CustomFieldModel model); 129 136 public CustomFieldModel updateCustomField(CustomFieldModel model); 137 141 public void removeCustomField(Integer customFieldId); 142 147 public CustomFieldValueModel getCustomFieldValue(Integer id); 148 153 public CustomFieldValueModel createCustomFieldValue(CustomFieldValueModel model); 154 160 public CustomFieldValueModel updateCustomFieldValue(CustomFieldValueModel model); 161 171 public CustomFieldValueModel[] updateCustomFieldValues(Integer customFieldId, CustomFieldValueModel[] models); 172 176 public void removeCustomFieldValue(Integer customFieldValueId); 177 181 public void removeCustomFieldValues(Integer customFieldId); 182 183 189 public LanguageModel getLanguageItemByKey(String key, Locale locale); 190 195 public LanguageModel[] getLanguageItemsByKey(String key); 196 201 public LanguageModel updateLanguageItem(LanguageModel model); 202 207 public void removeLanguageKey(String key); 208 public void removeLanguageItem(LanguageModel model); 209 210 214 public SystemConfigurationModel getSystemConfiguration(Locale locale); 215 216 220 public String [] getSortedKeys(); 221 222 public HashMap getDefinedKeys(String locale); 223 public NameValuePairModel[] getDefinedKeysAsArray(String locale); 224 public int getNumberDefinedKeys(String locale); 225 public HashMap getAvailableLanguages(); 226 public LanguageModel[] getLanguage(Locale locale); 227 public void updateLanguage(Locale locale, LanguageModel[] models); 228 public void updateLanguage(Locale locale, LanguageModel[] models, ConfigurationModel config); 229 230 237 public boolean initializeLocale(String locale, boolean forceReload); 238 239 244 public void initializeConfiguration(); 245 } 246 | Popular Tags |