| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
package org.itracker.services.implementations; |
| 20 |
|
|
| 21 |
|
import java.util.ArrayList; |
| 22 |
|
import java.util.Arrays; |
| 23 |
|
import java.util.Collection; |
| 24 |
|
import java.util.Collections; |
| 25 |
|
import java.util.Date; |
| 26 |
|
import java.util.Enumeration; |
| 27 |
|
import java.util.HashMap; |
| 28 |
|
import java.util.Iterator; |
| 29 |
|
import java.util.List; |
| 30 |
|
import java.util.Locale; |
| 31 |
|
import java.util.Map; |
| 32 |
|
import java.util.Properties; |
| 33 |
|
import java.util.ResourceBundle; |
| 34 |
|
|
| 35 |
|
import javax.naming.InitialContext; |
| 36 |
|
import javax.naming.NamingException; |
| 37 |
|
|
| 38 |
|
import org.apache.log4j.Logger; |
| 39 |
|
import org.itracker.core.resources.ITrackerResources; |
| 40 |
|
import org.itracker.model.Configuration; |
| 41 |
|
import org.itracker.model.CustomField; |
| 42 |
|
import org.itracker.model.CustomFieldValue; |
| 43 |
|
import org.itracker.model.Language; |
| 44 |
|
import org.itracker.model.NameValuePair; |
| 45 |
|
import org.itracker.model.ProjectScript; |
| 46 |
|
import org.itracker.model.SystemConfiguration; |
| 47 |
|
import org.itracker.model.WorkflowScript; |
| 48 |
|
import org.itracker.persistence.dao.ConfigurationDAO; |
| 49 |
|
import org.itracker.persistence.dao.CustomFieldDAO; |
| 50 |
|
import org.itracker.persistence.dao.CustomFieldValueDAO; |
| 51 |
|
import org.itracker.persistence.dao.LanguageDAO; |
| 52 |
|
import org.itracker.persistence.dao.NoSuchEntityException; |
| 53 |
|
import org.itracker.persistence.dao.ProjectScriptDAO; |
| 54 |
|
import org.itracker.persistence.dao.WorkflowScriptDAO; |
| 55 |
|
import org.itracker.services.ConfigurationService; |
| 56 |
|
import org.itracker.services.util.CustomFieldUtilities; |
| 57 |
|
import org.itracker.services.util.IssueUtilities; |
| 58 |
|
import org.itracker.services.util.NamingUtilites; |
| 59 |
|
import org.itracker.services.util.SystemConfigurationUtilities; |
| 60 |
|
import org.jfree.util.Log; |
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
@see |
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
|
|
|
| 0% |
Uncovered Elements: 705 (705) |
Complexity: 180 |
Complexity Density: 0.39 |
|
| 70 |
|
public class ConfigurationServiceImpl implements ConfigurationService { |
| 71 |
|
|
| 72 |
|
private static final Logger logger = Logger.getLogger(ConfigurationServiceImpl.class.getName()); |
| 73 |
|
|
| 74 |
|
private final Properties props; |
| 75 |
|
private ConfigurationDAO configurationDAO; |
| 76 |
|
private CustomFieldDAO customFieldDAO; |
| 77 |
|
private CustomFieldValueDAO customFieldValueDAO; |
| 78 |
|
private LanguageDAO languageDAO; |
| 79 |
|
private ProjectScriptDAO projectScriptDAO; |
| 80 |
|
private WorkflowScriptDAO workflowScriptDAO; |
| 81 |
|
|
| 82 |
|
|
| 83 |
|
private static final Long _START_TIME_MILLIS = System.currentTimeMillis(); |
| 84 |
|
private String jndiPropertiesOverridePrefix; |
| 85 |
|
|
| 86 |
|
|
| 87 |
|
|
| 88 |
|
|
| 89 |
|
@param |
| 90 |
|
|
| 91 |
|
|
|
|
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 2 |
Complexity Density: 0.18 |
|
| 92 |
0
|
public ConfigurationServiceImpl(Properties configurationProperties, ... |
| 93 |
|
ConfigurationDAO configurationDAO, CustomFieldDAO customFieldDAO, |
| 94 |
|
CustomFieldValueDAO customFieldValueDAO, LanguageDAO languageDAO, |
| 95 |
|
ProjectScriptDAO projectScriptDAO, WorkflowScriptDAO workflowScriptDAO) { |
| 96 |
0
|
if (configurationProperties == null) { |
| 97 |
0
|
throw new IllegalArgumentException("null configurationProperties"); |
| 98 |
|
} |
| 99 |
0
|
this.props = configurationProperties; |
| 100 |
0
|
props.setProperty("start_time_millis", String.valueOf(_START_TIME_MILLIS)); |
| 101 |
|
|
| 102 |
|
|
| 103 |
0
|
this.jndiPropertiesOverridePrefix = props.getProperty( |
| 104 |
|
"jndi_override_prefix", null); |
| 105 |
|
|
| 106 |
0
|
this.configurationDAO = configurationDAO; |
| 107 |
0
|
this.customFieldDAO = customFieldDAO; |
| 108 |
0
|
this.customFieldValueDAO = customFieldValueDAO; |
| 109 |
0
|
this.languageDAO = languageDAO; |
| 110 |
|
|
| 111 |
0
|
this.projectScriptDAO = projectScriptDAO; |
| 112 |
0
|
this.workflowScriptDAO = workflowScriptDAO; |
| 113 |
|
} |
| 114 |
|
|
|
|
|
| 0% |
Uncovered Elements: 27 (27) |
Complexity: 8 |
Complexity Density: 0.53 |
|
| 115 |
0
|
public String getProperty(String name) {... |
| 116 |
0
|
String value = null; |
| 117 |
0
|
if (null != jndiPropertiesOverridePrefix) { |
| 118 |
|
|
| 119 |
0
|
if (logger.isDebugEnabled()) { |
| 120 |
|
|
| 121 |
0
|
logger.debug("getProperty: looking up '" + name |
| 122 |
|
+ "' from jndi context " |
| 123 |
|
+ jndiPropertiesOverridePrefix); |
| 124 |
|
|
| 125 |
|
|
| 126 |
|
} |
| 127 |
0
|
try { |
| 128 |
0
|
value = NamingUtilites.getStringValue(new InitialContext(), |
| 129 |
|
jndiPropertiesOverridePrefix + "/" + name, null); |
| 130 |
0
|
if (null == value) { |
| 131 |
0
|
if (logger.isDebugEnabled()) { |
| 132 |
0
|
logger.debug("getProperty: value not found in jndi: " + name); |
| 133 |
|
} |
| 134 |
|
} |
| 135 |
|
} catch (Exception e) { |
| 136 |
0
|
logger.debug("getProperty: caught exception looking up value for " + name, e); |
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
} |
| 140 |
|
|
| 141 |
0
|
if (null == value) { |
| 142 |
0
|
value = props.getProperty(name, null); |
| 143 |
|
} |
| 144 |
0
|
if (logger.isDebugEnabled()) { |
| 145 |
0
|
logger.debug("getProperty: returning " + value + " for name: " + name); |
| 146 |
|
} |
| 147 |
0
|
return value; |
| 148 |
|
} |
| 149 |
|
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 150 |
0
|
public String getProperty(String name, String defaultValue) {... |
| 151 |
0
|
String val = getProperty(name); |
| 152 |
0
|
return (val == null) ? defaultValue : val; |
| 153 |
|
} |
| 154 |
|
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 155 |
0
|
public boolean getBooleanProperty(String name, boolean defaultValue) {... |
| 156 |
0
|
String value = getProperty(name); |
| 157 |
|
|
| 158 |
0
|
return (value == null ? defaultValue : Boolean.valueOf(value)); |
| 159 |
|
} |
| 160 |
|
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 161 |
0
|
public int getIntegerProperty(String name, int defaultValue) {... |
| 162 |
0
|
String value = getProperty(name); |
| 163 |
|
|
| 164 |
0
|
try { |
| 165 |
0
|
return (value == null) ? defaultValue : Integer.parseInt(value); |
| 166 |
|
} catch (NumberFormatException ex) { |
| 167 |
0
|
return defaultValue; |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
} |
| 171 |
|
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 172 |
0
|
public long getLongProperty(String name, long defaultValue) {... |
| 173 |
0
|
String value = getProperty(name); |
| 174 |
0
|
try { |
| 175 |
0
|
return (value == null) ? defaultValue : Long.parseLong(value); |
| 176 |
|
} catch (NumberFormatException ex) { |
| 177 |
0
|
return defaultValue; |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
} |
| 181 |
|
|
| 182 |
|
|
| 183 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 184 |
0
|
public Properties getProperties() {... |
| 185 |
0
|
Properties p = new Properties(props) { |
| 186 |
|
|
| 187 |
|
|
| 188 |
|
|
| 189 |
|
|
| 190 |
|
private static final long serialVersionUID = -9126991683132905153L; |
| 191 |
|
|
|
|
|
| 0% |
Uncovered Elements: 27 (27) |
Complexity: 8 |
Complexity Density: 0.53 |
|
| 192 |
0
|
@Override... |
| 193 |
|
public synchronized Object get(Object key) { |
| 194 |
0
|
if (null != super.getProperty( |
| 195 |
|
"jndi_override_prefix", null)) { |
| 196 |
0
|
if (logger.isInfoEnabled()) { |
| 197 |
0
|
logger.info("get: looking for override for " + key |
| 198 |
|
+ " in jndi properties override: " |
| 199 |
|
+ super.getProperty( |
| 200 |
|
"jndi_override_prefix", null)); |
| 201 |
|
} |
| 202 |
0
|
Object val = null; |
| 203 |
0
|
try { |
| 204 |
0
|
val = NamingUtilites.lookup(new InitialContext(), |
| 205 |
|
super.getProperty( |
| 206 |
|
"jndi_override_prefix", null) + "/" + String.valueOf(key)); |
| 207 |
|
} catch (NamingException e) { |
| 208 |
0
|
if (logger.isDebugEnabled()) { |
| 209 |
0
|
logger.debug("get: failed to create initial context", e); |
| 210 |
|
} |
| 211 |
|
} |
| 212 |
0
|
if (null != val) { |
| 213 |
0
|
if (logger.isDebugEnabled()) { |
| 214 |
0
|
logger.debug("get: returning " + val); |
| 215 |
|
} |
| 216 |
0
|
return val; |
| 217 |
|
} |
| 218 |
|
|
| 219 |
|
} |
| 220 |
0
|
if (logger.isDebugEnabled()) { |
| 221 |
0
|
logger.debug("get: get value of " + key + " from super"); |
| 222 |
|
} |
| 223 |
0
|
return super.get(key); |
| 224 |
|
} |
| 225 |
|
}; |
| 226 |
0
|
return p; |
| 227 |
|
} |
| 228 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 229 |
0
|
public Configuration getConfigurationItem(Integer id) {... |
| 230 |
0
|
Configuration configItem = configurationDAO.findByPrimaryKey(id); |
| 231 |
0
|
return configItem; |
| 232 |
|
} |
| 233 |
|
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 234 |
0
|
public List<Configuration> getConfigurationItemsByType(int type) {... |
| 235 |
0
|
List<Configuration> configItems = configurationDAO.findByType(type); |
| 236 |
0
|
Collections.sort(configItems, new Configuration.ConfigurationOrderComparator()); |
| 237 |
0
|
return configItems; |
| 238 |
|
} |
| 239 |
|
|
|
|
|
| 0% |
Uncovered Elements: 17 (17) |
Complexity: 5 |
Complexity Density: 0.56 |
|
| 240 |
0
|
public List<Configuration> getConfigurationItemsByType(int type, Locale locale) {... |
| 241 |
0
|
List<Configuration> items = getConfigurationItemsByType(type); |
| 242 |
|
|
| 243 |
0
|
for (int i = 0; i < items.size(); i++) { |
| 244 |
0
|
if (items.get(i).getType() == SystemConfigurationUtilities.TYPE_STATUS) { |
| 245 |
0
|
items.get(i).setName(IssueUtilities.getStatusName(items.get(i).getValue(), locale)); |
| 246 |
0
|
} else if (items.get(i).getType() == SystemConfigurationUtilities.TYPE_SEVERITY) { |
| 247 |
0
|
items.get(i).setName(IssueUtilities.getSeverityName(items.get(i).getValue(), locale)); |
| 248 |
0
|
} else if (items.get(i).getType() == SystemConfigurationUtilities.TYPE_RESOLUTION) { |
| 249 |
0
|
items.get(i).setName(IssueUtilities.getResolutionName(items.get(i).getValue(), locale)); |
| 250 |
|
} |
| 251 |
|
} |
| 252 |
0
|
return items; |
| 253 |
|
} |
| 254 |
|
|
| 255 |
|
|
| 256 |
|
|
| 257 |
|
|
| 258 |
|
@param |
| 259 |
|
@return |
| 260 |
|
|
| 261 |
|
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
| 262 |
0
|
public Configuration createConfigurationItem(Configuration configuration) {... |
| 263 |
|
|
| 264 |
0
|
Configuration configurationItem = new Configuration(); |
| 265 |
|
|
| 266 |
0
|
configurationItem.setType( configuration.getType() ); |
| 267 |
0
|
configurationItem.setOrder( configuration.getOrder() ); |
| 268 |
0
|
configurationItem.setValue( configuration.getValue() ); |
| 269 |
0
|
configurationItem.setCreateDate(new Date()); |
| 270 |
0
|
configurationItem.setVersion( this.getProperty("version") ); |
| 271 |
0
|
configurationDAO.saveOrUpdate(configurationItem); |
| 272 |
|
|
| 273 |
0
|
return configurationItem; |
| 274 |
|
|
| 275 |
|
} |
| 276 |
|
|
| 277 |
|
|
| 278 |
|
|
| 279 |
|
|
| 280 |
|
@param |
| 281 |
|
@return |
| 282 |
|
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 283 |
0
|
public Configuration updateConfigurationItem(Configuration configuration) {... |
| 284 |
|
|
| 285 |
0
|
Configuration configurationItem = configurationDAO.findByPrimaryKey(configuration.getId()); |
| 286 |
|
|
| 287 |
|
|
| 288 |
0
|
configurationDAO.saveOrUpdate( configurationItem ); |
| 289 |
|
|
| 290 |
0
|
return configurationItem; |
| 291 |
|
} |
| 292 |
|
|
| 293 |
|
|
| 294 |
|
|
| 295 |
|
|
| 296 |
|
@param |
| 297 |
|
@param |
| 298 |
|
@return |
| 299 |
|
|
|
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 2 |
Complexity Density: 0.15 |
|
| 300 |
0
|
public List<Configuration> updateConfigurationItems(List<Configuration> configurations, int type) {... |
| 301 |
|
|
| 302 |
|
|
| 303 |
|
|
| 304 |
0
|
List<Configuration> configurationItems = new ArrayList<Configuration>(); |
| 305 |
0
|
for (Iterator<Configuration> iterator = configurations.iterator(); iterator.hasNext();) { |
| 306 |
|
|
| 307 |
|
|
| 308 |
0
|
Configuration configurationItem = (Configuration) iterator.next(); |
| 309 |
0
|
Configuration curConfiguration = configurationDAO.findByPrimaryKey(configurationItem.getId()); |
| 310 |
|
|
| 311 |
|
|
| 312 |
|
|
| 313 |
0
|
curConfiguration.setName(configurationItem.getName()); |
| 314 |
0
|
curConfiguration.setOrder(configurationItem.getOrder()); |
| 315 |
0
|
curConfiguration.setType(configurationItem.getType()); |
| 316 |
0
|
curConfiguration.setValue(configurationItem.getValue()); |
| 317 |
0
|
curConfiguration.setVersion(configurationItem.getVersion()); |
| 318 |
|
|
| 319 |
|
|
| 320 |
|
|
| 321 |
|
|
| 322 |
0
|
this.configurationDAO.saveOrUpdate( curConfiguration ); |
| 323 |
0
|
configurationItems.add(curConfiguration); |
| 324 |
|
} |
| 325 |
|
|
| 326 |
0
|
Collections.sort(configurationItems); |
| 327 |
|
|
| 328 |
0
|
return configurationItems; |
| 329 |
|
} |
| 330 |
|
|
| 331 |
|
|
| 332 |
|
|
| 333 |
|
|
| 334 |
|
|
| 335 |
|
@param |
| 336 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 337 |
0
|
public void removeConfigurationItem(Integer id) {... |
| 338 |
|
|
| 339 |
0
|
Configuration configBean = this.configurationDAO.findByPrimaryKey(id); |
| 340 |
0
|
if ( configBean != null ) { |
| 341 |
0
|
this.configurationDAO.delete( configBean ); |
| 342 |
|
} |
| 343 |
|
} |
| 344 |
|
|
| 345 |
|
|
| 346 |
|
|
| 347 |
|
|
| 348 |
|
@param |
| 349 |
|
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 350 |
0
|
public void removeConfigurationItems(int type) {... |
| 351 |
|
|
| 352 |
|
|
| 353 |
0
|
Collection<Configuration> currentItems = configurationDAO.findByType(type); |
| 354 |
|
|
| 355 |
0
|
for (Iterator<Configuration> iter = currentItems.iterator(); iter.hasNext();) { |
| 356 |
|
|
| 357 |
0
|
Configuration config = (Configuration) iter.next(); |
| 358 |
|
|
| 359 |
0
|
this.configurationDAO.delete( config ); |
| 360 |
|
} |
| 361 |
|
} |
| 362 |
|
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 363 |
0
|
public void removeConfigurationItems(Configuration configuration) {... |
| 364 |
|
|
| 365 |
|
|
| 366 |
0
|
Collection<Configuration> currentItems = configurationDAO.findByTypeAndValue(configuration.getType(), configuration.getValue()); |
| 367 |
0
|
for (Iterator<Configuration> iter = currentItems.iterator(); iter.hasNext();) { |
| 368 |
0
|
Configuration configItem = (Configuration) iter.next(); |
| 369 |
0
|
configurationDAO.delete(configItem); |
| 370 |
|
} |
| 371 |
|
} |
| 372 |
|
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 5 |
Complexity Density: 1 |
|
| 373 |
0
|
public boolean configurationItemExists(Configuration configuration) {... |
| 374 |
|
|
| 375 |
0
|
if (configuration != null && configuration.getVersion() != null) { |
| 376 |
|
|
| 377 |
0
|
Collection<Configuration> configItems = configurationDAO.findByTypeAndValue(configuration.getType(), configuration.getValue()); |
| 378 |
|
|
| 379 |
0
|
if (configItems != null && configItems.size() > 0) { |
| 380 |
|
|
| 381 |
0
|
return true; |
| 382 |
|
|
| 383 |
|
} |
| 384 |
|
|
| 385 |
|
} |
| 386 |
|
|
| 387 |
0
|
return false; |
| 388 |
|
|
| 389 |
|
} |
| 390 |
|
|
|
|
|
| 0% |
Uncovered Elements: 18 (18) |
Complexity: 6 |
Complexity Density: 0.6 |
|
| 391 |
0
|
public boolean configurationItemUpToDate(Configuration configuration) {... |
| 392 |
|
|
| 393 |
0
|
long currentVersion = 0; |
| 394 |
|
|
| 395 |
0
|
if (configuration != null && configuration.getVersion() != null) { |
| 396 |
|
|
| 397 |
0
|
Collection<Configuration> configItems = configurationDAO.findByTypeAndValue(configuration.getType(), configuration.getValue()); |
| 398 |
|
|
| 399 |
0
|
for (Iterator<Configuration> iter = configItems.iterator(); iter.hasNext();) { |
| 400 |
|
|
| 401 |
0
|
Configuration configItem = (Configuration) iter.next(); |
| 402 |
|
|
| 403 |
0
|
if (configItem != null) { |
| 404 |
|
|
| 405 |
0
|
currentVersion = Math.max(SystemConfigurationUtilities.getVersionAsLong(configItem.getVersion()), |
| 406 |
|
currentVersion); |
| 407 |
|
|
| 408 |
|
} |
| 409 |
|
|
| 410 |
|
} |
| 411 |
|
|
| 412 |
0
|
if (currentVersion >= SystemConfigurationUtilities.getVersionAsLong(configuration.getVersion())) { |
| 413 |
|
|
| 414 |
0
|
return true; |
| 415 |
|
|
| 416 |
|
} |
| 417 |
|
|
| 418 |
|
} |
| 419 |
|
|
| 420 |
0
|
return false; |
| 421 |
|
|
| 422 |
|
} |
| 423 |
|
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 424 |
0
|
public void resetConfigurationCache() {... |
| 425 |
|
|
| 426 |
0
|
IssueUtilities.setResolutions(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION)); |
| 427 |
|
|
| 428 |
0
|
IssueUtilities.setSeverities(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY)); |
| 429 |
|
|
| 430 |
0
|
IssueUtilities.setStatuses(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS)); |
| 431 |
|
|
| 432 |
0
|
IssueUtilities.setCustomFields(getCustomFields()); |
| 433 |
|
|
| 434 |
|
} |
| 435 |
|
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 5 |
Complexity Density: 0.62 |
|
| 436 |
0
|
public void resetConfigurationCache(int type) {... |
| 437 |
|
|
| 438 |
0
|
if (type == SystemConfigurationUtilities.TYPE_RESOLUTION) { |
| 439 |
|
|
| 440 |
0
|
IssueUtilities.setResolutions(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION)); |
| 441 |
|
|
| 442 |
0
|
} else if (type == SystemConfigurationUtilities.TYPE_SEVERITY) { |
| 443 |
|
|
| 444 |
0
|
IssueUtilities.setSeverities(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY)); |
| 445 |
|
|
| 446 |
0
|
} else if (type == SystemConfigurationUtilities.TYPE_STATUS) { |
| 447 |
|
|
| 448 |
0
|
IssueUtilities.setStatuses(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS)); |
| 449 |
|
|
| 450 |
0
|
} else if (type == SystemConfigurationUtilities.TYPE_CUSTOMFIELD) { |
| 451 |
|
|
| 452 |
0
|
IssueUtilities.setCustomFields(getCustomFields()); |
| 453 |
|
|
| 454 |
|
} |
| 455 |
|
|
| 456 |
|
} |
| 457 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 458 |
0
|
public ProjectScript getProjectScript(Integer scriptId) {... |
| 459 |
|
|
| 460 |
0
|
ProjectScript projectScript = this.projectScriptDAO.findByPrimaryKey(scriptId); |
| 461 |
0
|
return projectScript; |
| 462 |
|
|
| 463 |
|
} |
| 464 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 465 |
0
|
public List<ProjectScript> getProjectScripts() {... |
| 466 |
0
|
List<ProjectScript> projectScripts = this.projectScriptDAO.findAll(); |
| 467 |
0
|
return projectScripts; |
| 468 |
|
} |
| 469 |
|
|
| 470 |
|
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 471 |
0
|
public ProjectScript createProjectScript(ProjectScript projectScript) {... |
| 472 |
|
|
| 473 |
|
|
| 474 |
0
|
ProjectScript editprojectScript = new ProjectScript(); |
| 475 |
0
|
editprojectScript.setFieldId(projectScript.getFieldId()); |
| 476 |
0
|
editprojectScript.setPriority(projectScript.getPriority()); |
| 477 |
0
|
editprojectScript.setProject(projectScript.getProject()); |
| 478 |
0
|
editprojectScript.setScript(projectScript.getScript()); |
| 479 |
|
|
| 480 |
|
|
| 481 |
|
|
| 482 |
|
|
| 483 |
|
|
| 484 |
0
|
this.projectScriptDAO.save(editprojectScript); |
| 485 |
|
|
| 486 |
0
|
return editprojectScript; |
| 487 |
|
} |
| 488 |
|
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
| 489 |
0
|
public ProjectScript updateProjectScript(ProjectScript projectScript) {... |
| 490 |
0
|
ProjectScript editprojectScript; |
| 491 |
|
|
| 492 |
0
|
editprojectScript = projectScriptDAO.findByPrimaryKey(projectScript.getId()); |
| 493 |
0
|
editprojectScript.setFieldId(projectScript.getFieldId()); |
| 494 |
0
|
editprojectScript.setPriority(projectScript.getPriority()); |
| 495 |
0
|
editprojectScript.setProject(projectScript.getProject()); |
| 496 |
0
|
editprojectScript.setScript(projectScript.getScript()); |
| 497 |
|
|
| 498 |
|
|
| 499 |
0
|
this.projectScriptDAO.saveOrUpdate(editprojectScript); |
| 500 |
0
|
return editprojectScript; |
| 501 |
|
} |
| 502 |
|
|
| 503 |
|
|
| 504 |
|
|
| 505 |
|
|
| 506 |
|
|
| 507 |
|
@param |
| 508 |
|
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 509 |
0
|
public void removeProjectScript( Integer projectScript_id ) {... |
| 510 |
0
|
if ( projectScript_id != null ) { |
| 511 |
0
|
ProjectScript projectScript = this.projectScriptDAO.findByPrimaryKey(projectScript_id); |
| 512 |
0
|
if ( projectScript != null ) { |
| 513 |
0
|
this.projectScriptDAO.delete(projectScript); |
| 514 |
|
} |
| 515 |
|
} |
| 516 |
|
} |
| 517 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 518 |
0
|
public WorkflowScript getWorkflowScript(Integer id) {... |
| 519 |
|
|
| 520 |
0
|
WorkflowScript workflowScript = workflowScriptDAO.findByPrimaryKey(id); |
| 521 |
|
|
| 522 |
0
|
return workflowScript; |
| 523 |
|
|
| 524 |
|
} |
| 525 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 526 |
0
|
public List<WorkflowScript> getWorkflowScripts() {... |
| 527 |
0
|
List<WorkflowScript> workflowScripts = workflowScriptDAO.findAll(); |
| 528 |
0
|
return workflowScripts; |
| 529 |
|
} |
| 530 |
|
|
| 531 |
|
|
| 532 |
|
|
| 533 |
|
|
| 534 |
|
@param |
| 535 |
|
@return |
| 536 |
|
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
| 537 |
0
|
public WorkflowScript createWorkflowScript(WorkflowScript workflowScript) {... |
| 538 |
|
|
| 539 |
|
|
| 540 |
0
|
WorkflowScript editworkflowScript = new WorkflowScript(); |
| 541 |
0
|
editworkflowScript.setName(workflowScript.getName()); |
| 542 |
0
|
editworkflowScript.setScript(workflowScript.getScript()); |
| 543 |
0
|
editworkflowScript.setEvent(workflowScript.getEvent()); |
| 544 |
|
|
| 545 |
|
|
| 546 |
|
|
| 547 |
|
|
| 548 |
|
|
| 549 |
|
|
| 550 |
0
|
workflowScriptDAO.save(editworkflowScript); |
| 551 |
|
|
| 552 |
0
|
return editworkflowScript; |
| 553 |
|
} |
| 554 |
|
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 555 |
0
|
public WorkflowScript updateWorkflowScript(WorkflowScript workflowScript) {... |
| 556 |
0
|
WorkflowScript editworkflowScript; |
| 557 |
|
|
| 558 |
0
|
editworkflowScript = workflowScriptDAO.findByPrimaryKey(workflowScript.getId()); |
| 559 |
0
|
editworkflowScript.setName(workflowScript.getName()); |
| 560 |
0
|
editworkflowScript.setScript(workflowScript.getScript()); |
| 561 |
0
|
editworkflowScript.setEvent(workflowScript.getEvent()); |
| 562 |
|
|
| 563 |
|
|
| 564 |
0
|
workflowScriptDAO.saveOrUpdate(editworkflowScript); |
| 565 |
0
|
return editworkflowScript; |
| 566 |
|
} |
| 567 |
|
|
| 568 |
|
|
| 569 |
|
|
| 570 |
|
|
| 571 |
|
|
| 572 |
|
@param |
| 573 |
|
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 574 |
0
|
public void removeWorkflowScript( Integer workflowScript_id ) {... |
| 575 |
0
|
if ( workflowScript_id != null ) { |
| 576 |
0
|
WorkflowScript workflowScript = this.workflowScriptDAO.findByPrimaryKey(workflowScript_id); |
| 577 |
0
|
if ( workflowScript != null ) { |
| 578 |
0
|
this.workflowScriptDAO.delete(workflowScript); |
| 579 |
|
} |
| 580 |
|
} |
| 581 |
|
} |
| 582 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 583 |
0
|
public CustomField getCustomField(Integer id) {... |
| 584 |
|
|
| 585 |
0
|
CustomField customField = customFieldDAO.findByPrimaryKey(id); |
| 586 |
|
|
| 587 |
0
|
return customField; |
| 588 |
|
|
| 589 |
|
} |
| 590 |
|
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 591 |
0
|
public List<CustomField> getCustomFields() {... |
| 592 |
0
|
List<CustomField> customFields = customFieldDAO.findAll(); |
| 593 |
0
|
Collections.sort(customFields, new CustomField.NameComparator()); |
| 594 |
0
|
return customFields; |
| 595 |
|
|
| 596 |
|
} |
| 597 |
|
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 3 |
Complexity Density: 0.5 |
|
| 598 |
0
|
public List<CustomField> getCustomFields(Locale locale) {... |
| 599 |
|
|
| 600 |
0
|
if (true) |
| 601 |
0
|
return null; |
| 602 |
|
|
| 603 |
0
|
List<CustomField> fields = getCustomFields(); |
| 604 |
|
|
| 605 |
0
|
for (int i = 0; i < fields.size(); i++) { |
| 606 |
|
|
| 607 |
|
|
| 608 |
|
|
| 609 |
|
} |
| 610 |
0
|
Collections.sort(fields, new CustomField.NameComparator()); |
| 611 |
|
|
| 612 |
0
|
return fields; |
| 613 |
|
|
| 614 |
|
} |
| 615 |
|
|
| 616 |
|
|
| 617 |
|
|
| 618 |
|
|
| 619 |
|
@param |
| 620 |
|
@return |
| 621 |
|
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 622 |
0
|
public CustomField createCustomField(CustomField customField) {... |
| 623 |
0
|
CustomField addcustomField = new CustomField(); |
| 624 |
0
|
addcustomField.setDateFormat(customField.getDateFormat()); |
| 625 |
0
|
addcustomField.setFieldType(customField.getFieldType()); |
| 626 |
0
|
addcustomField.setOptions(customField.getOptions()); |
| 627 |
|
|
| 628 |
0
|
addcustomField.setRequired(customField.isRequired()); |
| 629 |
0
|
this.customFieldDAO.save( addcustomField ); |
| 630 |
|
|
| 631 |
|
|
| 632 |
|
|
| 633 |
|
|
| 634 |
|
|
| 635 |
|
|
| 636 |
|
|
| 637 |
|
|
| 638 |
|
|
| 639 |
|
|
| 640 |
|
|
| 641 |
0
|
return addcustomField; |
| 642 |
|
} |
| 643 |
|
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 644 |
0
|
public CustomField updateCustomField(CustomField customField) {... |
| 645 |
0
|
CustomField editcustomField = customFieldDAO.findByPrimaryKey(customField.getId()); |
| 646 |
|
|
| 647 |
0
|
editcustomField.setDateFormat(customField.getDateFormat()); |
| 648 |
0
|
editcustomField.setFieldType(customField.getFieldType()); |
| 649 |
0
|
editcustomField.setOptions(customField.getOptions()); |
| 650 |
|
|
| 651 |
0
|
editcustomField.setRequired(customField.isRequired()); |
| 652 |
|
|
| 653 |
|
|
| 654 |
|
|
| 655 |
0
|
this.customFieldDAO.saveOrUpdate( editcustomField ); |
| 656 |
|
|
| 657 |
|
|
| 658 |
|
|
| 659 |
|
|
| 660 |
|
|
| 661 |
|
|
| 662 |
|
|
| 663 |
|
|
| 664 |
|
|
| 665 |
|
|
| 666 |
0
|
return editcustomField; |
| 667 |
|
} |
| 668 |
|
|
| 669 |
|
|
| 670 |
|
|
| 671 |
|
|
| 672 |
|
@param |
| 673 |
|
|
|
|
|
| 0% |
Uncovered Elements: 23 (23) |
Complexity: 6 |
Complexity Density: 0.4 |
|
| 674 |
0
|
public boolean removeCustomField(Integer customFieldId) {... |
| 675 |
0
|
boolean status = true; |
| 676 |
0
|
boolean del_Status = true; |
| 677 |
0
|
CustomField customField = customFieldDAO.findByPrimaryKey(customFieldId); |
| 678 |
|
|
| 679 |
0
|
if ( customField != null ) { |
| 680 |
0
|
try { |
| 681 |
0
|
if(customField.getFieldType() == CustomField.Type.LIST) |
| 682 |
0
|
status = this.removeCustomFieldValues(customFieldId); |
| 683 |
0
|
String key = CustomFieldUtilities.getCustomFieldLabelKey(customField.getId()); |
| 684 |
0
|
this.customFieldDAO.delete(customField); |
| 685 |
0
|
if(key != null) |
| 686 |
0
|
status = this.removeLanguageKey(key); |
| 687 |
|
} catch (Exception ex) { |
| 688 |
0
|
del_Status = false; |
| 689 |
|
} |
| 690 |
|
} |
| 691 |
0
|
if ( ! del_Status ) |
| 692 |
0
|
status = del_Status; |
| 693 |
|
|
| 694 |
0
|
return status; |
| 695 |
|
} |
| 696 |
|
|
| 697 |
|
|
| 698 |
|
|
| 699 |
|
|
| 700 |
|
|
| 701 |
|
@param |
| 702 |
|
@return |
| 703 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 704 |
0
|
public CustomFieldValue getCustomFieldValue(Integer id) {... |
| 705 |
|
|
| 706 |
0
|
CustomFieldValue cfvBean = (CustomFieldValue) |
| 707 |
|
this.customFieldValueDAO.findByPrimaryKey(id); |
| 708 |
|
|
| 709 |
0
|
return cfvBean; |
| 710 |
|
} |
| 711 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 712 |
0
|
public CustomFieldValue createCustomFieldValue(CustomFieldValue customFieldValue) {... |
| 713 |
0
|
CustomFieldValue addcustomFieldValue = new CustomFieldValue(); |
| 714 |
0
|
addcustomFieldValue.setCustomField(customFieldValue.getCustomField()); |
| 715 |
0
|
addcustomFieldValue.setValue(customFieldValue.getValue()); |
| 716 |
|
|
| 717 |
0
|
this.customFieldValueDAO.save(addcustomFieldValue); |
| 718 |
|
|
| 719 |
0
|
return addcustomFieldValue; |
| 720 |
|
} |
| 721 |
|
|
| 722 |
|
|
| 723 |
|
|
| 724 |
|
|
| 725 |
|
|
| 726 |
|
@param |
| 727 |
|
@return |
| 728 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 729 |
0
|
public CustomFieldValue updateCustomFieldValue(CustomFieldValue customFieldValue) {... |
| 730 |
0
|
CustomFieldValue editcustomFieldValue = this.customFieldValueDAO.findByPrimaryKey( customFieldValue.getId() ); |
| 731 |
|
|
| 732 |
|
|
| 733 |
0
|
editcustomFieldValue.setCustomField(customFieldValue.getCustomField()); |
| 734 |
0
|
editcustomFieldValue.setValue(customFieldValue.getValue()); |
| 735 |
|
|
| 736 |
|
|
| 737 |
|
|
| 738 |
0
|
this.customFieldValueDAO.saveOrUpdate( editcustomFieldValue ); |
| 739 |
0
|
return editcustomFieldValue; |
| 740 |
|
} |
| 741 |
|
|
|
|
|
| 0% |
Uncovered Elements: 23 (23) |
Complexity: 6 |
Complexity Density: 0.35 |
|
| 742 |
0
|
public List<CustomFieldValue> updateCustomFieldValues(Integer customFieldId, List<CustomFieldValue> customFieldValues) {... |
| 743 |
0
|
List<CustomFieldValue> customFieldValueItems = new ArrayList<CustomFieldValue>(); |
| 744 |
|
|
| 745 |
0
|
if(customFieldId != null) { |
| 746 |
0
|
try { |
| 747 |
0
|
CustomField customField = customFieldDAO.findByPrimaryKey(customFieldId); |
| 748 |
0
|
if(customFieldValues == null || customFieldValues.size() == 0) { |
| 749 |
|
|
| 750 |
|
|
| 751 |
|
} else { |
| 752 |
0
|
for (Iterator<CustomFieldValue> iterator = customFieldValues.iterator(); iterator.hasNext();) { |
| 753 |
|
|
| 754 |
|
|
| 755 |
0
|
CustomFieldValue customFieldValueItem = (CustomFieldValue) iterator.next(); |
| 756 |
0
|
CustomFieldValue curCustomFieldValue = customFieldValueDAO.findByPrimaryKey(customFieldValueItem.getId()); |
| 757 |
|
|
| 758 |
0
|
curCustomFieldValue.setCreateDate(customFieldValueItem.getCreateDate()); |
| 759 |
|
|
| 760 |
|
|
| 761 |
|
|
| 762 |
0
|
curCustomFieldValue.setValue(customFieldValueItem.getValue()); |
| 763 |
0
|
curCustomFieldValue.setCustomField(customFieldValueItem.getCustomField()); |
| 764 |
0
|
curCustomFieldValue.setSortOrder(customFieldValueItem.getSortOrder()); |
| 765 |
|
|
| 766 |
|
|
| 767 |
|
|
| 768 |
|
|
| 769 |
0
|
this.customFieldValueDAO.saveOrUpdate( curCustomFieldValue ); |
| 770 |
0
|
customFieldValueItems.add(curCustomFieldValue); |
| 771 |
|
|
| 772 |
|
} |
| 773 |
|
|
| 774 |
|
|
| 775 |
0
|
customField.setOptions(customFieldValueItems); |
| 776 |
0
|
return customFieldValueItems; |
| 777 |
|
|
| 778 |
|
} |
| 779 |
|
} catch(Exception fe) { |
| 780 |
|
} |
| 781 |
|
} |
| 782 |
|
|
| 783 |
|
|
| 784 |
0
|
return customFieldValues; |
| 785 |
|
} |
| 786 |
|
|
| 787 |
|
|
| 788 |
|
|
| 789 |
|
|
| 790 |
|
@param |
| 791 |
|
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 3 |
Complexity Density: 0.33 |
|
| 792 |
0
|
public boolean removeCustomFieldValue(Integer customFieldValueId) {... |
| 793 |
0
|
boolean status = true; |
| 794 |
0
|
boolean del_Status = true; |
| 795 |
|
|
| 796 |
|
|
| 797 |
0
|
CustomFieldValue customFieldValue = this.customFieldValueDAO.findByPrimaryKey(customFieldValueId); |
| 798 |
|
|
| 799 |
|
|
| 800 |
|
|
| 801 |
|
|
| 802 |
0
|
try { |
| 803 |
0
|
this.customFieldValueDAO.delete(customFieldValue); |
| 804 |
|
} catch (Exception ex) { |
| 805 |
0
|
del_Status = false; |
| 806 |
|
} |
| 807 |
0
|
if ( ! del_Status ) |
| 808 |
0
|
status = del_Status; |
| 809 |
|
|
| 810 |
0
|
return status; |
| 811 |
|
} |
| 812 |
|
|
| 813 |
|
|
| 814 |
|
|
| 815 |
|
|
| 816 |
|
@param |
| 817 |
|
|
|
|
|
| 0% |
Uncovered Elements: 22 (22) |
Complexity: 5 |
Complexity Density: 0.31 |
|
| 818 |
0
|
public boolean removeCustomFieldValues(Integer customFieldId) {... |
| 819 |
0
|
boolean status = true; |
| 820 |
0
|
boolean lp_Status = true; |
| 821 |
0
|
CustomField customField = this.customFieldDAO.findByPrimaryKey( customFieldId ); |
| 822 |
|
|
| 823 |
0
|
List<CustomFieldValue> customFieldValues = customField.getOptions(); |
| 824 |
0
|
for ( Iterator<CustomFieldValue> iter = customFieldValues.iterator(); iter.hasNext();) { |
| 825 |
|
|
| 826 |
0
|
CustomFieldValue customFieldValue = (CustomFieldValue)iter.next(); |
| 827 |
0
|
String key = CustomFieldUtilities.getCustomFieldOptionLabelKey(customFieldId, customFieldValue.getId()); |
| 828 |
|
|
| 829 |
0
|
iter.remove(); |
| 830 |
|
|
| 831 |
0
|
try { |
| 832 |
0
|
this.customFieldValueDAO.delete( customFieldValue ); |
| 833 |
|
|
| 834 |
0
|
if(key != null) |
| 835 |
0
|
status = this.removeLanguageKey(key); |
| 836 |
|
} catch (Exception ex) { |
| 837 |
0
|
lp_Status = false; |
| 838 |
|
} |
| 839 |
|
} |
| 840 |
0
|
if (! lp_Status ) |
| 841 |
0
|
status = lp_Status; |
| 842 |
|
|
| 843 |
0
|
return status; |
| 844 |
|
} |
| 845 |
|
|
|
|
|
| 0% |
Uncovered Elements: 24 (24) |
Complexity: 8 |
Complexity Density: 0.5 |
|
| 846 |
0
|
public Language getLanguageItemByKey(String key, Locale locale) {... |
| 847 |
0
|
Language languageItem; |
| 848 |
0
|
try { |
| 849 |
0
|
languageItem = languageDAO.findByKeyAndLocale(key, ITrackerResources.BASE_LOCALE); |
| 850 |
|
} catch (RuntimeException e) { |
| 851 |
0
|
languageItem = null; |
| 852 |
|
} |
| 853 |
|
|
| 854 |
0
|
if (null == locale){ |
| 855 |
|
|
| 856 |
0
|
locale = ITrackerResources.getLocale(ITrackerResources.BASE_LOCALE); |
| 857 |
|
|
| 858 |
|
} |
| 859 |
0
|
try { |
| 860 |
0
|
return languageDAO.findByKeyAndLocale(key, locale.getLanguage()); |
| 861 |
|
} catch (RuntimeException re) { |
| 862 |
0
|
if (null == languageItem) { |
| 863 |
0
|
languageItem = new Language(locale.getDisplayName(), key, ITrackerResources.getBundle(locale.getLanguage()).getString(key)); |
| 864 |
|
} |
| 865 |
|
} |
| 866 |
0
|
if (!"".equals(locale.getCountry())) { |
| 867 |
0
|
try { |
| 868 |
0
|
return languageDAO.findByKeyAndLocale(key, locale.toString()); |
| 869 |
|
} catch (RuntimeException ex){ |
| 870 |
0
|
if (null == languageItem){ |
| 871 |
0
|
return new Language(locale.getDisplayName(), key, ITrackerResources.getBundle(locale).getString(key)); |
| 872 |
|
} |
| 873 |
|
} |
| 874 |
|
} |
| 875 |
|
|
| 876 |
0
|
return languageItem; |
| 877 |
|
|
| 878 |
|
} |
| 879 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 880 |
0
|
public List<Language> getLanguageItemsByKey(String key) {... |
| 881 |
0
|
List<Language> languageItems = languageDAO.findByKey(key); |
| 882 |
|
|
| 883 |
0
|
return languageItems; |
| 884 |
|
} |
| 885 |
|
|
|
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 2 |
Complexity Density: 0.13 |
|
| 886 |
0
|
public Language updateLanguageItem(Language language) {... |
| 887 |
0
|
Language languageItem; |
| 888 |
|
|
| 889 |
0
|
try { |
| 890 |
0
|
languageItem = languageDAO.findByKeyAndLocale(language.getResourceKey(), language.getLocale()); |
| 891 |
0
|
languageItem.setLocale(language.getLocale()); |
| 892 |
0
|
languageItem.setResourceKey(language.getResourceKey()); |
| 893 |
0
|
languageItem.setResourceValue(language.getResourceValue()); |
| 894 |
|
|
| 895 |
|
|
| 896 |
|
} catch (NoSuchEntityException fe) { |
| 897 |
0
|
logger.debug("NoSuchEntityException: Language, now populating Language"); |
| 898 |
0
|
languageItem = new Language(); |
| 899 |
0
|
languageItem.setLocale(language.getLocale()); |
| 900 |
0
|
languageItem.setResourceKey(language.getResourceKey()); |
| 901 |
0
|
languageItem.setResourceValue(language.getResourceValue()); |
| 902 |
|
|
| 903 |
|
|
| 904 |
|
|
| 905 |
|
} |
| 906 |
0
|
logger.debug("Start saveOrUpdate Language"); |
| 907 |
0
|
languageDAO.saveOrUpdate(languageItem); |
| 908 |
0
|
logger.debug("Saved Language"); |
| 909 |
0
|
return languageItem; |
| 910 |
|
} |
| 911 |
|
|
| 912 |
|
|
| 913 |
|
|
| 914 |
|
|
| 915 |
|
@param |
| 916 |
|
|
|
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 4 |
Complexity Density: 0.36 |
|
| 917 |
0
|
public boolean removeLanguageKey(String key) {... |
| 918 |
0
|
boolean status = true; |
| 919 |
0
|
boolean lp_Status = true; |
| 920 |
|
|
| 921 |
|
|
| 922 |
0
|
List<Language> languageItems = languageDAO.findByKey(key); |
| 923 |
|
|
| 924 |
0
|
for (Iterator<Language> iter = languageItems.iterator(); iter.hasNext();) { |
| 925 |
|
|
| 926 |
0
|
Language language = (Language) iter.next(); |
| 927 |
0
|
try { |
| 928 |
0
|
this.languageDAO.delete(language); |
| 929 |
|
} catch (Exception ex) { |
| 930 |
0
|
lp_Status = false; |
| 931 |
|
} |
| 932 |
|
} |
| 933 |
0
|
if ( ! lp_Status ) |
| 934 |
0
|
status = lp_Status; |
| 935 |
|
|
| 936 |
0
|
return status; |
| 937 |
|
} |
| 938 |
|
|
| 939 |
|
|
| 940 |
|
|
| 941 |
|
@param |
| 942 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 943 |
0
|
public void removeLanguageItem(Language language) {... |
| 944 |
|
|
| 945 |
0
|
Language languageItem = languageDAO.findByKeyAndLocale(language.getResourceKey(), language.getLocale()); |
| 946 |
|
|
| 947 |
0
|
if ( languageItem != null ) { |
| 948 |
|
|
| 949 |
0
|
this.languageDAO.delete( languageItem ); |
| 950 |
|
} |
| 951 |
|
} |
| 952 |
|
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 2 |
Complexity Density: 0.25 |
|
| 953 |
0
|
public String[] getSortedKeys() {... |
| 954 |
|
|
| 955 |
0
|
int i = 0; |
| 956 |
0
|
Collection<Language> items = languageDAO.findByLocale(ITrackerResources.BASE_LOCALE); |
| 957 |
0
|
String[] sortedKeys = new String[items.size()]; |
| 958 |
|
|
| 959 |
0
|
for (Iterator<Language> iter = items.iterator(); iter.hasNext(); i++) { |
| 960 |
0
|
Language item = (Language) iter.next(); |
| 961 |
0
|
sortedKeys[i] = item.getResourceKey(); |
| 962 |
|
} |
| 963 |
|
|
| 964 |
|
|
| 965 |
|
|
| 966 |
0
|
Arrays.sort(sortedKeys); |
| 967 |
0
|
return sortedKeys; |
| 968 |
|
|
| 969 |
|
} |
| 970 |
|
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 4 |
Complexity Density: 0.5 |
|
| 971 |
0
|
public HashMap<String,String> getDefinedKeys(String locale) {... |
| 972 |
|
|
| 973 |
0
|
HashMap<String,String> keys = new HashMap<String,String>(); |
| 974 |
|
|
| 975 |
0
|
if (locale == null || locale.equals("")) { |
| 976 |
0
|
locale = ITrackerResources.BASE_LOCALE; |
| 977 |
|
} |
| 978 |
|
|
| 979 |
|
|
| 980 |
0
|
Collection<Language> items = languageDAO.findByLocale(locale); |
| 981 |
0
|
for (Iterator<Language> iter = items.iterator(); iter.hasNext();) { |
| 982 |
0
|
Language item = (Language) iter.next(); |
| 983 |
0
|
keys.put(item.getResourceKey(), item.getResourceValue()); |
| 984 |
|
} |
| 985 |
|
|
| 986 |
|
|
| 987 |
0
|
return keys; |
| 988 |
|
|
| 989 |
|
} |
| 990 |
|
|
|
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 4 |
Complexity Density: 0.36 |
|
| 991 |
0
|
public List<NameValuePair> getDefinedKeysAsArray(String locale) {... |
| 992 |
0
|
NameValuePair[] keys = null; |
| 993 |
0
|
if (locale == null || locale.equals("")) { |
| 994 |
0
|
locale = ITrackerResources.BASE_LOCALE; |
| 995 |
|
} |
| 996 |
|
|
| 997 |
0
|
int i = 0; |
| 998 |
0
|
Collection<Language> items = languageDAO.findByLocale(locale); |
| 999 |
0
|
keys = new NameValuePair[items.size()]; |
| 1000 |
|
|
| 1001 |
0
|
for (Iterator<Language> iter = items.iterator(); iter.hasNext(); i++) { |
| 1002 |
0
|
Language item = (Language) iter.next(); |
| 1003 |
0
|
keys[i] = new NameValuePair(item.getResourceKey(), item.getResourceValue()); |
| 1004 |
|
} |
| 1005 |
|
|
| 1006 |
0
|
Arrays.sort(keys); |
| 1007 |
0
|
return Arrays.asList(keys); |
| 1008 |
|
|
| 1009 |
|
} |
| 1010 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1011 |
0
|
public int getNumberDefinedKeys(String locale) {... |
| 1012 |
|
|
| 1013 |
0
|
return getDefinedKeys(locale).size(); |
| 1014 |
|
|
| 1015 |
|
} |
| 1016 |
|
|
|
|
|
| 0% |
Uncovered Elements: 22 (22) |
Complexity: 4 |
Complexity Density: 0.29 |
|
| 1017 |
0
|
public List<Language> getLanguage(Locale locale) {... |
| 1018 |
|
|
| 1019 |
|
|
| 1020 |
0
|
Map<String,String> language = new HashMap<String,String>(); |
| 1021 |
|
|
| 1022 |
0
|
if (locale == null) { |
| 1023 |
0
|
locale = new Locale(""); |
| 1024 |
|
} |
| 1025 |
|
|
| 1026 |
0
|
String localeString = (locale.toString().equals("") ? ITrackerResources.BASE_LOCALE : locale.toString()); |
| 1027 |
|
|
| 1028 |
0
|
Collection<Language> items = languageDAO.findByLocale(localeString); |
| 1029 |
|
|
| 1030 |
0
|
for (Iterator<Language> iterator = items.iterator(); iterator.hasNext();) { |
| 1031 |
|
|
| 1032 |
0
|
Language item = (Language) iterator.next(); |
| 1033 |
|
|
| 1034 |
0
|
language.put(item.getResourceKey(), item.getResourceValue()); |
| 1035 |
|
|
| 1036 |
|
} |
| 1037 |
|
|
| 1038 |
|
|
| 1039 |
|
|
| 1040 |
|
|
| 1041 |
|
|
| 1042 |
|
|
| 1043 |
|
|
| 1044 |
|
|
| 1045 |
|
|
| 1046 |
|
|
| 1047 |
|
|
| 1048 |
|
|
| 1049 |
|
|
| 1050 |
|
|
| 1051 |
|
|
| 1052 |
|
|
| 1053 |
|
|
| 1054 |
|
|
| 1055 |
|
|
| 1056 |
|
|
| 1057 |
|
|
| 1058 |
|
|
| 1059 |
|
|
| 1060 |
|
|
| 1061 |
|
|
| 1062 |
|
|
| 1063 |
|
|
| 1064 |
|
|
| 1065 |
0
|
Language[] languageArray = new Language[language.size()]; |
| 1066 |
|
|
| 1067 |
0
|
int i = 0; |
| 1068 |
|
|
| 1069 |
|
|
| 1070 |
0
|
for (Iterator<String> iterator = language.keySet().iterator(); iterator.hasNext(); i++) { |
| 1071 |
|
|
| 1072 |
0
|
String key = (String) iterator.next(); |
| 1073 |
|
|
| 1074 |
0
|
languageArray[i] = new Language(localeString, key, (String) language.get(key)); |
| 1075 |
|
|
| 1076 |
|
} |
| 1077 |
|
|
| 1078 |
0
|
return Arrays.asList(languageArray); |
| 1079 |
|
|
| 1080 |
|
} |
| 1081 |
|
|
|
|
|
| 0% |
Uncovered Elements: 27 (27) |
Complexity: 10 |
Complexity Density: 0.67 |
|
| 1082 |
0
|
public HashMap<String,List<String>> getAvailableLanguages() {... |
| 1083 |
|
|
| 1084 |
0
|
HashMap<String,List<String>> languages = new HashMap<String,List<String>>(); |
| 1085 |
0
|
List<Configuration> locales = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_LOCALE); |
| 1086 |
|
|
| 1087 |
0
|
for (int i = 0; i < locales.size(); i++) { |
| 1088 |
0
|
String Baselocalestring = locales.get(i).getValue(); |
| 1089 |
0
|
if (! ITrackerResources.BASE_LOCALE.equalsIgnoreCase(Baselocalestring)) { |
| 1090 |
|
|
| 1091 |
0
|
if (Baselocalestring.length() == 2) { |
| 1092 |
|
|
| 1093 |
0
|
List<String> languageList = new ArrayList<String>(); |
| 1094 |
0
|
for (int j = 0; j < locales.size(); j++) { |
| 1095 |
0
|
String localestring = locales.get(j).getValue(); |
| 1096 |
0
|
if (!ITrackerResources.BASE_LOCALE.equalsIgnoreCase(localestring) && localestring.length() > 2 ) { |
| 1097 |
0
|
String baseLanguage = localestring.substring(0, 2); |
| 1098 |
0
|
if (baseLanguage.equals(Baselocalestring) && localestring.length() == 5 && localestring.indexOf('_') == 2) { |
| 1099 |
0
|
languageList.add(localestring); |
| 1100 |
|
} |
| 1101 |
|
} |
| 1102 |
|
} |
| 1103 |
0
|
languages.put(Baselocalestring,languageList); |
| 1104 |
|
} |
| 1105 |
|
} |
| 1106 |
|
} |
| 1107 |
|
|
| 1108 |
0
|
return languages; |
| 1109 |
|
|
| 1110 |
|
} |
| 1111 |
|
|
|
|
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 4 |
Complexity Density: 0.4 |
|
| 1112 |
0
|
@SuppressWarnings("unchecked")... |
| 1113 |
|
public int getNumberAvailableLanguages() { |
| 1114 |
|
|
| 1115 |
0
|
int numLanguages = 0; |
| 1116 |
0
|
HashMap<String,List<String>> availableLanguages = getAvailableLanguages(); |
| 1117 |
|
|
| 1118 |
0
|
for (Iterator iter = availableLanguages.keySet().iterator(); iter.hasNext();) { |
| 1119 |
0
|
List<List> languages = new ArrayList<List>(); |
| 1120 |
0
|
List list = availableLanguages.get((String)iter.next()); |
| 1121 |
0
|
languages.add(list); |
| 1122 |
|
|
| 1123 |
0
|
if (languages != null && languages.size() > 0) { |
| 1124 |
0
|
numLanguages += languages.size(); |
| 1125 |
|
} else { |
| 1126 |
0
|
numLanguages += 1; |
| 1127 |
|
} |
| 1128 |
|
|
| 1129 |
|
} |
| 1130 |
|
|
| 1131 |
0
|
return numLanguages; |
| 1132 |
|
|
| 1133 |
|
} |
| 1134 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
| 1135 |
0
|
public void updateLanguage(Locale locale, List<Language> items) {... |
| 1136 |
|
|
| 1137 |
0
|
if (locale != null && items != null) { |
| 1138 |
0
|
Configuration configItem = new Configuration(SystemConfigurationUtilities.TYPE_LOCALE, locale |
| 1139 |
|
.toString(), props.getProperty("version")); |
| 1140 |
0
|
updateLanguage(locale, items, configItem); |
| 1141 |
|
|
| 1142 |
|
} |
| 1143 |
|
|
| 1144 |
|
} |
| 1145 |
|
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
| 1146 |
0
|
public void updateLanguage(Locale locale, List<Language> items, Configuration configItem) {... |
| 1147 |
0
|
for (int i = 0; i < items.size(); i++) { |
| 1148 |
|
|
| 1149 |
0
|
if (items.get(i) != null) { |
| 1150 |
0
|
updateLanguageItem(items.get(i)); |
| 1151 |
|
} |
| 1152 |
|
} |
| 1153 |
0
|
removeConfigurationItems(configItem); |
| 1154 |
0
|
createConfigurationItem(configItem); |
| 1155 |
|
} |
| 1156 |
|
|
|
|
|
| 0% |
Uncovered Elements: 21 (21) |
Complexity: 4 |
Complexity Density: 0.27 |
|
| 1157 |
0
|
public SystemConfiguration getSystemConfiguration(Locale locale) {... |
| 1158 |
|
|
| 1159 |
0
|
SystemConfiguration config = new SystemConfiguration(); |
| 1160 |
|
|
| 1161 |
|
|
| 1162 |
|
|
| 1163 |
0
|
List<Configuration> resolutions = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION); |
| 1164 |
|
|
| 1165 |
0
|
for (int i = 0; i < resolutions.size(); i++) { |
| 1166 |
|
|
| 1167 |
0
|
resolutions.get(i).setName(ITrackerResources.getString(SystemConfigurationUtilities |
| 1168 |
|
.getLanguageKey(resolutions.get(i)), locale)); |
| 1169 |
|
|
| 1170 |
|
} |
| 1171 |
|
|
| 1172 |
0
|
config.setResolutions(resolutions); |
| 1173 |
|
|
| 1174 |
0
|
List<Configuration> severities = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY); |
| 1175 |
|
|
| 1176 |
0
|
for (int i = 0; i < severities.size(); i++) { |
| 1177 |
|
|
| 1178 |
0
|
severities.get(i).setName(ITrackerResources.getString(SystemConfigurationUtilities |
| 1179 |
|
.getLanguageKey(severities.get(i)), locale)); |
| 1180 |
|
|
| 1181 |
|
} |
| 1182 |
|
|
| 1183 |
0
|
config.setSeverities(severities); |
| 1184 |
|
|
| 1185 |
0
|
List<Configuration> statuses = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS); |
| 1186 |
|
|
| 1187 |
0
|
for (int i = 0; i < statuses.size(); i++) { |
| 1188 |
|
|
| 1189 |
0
|
statuses.get(i).setName(ITrackerResources.getString(SystemConfigurationUtilities.getLanguageKey(statuses.get(i)), |
| 1190 |
|
locale)); |
| 1191 |
|
|
| 1192 |
|
} |
| 1193 |
|
|
| 1194 |
0
|
config.setStatuses(statuses); |
| 1195 |
|
|
| 1196 |
|
|
| 1197 |
|
|
| 1198 |
|
|
| 1199 |
|
|
| 1200 |
|
|
| 1201 |
|
|
| 1202 |
0
|
config.setVersion(props.getProperty("version")); |
| 1203 |
|
|
| 1204 |
0
|
return config; |
| 1205 |
|
|
| 1206 |
|
} |
| 1207 |
|
|
| 1208 |
|
|
| 1209 |
|
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 3 |
Complexity Density: 0.33 |
|
| 1210 |
0
|
public boolean initializeLocale(String locale, boolean forceReload) {... |
| 1211 |
0
|
boolean result = false; |
| 1212 |
|
|
| 1213 |
0
|
Configuration localeConfig = new Configuration(SystemConfigurationUtilities.TYPE_LOCALE, locale, |
| 1214 |
|
props.getProperty("version")); |
| 1215 |
|
|
| 1216 |
0
|
if (!configurationItemUpToDate(localeConfig) || forceReload) { |
| 1217 |
|
|
| 1218 |
0
|
logger.debug("Loading database with locale " + locale); |
| 1219 |
|
|
| 1220 |
|
|
| 1221 |
|
|
| 1222 |
|
|
| 1223 |
|
|
| 1224 |
|
|
| 1225 |
|
|
| 1226 |
|
|
| 1227 |
|
|
| 1228 |
|
|
| 1229 |
|
|
| 1230 |
|
|
| 1231 |
|
|
| 1232 |
|
|
| 1233 |
|
|
| 1234 |
|
|
| 1235 |
|
|
| 1236 |
|
|
| 1237 |
0
|
removeConfigurationItems(localeConfig); |
| 1238 |
|
|
| 1239 |
0
|
createConfigurationItem(localeConfig); |
| 1240 |
|
|
| 1241 |
0
|
ITrackerResources.clearBundle(ITrackerResources.getLocale(locale)); |
| 1242 |
|
|
| 1243 |
0
|
result = true; |
| 1244 |
|
|
| 1245 |
|
|
| 1246 |
|
} |
| 1247 |
|
|
| 1248 |
0
|
return result; |
| 1249 |
|
|
| 1250 |
|
} |
| 1251 |
|
|
|
|
|
| 0% |
Uncovered Elements: 54 (54) |
Complexity: 12 |
Complexity Density: 0.3 |
|
| 1252 |
0
|
public void initializeConfiguration() {... |
| 1253 |
|
|
| 1254 |
|
|
| 1255 |
|
|
| 1256 |
|
|
| 1257 |
|
|
| 1258 |
|
|
| 1259 |
|
|
| 1260 |
0
|
List<Configuration> initialized = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_INITIALIZED); |
| 1261 |
|
|
| 1262 |
0
|
if (initialized == null || initialized.size() != 1) { |
| 1263 |
|
|
| 1264 |
0
|
logger.debug("System does not appear to be initialized, initializing system configuration."); |
| 1265 |
|
|
| 1266 |
0
|
ResourceBundle baseLanguage = ITrackerResources.getBundle(ITrackerResources.getLocale(ITrackerResources.BASE_LOCALE)); |
| 1267 |
0
|
getLanguage(ITrackerResources.getLocale(ITrackerResources.BASE_LOCALE)); |
| 1268 |
|
|
| 1269 |
0
|
if (baseLanguage == null) { |
| 1270 |
|
|
| 1271 |
0
|
throw new IllegalStateException ( |
| 1272 |
|
"Languages must be initialized before the system configuration can be loaded."); |
| 1273 |
|
|
| 1274 |
|
} |
| 1275 |
|
|
| 1276 |
|
|
| 1277 |
|
|
| 1278 |
|
|
| 1279 |
0
|
logger.debug("Removing previous incomplete initialization information."); |
| 1280 |
|
|
| 1281 |
0
|
removeConfigurationItems(SystemConfigurationUtilities.TYPE_STATUS); |
| 1282 |
|
|
| 1283 |
0
|
removeConfigurationItems(SystemConfigurationUtilities.TYPE_SEVERITY); |
| 1284 |
|
|
| 1285 |
0
|
removeConfigurationItems(SystemConfigurationUtilities.TYPE_RESOLUTION); |
| 1286 |
0
|
Enumeration<String> keys = baseLanguage.getKeys(); |
| 1287 |
0
|
while (keys.hasMoreElements()) { |
| 1288 |
0
|
String key = keys.nextElement(); |
| 1289 |
0
|
if (key.startsWith(ITrackerResources.KEY_BASE_RESOLUTION)) { |
| 1290 |
|
|
| 1291 |
0
|
try { |
| 1292 |
|
|
| 1293 |
0
|
String resolutionString = key.substring(20); |
| 1294 |
0
|
if (Log.isDebugEnabled()) { |
| 1295 |
0
|
logger.debug("Adding new configuration resolution value: " + resolutionString); |
| 1296 |
|
} |
| 1297 |
0
|
int resolutionNumber = Integer.parseInt(resolutionString); |
| 1298 |
|
|
| 1299 |
0
|
createConfigurationItem(new Configuration( |
| 1300 |
|
SystemConfigurationUtilities.TYPE_RESOLUTION, resolutionString, props |
| 1301 |
|
.getProperty("version"), resolutionNumber)); |
| 1302 |
|
|
| 1303 |
|
} catch (RuntimeException e) { |
| 1304 |
|
|
| 1305 |
0
|
logger.error("Unable to load resolution value: " + key, e); |
| 1306 |
0
|
throw e; |
| 1307 |
|
|
| 1308 |
|
} |
| 1309 |
|
|
| 1310 |
|
} |
| 1311 |
|
|
| 1312 |
0
|
if (key.startsWith(ITrackerResources.KEY_BASE_SEVERITY)) { |
| 1313 |
|
|
| 1314 |
0
|
try { |
| 1315 |
|
|
| 1316 |
0
|
String severityString = key.substring(18); |
| 1317 |
|
|
| 1318 |
0
|
logger.debug("Adding new configuration severity value: " + severityString); |
| 1319 |
|
|
| 1320 |
0
|
int severityNumber = Integer.parseInt(severityString); |
| 1321 |
|
|
| 1322 |
0
|
createConfigurationItem(new Configuration(SystemConfigurationUtilities.TYPE_SEVERITY, |
| 1323 |
|
severityString, props.getProperty("version"), severityNumber)); |
| 1324 |
|
|
| 1325 |
|
} catch (RuntimeException e) { |
| 1326 |
|
|
| 1327 |
0
|
logger.error("Unable to load severity value: " + key, e); |
| 1328 |
0
|
throw e; |
| 1329 |
|
} |
| 1330 |
|
|
| 1331 |
|
} |
| 1332 |
|
|
| 1333 |
0
|
if (key.startsWith(ITrackerResources.KEY_BASE_STATUS)) { |
| 1334 |
|
|
| 1335 |
0
|
try { |
| 1336 |
|
|
| 1337 |
0
|
String statusString = key.substring(16); |
| 1338 |
|
|
| 1339 |
0
|
logger.debug("Adding new configuration status value: " + statusString); |
| 1340 |
|
|
| 1341 |
0
|
int statusNumber = Integer.parseInt(statusString); |
| 1342 |
|
|
| 1343 |
0
|
createConfigurationItem(new Configuration(SystemConfigurationUtilities.TYPE_STATUS, |
| 1344 |
|
statusString, props.getProperty("version"), statusNumber)); |
| 1345 |
|
} catch (RuntimeException e) { |
| 1346 |
0
|
logger.error("Unable to load status value: " + key, e); |
| 1347 |
0
|
throw e; |
| 1348 |
|
} |
| 1349 |
|
} |
| 1350 |
|
} |
| 1351 |
0
|
createConfigurationItem(new Configuration(SystemConfigurationUtilities.TYPE_INITIALIZED, "1", |
| 1352 |
|
props.getProperty("version"))); |
| 1353 |
|
} |
| 1354 |
|
|
| 1355 |
|
|
| 1356 |
|
} |
| 1357 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1358 |
0
|
public LanguageDAO getLanguageDAO() {... |
| 1359 |
0
|
return languageDAO; |
| 1360 |
|
} |
| 1361 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1362 |
0
|
public ConfigurationDAO getConfigurationDAO() {... |
| 1363 |
0
|
return configurationDAO; |
| 1364 |
|
} |
| 1365 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1366 |
0
|
public CustomFieldDAO getCustomFieldDAO() {... |
| 1367 |
0
|
return customFieldDAO; |
| 1368 |
|
} |
| 1369 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1370 |
0
|
public CustomFieldValueDAO getCustomFieldValueDAO() {... |
| 1371 |
0
|
return customFieldValueDAO; |
| 1372 |
|
} |
| 1373 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1374 |
0
|
public WorkflowScriptDAO getWorkflowScriptDAO() {... |
| 1375 |
0
|
return workflowScriptDAO; |
| 1376 |
|
} |
| 1377 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1378 |
0
|
public String getSystemBaseURL() {... |
| 1379 |
0
|
return getProperty(PNAME_SYSTEM_BASE_URL); |
| 1380 |
|
} |
| 1381 |
|
} |