Interface AdServiceLocal

    • Field Detail

      • ATTR_USER

        static final String ATTR_USER
        Attribute name for scripting: The user in which advertisements are being searched
        See Also:
        Constant Field Values
      • ATTR_AD_TYPE

        static final String ATTR_AD_TYPE
        Attribute name for scripting: The advertisement type being searched
        See Also:
        Constant Field Values
    • Method Detail

      • adRequiresAuthorization

        boolean adRequiresAuthorization​(AdType adType,
                                        User owner)
        Indicates whether ads of the given owner and type requires authorization
      • adRequiresAuthorization

        boolean adRequiresAuthorization​(BasicAd ad)
        Returns true if the ad requires authorization for publishing.
      • checkStatus

        void checkStatus​(boolean guest,
                         boolean ownAds,
                         BasicAdQuery params,
                         User owner)
        Check the statuses in the query params according to the relationship between the logged user and the ad owner. if no status is passed in the query params, all the allowed ones are setted.
      • disableNotInCurrencies

        int disableNotInCurrencies​(User user,
                                   Collection<Currency> currencies)
        Disables all the ads for the given user which are not related to the given currencies
      • getCategories

        Set<AdCategoryVO> getCategories​(Long adId)
        Returns the categories for the given Ad id
      • listForSitemap

        List<SitemapItemVO> listForSitemap()
        Returns the sitemap entries for all enabled advertisements in this network
      • removeAll

        void removeAll​(User user,
                       boolean userRemove)
        Removes all the advertisements for the given user, also clean the title and the description if the removeAll is called because a user is being removed
      • removeAllFavorites

        void removeAllFavorites​(User user)
        Removes all the advertisement favorites for the given user