Spring Framework SimpleSessionStatus - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework SimpleSessionStatus class.

This code example shows how to use the following methods:
        InMemoryClientDetailsService clientDetailsService = new InMemoryClientDetailsService();
        clientDetailsService.setClientDetailsStore(Collections.singletonMap("client", new BaseClientDetails()));
        controller.setClientDetailsService(clientDetailsService);
        controller.setApprovalStore(Mockito.mock(ApprovalStore.class));
        Authentication auth = UaaAuthenticationTestFactory.getAuthentication("foo@bar.com", "Foo Bar", "foo@bar.com");
        String result = controller.confirm(new ModelMap(), new MockHttpServletRequest(), auth,
                        new SimpleSessionStatus());
        assertEquals("access_confirmation", result);
    } 
 
    @SuppressWarnings("unchecked") 
    @Test
    public void testSchemePreserved() throws Exception {
        InMemoryClientDetailsService clientDetailsService = new InMemoryClientDetailsService();
        clientDetailsService.setClientDetailsStore(Collections.singletonMap("client", new BaseClientDetails()));
        controller.setClientDetailsService(clientDetailsService);
        controller.setApprovalStore(Mockito.mock(ApprovalStore.class));
        MockHttpServletRequest request = new MockHttpServletRequest();
        request.setScheme("https");
        request.addHeader("Host", "foo");
6
CodeRank
This code example shows how to use the following methods:
 
	private boolean redirectModelScenario = false;
 
	private boolean ignoreDefaultModelOnRedirect = false;
 
	private final SessionStatus sessionStatus = new SimpleSessionStatus();
 
 
	/** 
	 * Set a view name to be resolved by the DispatcherServlet via a ViewResolver. 
	 * Will override any pre-existing view name or View. 
	 */ 
	public void setViewName(String viewName) {
		this.view = viewName;
	} 
 
	/** 
	 * Return the view name to be resolved by the DispatcherServlet via a 
	 * ViewResolver, or {@code null} if a View object is set. 
	 */ 
5
CodeRank