@Security public class AdServiceSecurity extends CRUDServiceSecurity<BasicAdDTO,BasicAd,AdDetailsData,AdDataParams> implements AdService
AdServiceentityClass| Constructor and Description |
|---|
AdServiceSecurity() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canCreateNew(boolean isSimpleAd,
User user) |
boolean |
canPerformOperation(BasicAd entity,
CRUDOperation operation)
Returns whether the logged user can perform the given operation over the given entity
|
protected void |
checkCreateNew(AdDataParams params)
Checks whether creating new entities with the given context parameters is allowed, throwing
PermissionDeniedException if not |
protected void |
customizeData(AdDetailsData data)
Can be overridden in order to process the returned data object for the given entity
|
boolean |
doHasManageAccess(BasicAd ad)
Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given
operation
|
boolean |
doHasViewAccess(BasicAd ad)
Should be implemented in order to return whether the caller is allowed to view the given entity.
|
AdSearchData |
getAdSearchData(AdType type,
boolean overBrokeredUsers)
Returns data for searching advertisements
|
protected AdServiceLocal |
getImplementation()
Should be implemented in order to return the actual implementation of the service
|
UserAdsSearchData |
getUserAdsSearchData(UserLocatorVO locator,
AdType type)
Returns data for searching advertisements
|
AdViewData |
getViewData(java.lang.Long id)
Returns data for viewing details of an advertisement
|
boolean |
isAccessible(SessionData sessionData,
BasicAd entity)
Must be implemented in order to determine whether the given entity is accessible for the given session data.
|
BasicAdVO |
loadVO(java.lang.Long id)
Loads a VO, by id
|
protected void |
onBeforeSave(BasicAdDTO dto,
BasicAd entity) |
Page<BasicAdVO> |
search(BasicAdQuery params)
Searches for advertisements, according to the given query parameters
|
void |
setAsDraft(java.lang.Long adId,
java.lang.String comments)
Sets the ad back to draft status.
|
void |
setHidden(java.lang.Long id,
boolean hidden)
Hides or unhides the ad according to given hidden parameter.
|
canViewHistoryLog, checkManageAccess, checkOperation, checkViewAccess, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, remove, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveEntityCheck, save, saveWithConfirmationPasswordcheckGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initializecanManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getAccountHandler, getAuthHandler, getBaseEntityManagerHandler, getChannelConfiguration, getConfiguration, getConversionHandler, getCustomFieldValueHandler, getEntityManagerHandler, getGroupsHandler, getLoggedBasicUser, getLoggedUser, getProducts, getProductsHandler, getReportHandler, getTranslatedName, getTranslatedValue, getUserLocatorHandler, getValidationResult, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, toDate, toDateTime, validatedelete, detach, find, flush, from, getApplicationContext, getConfigurationHandler, getDataTranslationHandler, getFormatter, getFormatter, getFormatter, getLogger, getNotificationHandler, getProfileFieldHandler, getRemoteAddress, getSessionData, getTransactionHandler, getTranslationHandler, message, message, persist, processBatch, refresh, remove, subQuery, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetData, getDataForNew, load, remove, removeAll, savepublic boolean canPerformOperation(BasicAd entity, CRUDOperation operation)
CRUDServiceSecuritycanPerformOperation in class CRUDServiceSecurity<BasicAdDTO,BasicAd,AdDetailsData,AdDataParams>public boolean doHasManageAccess(BasicAd ad)
CRUDServiceSecuritydoHasManageAccess in class CRUDServiceSecurity<BasicAdDTO,BasicAd,AdDetailsData,AdDataParams>public boolean doHasViewAccess(BasicAd ad)
CRUDServiceSecuritydoHasViewAccess in class CRUDServiceSecurity<BasicAdDTO,BasicAd,AdDetailsData,AdDataParams>public AdSearchData getAdSearchData(AdType type, boolean overBrokeredUsers)
AdServicegetAdSearchData in interface AdServicepublic UserAdsSearchData getUserAdsSearchData(UserLocatorVO locator, AdType type)
AdServicegetUserAdsSearchData in interface AdServicepublic AdViewData getViewData(java.lang.Long id) throws EntityNotFoundException
AdServicegetViewData in interface AdServiceEntityNotFoundExceptionpublic boolean isAccessible(SessionData sessionData, BasicAd entity)
CRUDServiceSecurityCRUDServiceSecurity.hasViewAccess(BaseEntity). If the only condition for an entity is
CRUDServiceSecurity.hasViewAccess(BaseEntity), this method
should return false.isAccessible in class CRUDServiceSecurity<BasicAdDTO,BasicAd,AdDetailsData,AdDataParams>public BasicAdVO loadVO(java.lang.Long id) throws FrameworkException
AdServiceloadVO in interface AdServiceFrameworkExceptionpublic Page<BasicAdVO> search(BasicAdQuery params)
AdServicepublic void setAsDraft(java.lang.Long adId,
java.lang.String comments)
AdServicesetAsDraft in interface AdServicepublic void setHidden(java.lang.Long id,
boolean hidden)
AdServiceprotected boolean canCreateNew(boolean isSimpleAd,
User user)
protected void checkCreateNew(AdDataParams params)
CRUDServiceSecurityPermissionDeniedException if notcheckCreateNew in class CRUDServiceSecurity<BasicAdDTO,BasicAd,AdDetailsData,AdDataParams>protected void customizeData(AdDetailsData data)
CRUDServiceSecuritycustomizeData in class CRUDServiceSecurity<BasicAdDTO,BasicAd,AdDetailsData,AdDataParams>protected AdServiceLocal getImplementation()
CRUDServiceSecuritygetImplementation in class CRUDServiceSecurity<BasicAdDTO,BasicAd,AdDetailsData,AdDataParams>protected void onBeforeSave(BasicAdDTO dto, BasicAd entity)
onBeforeSave in class CRUDServiceSecurity<BasicAdDTO,BasicAd,AdDetailsData,AdDataParams>