Exemple #1
0
    /**
     * show the details
     *
     * @param tree
     * @param loexplorernode
     */
    private void cmdRemoveUsage(JTree tree, final RuleExplorerNode explorerNode) {
      final RuleAndRuleUsageEntity ruleUsage =
          ((RuleNode) explorerNode.getTreeNode()).getRuleEntity();
      if (ruleUsage != null) {
        try {
          String sMessage =
              getSpringLocaleDelegate()
                      .getMessage(
                          "RuleExplorerNode.2", "Soll die Verwendung wirklich gel\u00f6scht werden")
                  + "?";
          final int btn =
              JOptionPane.showConfirmDialog(
                  tree,
                  sMessage,
                  getSpringLocaleDelegate()
                      .getMessage("RuleExplorerNode.4", "Verwendung l\u00f6schen"),
                  JOptionPane.YES_NO_OPTION);

          if (btn == JOptionPane.YES_OPTION) {
            RuleDelegate.getInstance()
                .removeRuleUsage(
                    ruleUsage.getEventName(),
                    ruleUsage.getEntity(),
                    ruleUsage.getProcessId(),
                    ruleUsage.getStatusId(),
                    ruleUsage.getRuleVo().getId());
            ((ExplorerNode<?>) RuleExplorerNode.this.getParent()).refresh(tree);
          }
        } catch (CommonBusinessException ex) {
          Errors.getInstance().showExceptionDialog(tree, ex);
        }
      }
    }
Exemple #2
0
 /**
  * command: show the details of the leased object represented by the given explorernode
  *
  * @param tree
  * @param loexplorernode
  */
 private void cmdShowDetails(JTree tree, final RuleExplorerNode explorerNode) {
   RuleNode ruleNode = (RuleNode) explorerNode.getTreeNode();
   RuleVO rulevo = ruleNode.getRuleVo();
   if (rulevo != null) {
     final CollectControllerFactorySingleton factory =
         CollectControllerFactorySingleton.getInstance();
     if (ruleNode.isTimeLimitRule) {
       TimelimitRuleCollectController ctl = factory.newTimelimitRuleCollectController(null);
       try {
         ctl.runViewSingleCollectableWithId(rulevo.getId());
       } catch (CommonBusinessException e) {
         Errors.getInstance().showExceptionDialog(Main.getInstance().getMainFrame(), e);
       }
     } else {
       RuleCollectController ctl = factory.newRuleCollectController(null);
       ctl.runViewSingleCollectable(new CollectableRule(rulevo));
     }
   }
 }