mapCommand = !subcommands.isEmpty() ? subcommands.unwrap() : null; removeCommand.doExecute();
mapCommand = !subcommands.isEmpty() ? subcommands.unwrap() : null; removeCommand.doExecute();
public void execute() { addCommand.doExecute(); MappingRoot mappingRoot = mappingDomain.getMappingRoot(); CompoundCommand subcommands = new CompoundCommand(); for (Object addition : addCommand.getCollection()) { for (Iterator<?> objects = mappingDomain.treeIterator(addition); objects.hasNext(); ) { Object object = objects.next(); MappedObjectState mappedObjectState = mappingRoot.getMappedObjectState(object); Object originatingInput = mappedObjectState.getOriginatingInput(); // This is tricky and is done for each object here rather than once for the owner of the addCommnd. // We want to make sure the object is really part of the conceptual tree induced by the domain. // if (originatingInput == null) { mappedObjectState.setOutput(); } else if (mappingRoot.isAttachedObject(object)) { mapOutputObject(object, originatingInput, subcommands); } } } mapCommand = !subcommands.isEmpty() ? subcommands.unwrap() : null; }
public void execute() { addCommand.doExecute(); MappingRoot mappingRoot = mappingDomain.getMappingRoot(); CompoundCommand subcommands = new CompoundCommand(); for (Object addition : addCommand.getCollection()) { for (Iterator<?> objects = mappingDomain.treeIterator(addition); objects.hasNext(); ) { Object object = objects.next(); MappedObjectState mappedObjectState = mappingRoot.getMappedObjectState(object); Object originatingInput = mappedObjectState.getOriginatingInput(); // This is tricky and is done for each object here rather than once for the owner of the addCommnd. // We want to make sure the object is really part of the conceptual tree induced by the domain. // if (originatingInput == null) { mappedObjectState.setOutput(); } else if (mappingRoot.isAttachedObject(object)) { mapOutputObject(object, originatingInput, subcommands); } } } mapCommand = !subcommands.isEmpty() ? subcommands.unwrap() : null; }