Package org.springmodules.feedxt.domain

Examples of org.springmodules.feedxt.domain.FeedSubscription


        }
    }

    public FeedSubscription getUserSubscriptionByName(User user, String subscriptionName) throws UserNotExistentException {
        if (this.userRepository.getUserByUsername(user.getUsername()) != null) {
            FeedSubscription subscription = user.viewSubscriptionByName(subscriptionName);
            return subscription;
        } else {
            throw new UserNotExistentException("User not found: " + user);
        }
    }
View Full Code Here


        response.addAction(action2);
    }
   
    private Feed getFeedFromSubscriptionName(String name) throws UserNotExistentException, CannotAccessFeedException {
        User user = this.userHolder.getUser();
        FeedSubscription subscription = this.userService.getUserSubscriptionByName(user, name);
        if (subscription != null) {
            return subscription.getFeed();
        } else {
            return null;
        }
    }
View Full Code Here

                }
            }
        }
        // Convert from subscription to string:
        else if (element instanceof FeedSubscription) {
            FeedSubscription s = (FeedSubscription) element;
            result = s.getName();
        }
       
        return result;
    }
View Full Code Here

        return generator.generate();
    }

    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.");
View Full Code Here

TOP

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

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.