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​(BasicAd ad)
        Returns true if the ad requires authorization for publishing.
      • canViewAddresses

        boolean canViewAddresses​(User adOwner)
        Returns if the given ad owner or a user manager can view addresses in an ad
      • canViewAuthorizationNotes

        boolean canViewAuthorizationNotes​(BasicAd ad)
        Returns true if the logged user can view the authorization notes of the given ad
      • canViewPendings

        boolean canViewPendings​(AdType adType,
                                User owner,
                                boolean brokeredSearch)
        Returns true if the logged user can view pending ads with the given restrictions
      • 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.
      • disableInCurrencies

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

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

        boolean hasManageAccess​(AdType type,
                                User owner)
        Returns true if the logged user can manage ads of the given type and user. Doesn't takes into account the authorization status of advertisements.
      • hasManageAccess

        boolean hasManageAccess​(BasicAd ad)
        Returns true if the logged user has manage access for the given ad.
      • hasManageAccess

        boolean hasManageAccess​(Date deletedDate,
                                AdStatus status,
                                AdStatus persistedStatus,
                                AdType type,
                                User owner)
        Returns true if the logged user has manage access to the ad with the given conditions
      • listForSitemap

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

        void removeAll​(User user)
        Removes all the advertisements for the given user