@Test public void testRetrieveRequests() { TaskHandlerActionContext<PrincipalActionContext> currentTaskHandlerContext = TestContextCreator .createTaskHandlerContextWithPrincipal(null, null); sut.execute(currentTaskHandlerContext); List<UserActionRequest> requests = currentTaskHandlerContext.getUserActionRequests(); assertEquals(1, requests.size()); assertEquals("refreshMembershipAction", requests.get(0).getActionKey()); }
@Override public Serializable execute(final TaskHandlerActionContext<PrincipalActionContext> inActionContext) throws ExecutionException { List<UserActionRequest> userActionRequests = new ArrayList<UserActionRequest>(); userActionRequests.add(new UserActionRequest("refreshMembershipAction", null, null)); inActionContext.getUserActionRequests().addAll(userActionRequests); return null; }
UpdateMembershipExecution implements TaskHandlerExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<PrincipalActionContext> inActionContext) throws ExecutionException { List<UserActionRequest> userActionRequests = new ArrayList<UserActionRequest>(); userActionRequests.add(new UserActionRequest("refreshMembershipAction", null, null)); inActionContext.getUserActionRequests().addAll(userActionRequests); return null; } }
UpdateMembershipExecution implements TaskHandlerExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<PrincipalActionContext> inActionContext) throws ExecutionException { List<UserActionRequest> userActionRequests = new ArrayList<UserActionRequest>(); userActionRequests.add(new UserActionRequest("refreshMembershipAction", null, null)); inActionContext.getUserActionRequests().addAll(userActionRequests); return null; }  }
UpdateMembershipExecution implements TaskHandlerExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<PrincipalActionContext> inActionContext) throws ExecutionException { List<UserActionRequest> userActionRequests = new ArrayList<UserActionRequest>(); userActionRequests.add(new UserActionRequest("refreshMembershipAction", null, null)); inActionContext.getUserActionRequests().addAll(userActionRequests); return null; }  @Override Serializable execute(final TaskHandlerActionContext<PrincipalActionContext> inActionContext); }
UpdateMembershipExecution implements TaskHandlerExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<PrincipalActionContext> inActionContext) throws ExecutionException { List<UserActionRequest> userActionRequests = new ArrayList<UserActionRequest>(); userActionRequests.add(new UserActionRequest("refreshMembershipAction", null, null)); inActionContext.getUserActionRequests().addAll(userActionRequests); return null; }  @Override Serializable execute(final TaskHandlerActionContext<PrincipalActionContext> inActionContext);  }