Examples of canBeDeleted()


Examples of com.yummynoodlebar.core.domain.Order.canBeDeleted()

    OrderDetails details = order.toOrderDetails();

    //TODOCUMENT This contains some specific domain logic, not exposed to the outside world, and not part of the
    //persistence rules.

    if (!order.canBeDeleted()) {
      return OrderDeletedEvent.deletionForbidden(deleteOrderEvent.getKey(), details);
    }

    ordersRepository.delete(deleteOrderEvent.getKey());
    return new OrderDeletedEvent(deleteOrderEvent.getKey(), details);
View Full Code Here

Examples of com.yummynoodlebar.core.domain.Order.canBeDeleted()

      return OrderDeletedEvent.notFound(deleteOrderEvent.getKey());
    }

    Order order = Order.fromOrderDetails(orderDetailsEvent.getOrderDetails());

    if (!order.canBeDeleted()) {
      return OrderDeletedEvent.deletionForbidden(deleteOrderEvent.getKey(), order.toOrderDetails());
    }

    ordersPersistenceService.deleteOrder(deleteOrderEvent);
View Full Code Here

Examples of com.zycus.dotproject.bo.BOTask.canBeDeleted()

    }
    int[] rows = getSelectedRows();
    for (int row : rows) {
      if (row > 0) {// to ensure not delete project
        BOTask task = (BOTask) getValueAt(row, -1);
        if (task.canBeDeleted(currentUser) == false) {
          StatusBar.showErrorStatusMessage("You do not have sufficient privilege to delete task");
          continue;
        }
       
        ProjectCalculator.taskDeleted(task, currentUser);
View Full Code Here

Examples of com.zycus.dotproject.bo.BOTask.canBeDeleted()

      return;
    }
    for (int row : rows) {
      if (row > 0) {// to ensure not edit project
        BOTask task = (BOTask) getValueAt(row, -1);
        if (task.canBeDeleted(ApplicationContext.getCurrentUser()) == false) {
          StatusBar.showWarningStatusMessage("You do not have sufficient privilege to edit task");
          continue;
        }
        if (col == 3) {
          System.out.println("ProjectTaskArea.onDeleteCellValue(Assinees)");
View Full Code Here

Examples of org.apache.sling.ide.eclipse.ui.nav.model.JcrNode.canBeDeleted()

      IStructuredSelection iss = (IStructuredSelection) selection;
            if (iss.size()==1) {
          Object element = iss.getFirstElement();
          if (element instanceof JcrNode) {
            final JcrNode n = (JcrNode)element;
            if (n.canBeDeleted()) {
              action.setEnabled(true);
              this.node = n;
              return;
            }
          }
View Full Code Here

Examples of org.jruby.ir.instructions.Instr.canBeDeleted()

            if (res != null && val != null) {
                if (!res.equals(val)) {
                    recordSimplification(res, val, valueMap, simplificationMap);
                } else if (!i.hasSideEffects()) {
                    if (i instanceof CopyInstr) {
                        if (i.canBeDeleted(s)) {
                            i.markDead();
                            instrs.remove();
                        }
                    } else {
                        instrs.set(new CopyInstr(res, val));
View Full Code Here

Examples of org.jruby.ir.instructions.Instr.canBeDeleted()

                // If 'v' is not live at the instruction site, and it has no side effects, mark it dead!
                // System.out.println("df var for " + v + " is " + dv.getId());
                if (living.get(dv.getId())) {
                    living.clear(dv.getId());
                    // System.out.println("NO! LIVE result:" + v);
                } else if (i.canBeDeleted(scope)) {
                    // System.out.println("YES!");
                    i.markDead();
                    it.remove();
                    if (v.isImplicitBlockArg()) lvp.getScope().markUnusedImplicitBlockArg();
                } else {
View Full Code Here

Examples of org.jruby.ir.instructions.Instr.canBeDeleted()

                    it.remove();
                    if (v.isImplicitBlockArg()) lvp.getScope().markUnusedImplicitBlockArg();
                } else {
                    // System.out.println("NO! has side effects! Op is: " + i.getOperation());
                }
            } else if (i.canBeDeleted(scope)) {
                 i.markDead();
                 it.remove();
            } else {
                // System.out.println("IGNORING! No result!");
            }
View Full Code Here

Examples of org.jruby.ir.instructions.Instr.canBeDeleted()

                    recordSimplification(res, val, valueMap, simplificationMap);
                }

                if (!i.hasSideEffects()) {
                    if (i instanceof CopyInstr) {
                        if (res.equals(val) && i.canBeDeleted(s)) {
                            i.markDead();
                            instrs.remove();
                        }
                    } else {
                        instrs.set(new CopyInstr(res, val));
View Full Code Here

Examples of org.jruby.ir.instructions.Instr.canBeDeleted()

                // If 'v' is not live at the instruction site, and it has no side effects, mark it dead!
                // System.out.println("df var for " + v + " is " + dv);
                if (living.get(dv)) {
                    living.clear(dv);
                    // System.out.println("NO! LIVE result:" + v);
                } else if (i.canBeDeleted(scope)) {
                    // System.out.println("YES!");
                    i.markDead();
                    it.remove();
                    problem.getScope().getFlags().add(IRFlags.HAS_UNUSED_IMPLICIT_BLOCK_ARG);
                } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.