code: public Operations getOperationsFor(final PMContext ctx, Object instance, Operation operation) throws PMException {
          final Operations result = new Operations();
          final List<Operation> r = new ArrayList<Operation>();
          if (operation != null) {
              for (Operation op : getOperations()) {
                  if (op.isDisplayed(operation.getId()) && op.isEnabled() && !op.equals(operation)) {
                      if (op.getCondition() == null || op.getCondition().check(ctx, instance, op, operation.getId())) {
                          if (instance != null || OperationScope.GENERAL.is(op.getScope()) || OperationScope.SELECTED.is(op.getScope())) {
                              r.add(op);
                          }
                      }
                  }
              }
          }
          result.setOperations(r);
          return result;
      }
docs: Returns the Operations for a given operation. That is the operations that
  are different to the given one, enabled and visible in it.
  
  @param operation The operation
  @return The operations