Package org.cyclos.impl.marketplace
Class AdInterestServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.CRUDServiceImpl<AdInterest,QAdInterest,AdInterestDTO,AdInterestData,UserLocatorVO>
-
- org.cyclos.impl.marketplace.AdInterestServiceImpl
-
- All Implemented Interfaces:
CRUDServiceLocal<AdInterest,AdInterestDTO,AdInterestData,UserLocatorVO>,AdInterestServiceLocal,CRUDService<AdInterestDTO,AdInterestData,UserLocatorVO>,CRUDWithConfirmationPasswordService<AdInterestDTO,AdInterestData,UserLocatorVO>,AdInterestService,Service
@Service public class AdInterestServiceImpl extends CRUDServiceImpl<AdInterest,QAdInterest,AdInterestDTO,AdInterestData,UserLocatorVO> implements AdInterestServiceLocal
implementation forAdInterestService
-
-
Field Summary
Fields Modifier and Type Field Description protected ProductServiceLocalproductService-
Fields inherited from class org.cyclos.impl.CRUDServiceImpl
$, ATTR_CURRENT_COPY, cacheHandler, dtoClass, entityClass, extensionPointService, idPath, internalNamePath, namePath, ownerEntityIdPath, ownerEntityPath, ownerEntityPropertyName, passwordHandler, richTextHandler, withConfirmationPassword
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description AdInterestServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangenerateNotification(BasicAd ad)Notifies interested users for the given advertisementprotected AdInterestDatagetData(AdInterest interest)Returns details data for the given entityUserAdInterestsListDatagetListData(UserLocatorVO locator)Returns all the advertisement interests belonging to the given user, or the logged user if the given locator is null, plus permissions over them.AdInterestnewEntity(UserLocatorVO locator)Should be implemented in order to instantiate a new entity based on the given context parametersprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkvoidremoveAll(User user)Removes all AdInterests of the specified user.protected ValidatorresolveValidator(AdInterestDTO dto)AdInteresttoEntity(AdInterestDTO dto)Converts the given DTO in an entity, handling theCRUDServiceImpl.subClassMappings()mappings for subclasses-
Methods inherited from class org.cyclos.impl.CRUDServiceImpl
addCustomInternalNameValidations, addCustomNameValidations, checkConfirmationPassword, doRemove, find, findAll, from, getConfirmationPasswordInput, getConfirmationPasswordInputForRemove, getData, getDataForNew, getDeviceConfirmationParams, getEntityClass, getEntityInternalNameKey, getExcludedPropertiesToDTO, getExcludedPropertiesToEntity, getNameLabel, getUniqueInternalNameQuery, getUniqueNameQuery, isEntityInternalNameRequired, isNameRequired, load, logEntity, onAfterRemove, onAfterSave, onBeforeRemove, onBeforeSave, preProcessCurrentCopy, remove, remove, removeAll, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveDTOType, resolveEntityType, resolveExtensionPointAccessor, save, saveOrder, saveSkippingEntityLog, saveWithConfirmationPassword, shouldCheckConfirmationPassword, subClassMappings, toDTO, validate
-
Methods inherited from class org.cyclos.impl.BaseServiceImpl
initializeNetworkMappings
-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, validate
-
-
-
-
Field Detail
-
productService
@Autowired protected ProductServiceLocal productService
-
-
Method Detail
-
generateNotification
public boolean generateNotification(BasicAd ad)
Description copied from interface:AdInterestServiceLocalNotifies interested users for the given advertisement- Specified by:
generateNotificationin interfaceAdInterestServiceLocal
-
getListData
public UserAdInterestsListData getListData(UserLocatorVO locator) throws FrameworkException
Description copied from interface:AdInterestServiceReturns all the advertisement interests belonging to the given user, or the logged user if the given locator is null, plus permissions over them.- Specified by:
getListDatain interfaceAdInterestService- Throws:
FrameworkException
-
newEntity
public AdInterest newEntity(UserLocatorVO locator)
Description copied from class:CRUDServiceImplShould be implemented in order to instantiate a new entity based on the given context parameters- Specified by:
newEntityin interfaceCRUDServiceLocal<AdInterest,AdInterestDTO,AdInterestData,UserLocatorVO>- Specified by:
newEntityin classCRUDServiceImpl<AdInterest,QAdInterest,AdInterestDTO,AdInterestData,UserLocatorVO>
-
removeAll
public void removeAll(User user)
Description copied from interface:AdInterestServiceLocalRemoves all AdInterests of the specified user.- Specified by:
removeAllin interfaceAdInterestServiceLocal
-
toEntity
public AdInterest toEntity(AdInterestDTO dto)
Description copied from class:CRUDServiceImplConverts the given DTO in an entity, handling theCRUDServiceImpl.subClassMappings()mappings for subclasses- Specified by:
toEntityin interfaceCRUDServiceLocal<AdInterest,AdInterestDTO,AdInterestData,UserLocatorVO>- Overrides:
toEntityin classCRUDServiceImpl<AdInterest,QAdInterest,AdInterestDTO,AdInterestData,UserLocatorVO>
-
getData
protected AdInterestData getData(AdInterest interest)
Description copied from class:CRUDServiceImplReturns details data for the given entity- Specified by:
getDatain classCRUDServiceImpl<AdInterest,QAdInterest,AdInterestDTO,AdInterestData,UserLocatorVO>
-
registerNetworkMappings
protected void registerNetworkMappings(NetworkPathRegistry networkPathRegistry)
Description copied from class:BaseServiceImplNeeds to be overridden by subclasses to register the path up to the network- Specified by:
registerNetworkMappingsin classBaseServiceImpl
-
resolveValidator
protected Validator resolveValidator(AdInterestDTO dto)
- Specified by:
resolveValidatorin classCRUDServiceImpl<AdInterest,QAdInterest,AdInterestDTO,AdInterestData,UserLocatorVO>
-
-