Exemplo n.º 1
0
 @Override
 protected List<? extends Violation> check(final List<Notification> notifications) {
   return TransactionUtils.reading(
       plan,
       new RunnableWithResult.Impl<List<? extends Violation>>() {
         @Override
         public void run() {
           Set<EPlanElement> affectedElements = getAffectedElements(notifications);
           List<Violation> violations = findViolations(affectedElements);
           setResult(violations);
         }
       });
 }
Exemplo n.º 2
0
 @Override
 protected List<? extends Violation> initialize() {
   return TransactionUtils.reading(
       plan,
       new RunnableWithResult.Impl<List<? extends Violation>>() {
         @Override
         public void run() {
           if (isQuit()) {
             return;
           }
           final List<EPlanElement> affectedElements = new ArrayList<EPlanElement>();
           new PlanVisitor() {
             @Override
             protected void visit(EPlanElement element) {
               affectedElements.add(element);
             }
           }.visitAll(plan);
           List<Violation> violations = findViolations(affectedElements);
           setResult(violations);
         }
       });
 }