Package org.cyclos.impl.marketplace
Interface AdServiceLocal
-
- All Superinterfaces:
AdService,CRUDService<BasicAdDTO,AdDetailsData,AdDataParams>,CRUDServiceLocal<BasicAd,BasicAdDTO,AdDetailsData,AdDataParams>,Service
public interface AdServiceLocal extends AdService, CRUDServiceLocal<BasicAd,BasicAdDTO,AdDetailsData,AdDataParams>
Local interface forAdService
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_AD_TYPEAttribute name for scripting: The advertisement type being searchedstatic StringATTR_USERAttribute name for scripting: The user in which advertisements are being searched
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanadRequiresAuthorization(BasicAd ad)Returns true if the ad requires authorization for publishing.booleanadRequiresAuthorization(AdType adType, User owner)Indicates whether ads of the given owner and type requires authorizationvoidcheckStatus(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.intdisableNotInCurrencies(User user, Collection<Currency> currencies)Disables all the ads for the given user which are not related to the given currenciesAdWebShopfindByOwnerAndNumber(User user, String orderNumber)Returns an AdWebShop by product owner and number, or throwsEntityNotFoundExceptionif not foundIntegergetAdvertisementsCount(User owner, AdType type)Counts the number of ads filtering by status, for more details about the filters seecheckStatus(boolean, boolean, BasicAdQuery, User)}Set<AdCategoryVO>getCategories(Long adId)Returns the categories for the given Ad idList<SitemapItemVO>listForSitemap()Returns the sitemap entries for all enabled advertisements in this networkvoidremoveAll(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 removedvoidremoveAllFavorites(User user)Removes all the advertisement favorites for the given user-
Methods inherited from interface org.cyclos.services.marketplace.AdService
approve, exportAd, getAdSearchData, getFavoritesListData, getUserAdsSearchData, getViewData, loadVO, markAsFavorite, reject, search, setAsDraft, setHidden, submitForAuthorization
-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.impl.CRUDServiceLocal
find, findAll, getEntityClass, newEntity, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
-
-
-
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
-
findByOwnerAndNumber
AdWebShop findByOwnerAndNumber(User user, String orderNumber)
Returns an AdWebShop by product owner and number, or throwsEntityNotFoundExceptionif not found
-
getAdvertisementsCount
Integer getAdvertisementsCount(User owner, AdType type)
Counts the number of ads filtering by status, for more details about the filters seecheckStatus(boolean, boolean, BasicAdQuery, User)}
-
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
-
-