Revision 1 -
(download)
(annotate)
Wed Jul 28 10:05:51 2010 UTC
(13 years, 9 months ago)
by dgarcia File size: 1271 byte(s)
First code commit
package eu.smartlm.abs.portal.security.login.admin;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.portlet.bind.annotation.RenderMapping;
import eu.smartlm.abs.portal.security.login.model.User;
import eu.smartlm.abs.portal.security.login.service.LoginService;
@Controller(value="loginAdministrationController")
@RequestMapping(value = "VIEW")
public class LoginAdministration {
@Autowired
@Qualifier("myLoginService")
private LoginService loginService;
public void setLoginService(LoginService loginService) {
this.loginService = loginService;
}
/**
* Pointer to the default jsp portlet to show
* @return the name of the jsp portlet
*/
@RenderMapping
public String showUsers() {
return "login-administration";
}
/**
* Gets all the users from the database and sends this information to the default portlet
* @return A user list
*/
@ModelAttribute("users")
public List<User> getUsers() {
return loginService.getUsers();
}
}