public interface AdServiceLocal extends AdService, CRUDServiceLocal<BasicAd,BasicAdDTO,AdDetailsData,AdDataParams>
AdService| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_AD_TYPE
Attribute name for scripting: The advertisement type being searched
|
static java.lang.String |
ATTR_USER
Attribute name for scripting: The user in which advertisements are being searched
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
adRequiresAuthorization(BasicAd ad)
Returns true if the ad requires authorization
for publishing.
|
boolean |
canViewAddresses(User adOwner)
Returns if the given ad owner or a user manager can view addresses in an ad
|
boolean |
canViewAuthorizationNotes(BasicAd ad)
Returns true if the logged user can view the authorization notes of the given ad
|
boolean |
canViewPendings(AdType adType,
User owner,
boolean brokeredSearch)
Returns true if the logged user can view pending ads with the given restrictions
|
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.
|
int |
disableInCurrencies(User user,
java.util.Collection<Currency> currencies)
Disables all the ads for the given user which are related to the given currencies
|
AdWebShop |
findByOwnerAndNumber(User user,
java.lang.String orderNumber)
Returns an AdWebShop by product owner and number, or throws
EntityNotFoundException if not found |
java.lang.Integer |
getAdvertisementsCount(User owner,
AdType type)
Counts the number of ads filtering by status, for more details about the filters see
checkStatus(boolean, boolean, BasicAdQuery, User)} |
java.util.Set<AdCategoryVO> |
getCategories(java.lang.Long adId)
Returns the categories for the given Ad id
|
boolean |
hasManageAccess(AdType type,
User owner)
Returns true if the logged user can manage ads of the given type and user.
|
boolean |
hasManageAccess(BasicAd ad)
Returns true if the logged user has manage access for the given ad.
|
boolean |
hasManageAccess(java.util.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
|
java.util.List<org.cyclos.server.model.contentmanagement.contentitems.SitemapItemVO> |
listForSitemap()
Returns the sitemap entries for all enabled advertisements in this network
|
void |
removeAll(User user)
Removes all the advertisements for the given user
|
approve, exportAd, getAdSearchData, getUserAdsSearchData, getViewData, loadVO, reject, search, setAsDraft, setHidden, submitForAuthorizationfind, findAll, getEntityClass, newEntity, remove, removeAll, saveSkippingEntityLog, toDTO, toEntity, validategetData, getDataForNew, load, remove, removeAll, savestatic final java.lang.String ATTR_USER
static final java.lang.String ATTR_AD_TYPE
boolean adRequiresAuthorization(BasicAd ad)
boolean canViewAddresses(User adOwner)
boolean canViewAuthorizationNotes(BasicAd ad)
boolean canViewPendings(AdType adType, User owner, boolean brokeredSearch)
void checkStatus(boolean guest,
boolean ownAds,
BasicAdQuery params,
User owner)
int disableInCurrencies(User user, java.util.Collection<Currency> currencies)
AdWebShop findByOwnerAndNumber(User user, java.lang.String orderNumber)
EntityNotFoundException if not foundjava.lang.Integer getAdvertisementsCount(User owner, AdType type)
checkStatus(boolean, boolean, BasicAdQuery, User)}java.util.Set<AdCategoryVO> getCategories(java.lang.Long adId)
boolean hasManageAccess(AdType type, User owner)
boolean hasManageAccess(BasicAd ad)
boolean hasManageAccess(java.util.Date deletedDate,
AdStatus status,
AdStatus persistedStatus,
AdType type,
User owner)
java.util.List<org.cyclos.server.model.contentmanagement.contentitems.SitemapItemVO> listForSitemap()
void removeAll(User user)