Find out the state of a PRERULE check @param aKey @return true or false
(final String aKey)
| 511 | * @return true or false |
| 512 | */ |
| 513 | public static boolean checkRule(final String aKey) |
| 514 | { |
| 515 | final RuleCheck rule = SettingsHandler.getGameAsProperty().get().getModeContext().getReferenceContext() |
| 516 | .silentlyGetConstructedCDOMObject(RuleCheck.class, aKey); |
| 517 | if (rule == null) |
| 518 | { |
| 519 | return false; |
| 520 | } |
| 521 | if (SettingsHandler.hasRuleCheck(aKey)) |
| 522 | { |
| 523 | return SettingsHandler.getRuleCheck(aKey); |
| 524 | } |
| 525 | else |
| 526 | { |
| 527 | return rule.getDefault(); |
| 528 | } |
| 529 | } |
| 530 | |
| 531 | /** |
| 532 | * This method is called by the persistence layer to clear the global |