@Test public void testExecuteNoOwner() { final CompressGadgetZoneRequest request = new CompressGadgetZoneRequest(8L, 9, null); context.checking(new Expectations() { { allowing(gadgetMapper).execute(request); will(returnValue(Arrays.asList(gadget1, gadget2, gadget3))); } }); sut.execute(TestContextCreator.createTaskHandlerAsyncContext(request)); context.assertIsSatisfied(); assertEquals(0, gadget1.getZoneIndex()); assertEquals(1, gadget2.getZoneIndex()); assertEquals(2, gadget3.getZoneIndex()); }
@Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { CompressGadgetZoneRequest request = (CompressGadgetZoneRequest) inActionContext.getActionContext().getParams(); List<Gadget> gadgets = gadgetMapper.execute(request); int count = gadgets.size(); for (int i = 0; i < count; i++) { gadgets.get(i).setZoneIndex(i); } if (request.getTabTemplateOwnerId() != null) { pageMapper.execute(request.getTabTemplateOwnerId()); } return null; }
CompressGadgetZoneExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { CompressGadgetZoneRequest request = (CompressGadgetZoneRequest) inActionContext.getActionContext().getParams(); List<Gadget> gadgets = gadgetMapper.execute(request); int count = gadgets.size(); for (int i = 0; i < count; i++) { gadgets.get(i).setZoneIndex(i); } if (request.getTabTemplateOwnerId() != null) { pageMapper.execute(request.getTabTemplateOwnerId()); } return null; } }
CompressGadgetZoneExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { CompressGadgetZoneRequest request = (CompressGadgetZoneRequest) inActionContext.getActionContext().getParams(); List<Gadget> gadgets = gadgetMapper.execute(request); int count = gadgets.size(); for (int i = 0; i < count; i++) { gadgets.get(i).setZoneIndex(i); } if (request.getTabTemplateOwnerId() != null) { pageMapper.execute(request.getTabTemplateOwnerId()); } return null; } CompressGadgetZoneExecution(final DomainMapper<CompressGadgetZoneRequest, List<Gadget>> inGadgetMapper,
            final DomainMapper<Long, Object> inPageMapper); }
CompressGadgetZoneExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { CompressGadgetZoneRequest request = (CompressGadgetZoneRequest) inActionContext.getActionContext().getParams(); List<Gadget> gadgets = gadgetMapper.execute(request); int count = gadgets.size(); for (int i = 0; i < count; i++) { gadgets.get(i).setZoneIndex(i); } if (request.getTabTemplateOwnerId() != null) { pageMapper.execute(request.getTabTemplateOwnerId()); } return null; } CompressGadgetZoneExecution(final DomainMapper<CompressGadgetZoneRequest, List<Gadget>> inGadgetMapper,
            final DomainMapper<Long, Object> inPageMapper); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext); }
CompressGadgetZoneExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { CompressGadgetZoneRequest request = (CompressGadgetZoneRequest) inActionContext.getActionContext().getParams(); List<Gadget> gadgets = gadgetMapper.execute(request); int count = gadgets.size(); for (int i = 0; i < count; i++) { gadgets.get(i).setZoneIndex(i); } if (request.getTabTemplateOwnerId() != null) { pageMapper.execute(request.getTabTemplateOwnerId()); } return null; } CompressGadgetZoneExecution(final DomainMapper<CompressGadgetZoneRequest, List<Gadget>> inGadgetMapper,
            final DomainMapper<Long, Object> inPageMapper); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext);  }