Package org.jasig.portal.portlet.marketplace

Examples of org.jasig.portal.portlet.marketplace.IMarketplaceRating


            this.setUpInitialView(webRequest, portletRequest, model, null);
            return "jsp/Marketplace/portlet/view";
        }

        MarketplacePortletDefinition mpDefinition = marketplaceService.getOrCreateMarketplacePortletDefinition(result);
        IMarketplaceRating tempRatingImpl = marketplaceRatingDAO.getRating(portletRequest.getRemoteUser(),
                portletDefinitionDao.getPortletDefinitionByFname(result.getFName()));
        model.addAttribute("marketplaceRating", tempRatingImpl);
        model.addAttribute("reviewMaxLength", IMarketplaceRating.REVIEW_MAX_LENGTH);
        model.addAttribute("portlet", mpDefinition);
        model.addAttribute("shortURL",mpDefinition.getShortURL());
View Full Code Here


     * @return 'rating' as a JSON object.  Can be null if rating doesn't exist.
     */
     @ResourceMapping("getRating")
         public String getRating(ResourceRequest request, ResourceResponse response, @RequestParam String portletFName,  PortletRequest portletRequest, Model model){
         Validate.notNull(portletFName, "Please supply a portlet to get rating for - should not be null");
         IMarketplaceRating tempRating = marketplaceRatingDAO.getRating(portletRequest.getRemoteUser(), portletDefinitionDao.getPortletDefinitionByFname(portletFName));
         model.addAttribute("rating",tempRating==null? null:tempRating.getRating());
         return "json";
     }
View Full Code Here

    @Override
    @PortalTransactional
    public IMarketplaceRating createOrUpdateRating(IMarketplaceRating marketplaceRatingImplementation){
        Validate.notNull(marketplaceRatingImplementation, "MarketplaceRatingImpl must not be null");
        final EntityManager entityManager = this.getEntityManager();
        IMarketplaceRating temp = this.getRating(marketplaceRatingImplementation.getMarketplaceRatingPK());
        if(!entityManager.contains(marketplaceRatingImplementation) && temp!=null){
            //Entity is not managed and there is a rating for this portlet/user - update needed
            temp = entityManager.merge(marketplaceRatingImplementation);
        }else{
            //Entity is either already managed or doesn't exist - create needed
View Full Code Here

     */
    @Override
    @PortalTransactional
    public void deleteRating(IMarketplaceRating marketplaceRatingImplementation){
        Validate.notNull(marketplaceRatingImplementation, "ratingPK can not be null");
        final IMarketplaceRating persistantMarketplaceRatingImpl;
        final EntityManager entityManager = this.getEntityManager();
        if(entityManager.contains(marketplaceRatingImplementation)){
            persistantMarketplaceRatingImpl=marketplaceRatingImplementation;
        }else{
            persistantMarketplaceRatingImpl=entityManager.merge(marketplaceRatingImplementation);
View Full Code Here

TOP

Related Classes of org.jasig.portal.portlet.marketplace.IMarketplaceRating

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.