Package org.springmodules.feedxt.domain

Examples of org.springmodules.feedxt.domain.User


   
    protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
        LoginForm form = (LoginForm) command;
        String username = form.getUsername();
        String password = form.getPassword();
        User user = this.userService.getUserAccount(username, password);
        if (user != null) {
            this.userHolder.setUser(user);
            this.applicationEventPublisher.publishEvent(new LoginEvent(this, request.getSession(), user));
            return new AjaxModelAndView(this.getSuccessView(), errors);
        } else {
View Full Code Here


    }

    protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
        AddFeedSubscriptionView factoryView = (AddFeedSubscriptionView) command;
        FeedSubscription subscription = factoryView.makeFeedSubscription();
        User user = this.userHolder.getUser();
        try {
            this.userService.subscribeToFeed(user, subscription);
        } catch (SubscriptionAlreadyExistentException ex) {
            errors.reject("subscription.duplicated.name", "Subscription with the same name already existent.");
            return new AjaxModelAndView(null, errors);
View Full Code Here

        return factoryView;
    }

    protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
        SignUpUserView factoryView = (SignUpUserView) command;
        User user = (User) factoryView.makeUser();
        try {
            this.userService.signUpUserAccount(user, factoryView.getUsername(), factoryView.getPassword());
            this.userHolder.setUser(user);
            this.applicationEventPublisher.publishEvent(new LoginEvent(this, request.getSession(), user));
        } catch (UserAlreadyExistentException ex) {
View Full Code Here

    }
   
    public User getUserByUsername(String username) {
        ObjectSet set = this.template.query(new UsernamePredicate(username));
        if (set.hasNext()) {
            User found = (User) set.next();
            found.setUserRepository(this);
            return found;
        } else {
            return null;
        }
    }
View Full Code Here

TOP

Related Classes of org.springmodules.feedxt.domain.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.