Revision 1 -
(download)
(annotate)
Wed Jul 28 10:05:51 2010 UTC
(13 years, 10 months ago)
by dgarcia File size: 1065 byte(s)
First code commit
package eu.smartlm.abs.portal.security.login.admin;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.portlet.bind.annotation.ActionMapping;
import eu.smartlm.abs.portal.security.login.service.LoginService;
/**
* Removes a user from the database
* @author David García Pérez - CESGA
*
*/
@Controller
@RequestMapping("VIEW")
public class RemoveUserController {
@Autowired
@Qualifier("myLoginService")
private LoginService loginService;
public void setLoginService(LoginService loginService) {
this.loginService = loginService;
}
/**
* Maps the action of the jsp to the action of the controller
* @param username
*/
@ActionMapping(params="myaction=removeUser")
public void removeBook(@RequestParam String username) {
loginService.removeUser(username);
}
}