Package org.cyclos.impl.marketplace
Class AdImageServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.system.BaseImageServiceImpl<I,A,NP>
-
- org.cyclos.impl.system.BaseCategorizedImageServiceImpl<I,O,A,NP>
-
- org.cyclos.impl.system.BaseOwnedImageServiceImpl<BasicAd,AdImage,QAdImage,BasicAdVO>
-
- org.cyclos.impl.marketplace.AdImageServiceImpl
-
- All Implemented Interfaces:
AdImageServiceLocal,BaseCategorizedImageServiceLocal<AdImage,BasicAd,BasicAdVO>,BaseImageServiceLocal<AdImage,BasicAdVO>,BaseOwnedImageServiceLocal<BasicAd,AdImage,BasicAdVO>,AdImageService,Service,BaseCategorizedImageService<BasicAdVO>,BaseImageService<BasicAdVO>,BaseOwnedImageService<BasicAdVO>
@Service public class AdImageServiceImpl extends BaseOwnedImageServiceImpl<BasicAd,AdImage,QAdImage,BasicAdVO> implements AdImageServiceLocal
implementation forAdImageService
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.system.BaseOwnedImageServiceImpl
beanHandler, tempImageService
-
Fields inherited from class org.cyclos.impl.system.BaseCategorizedImageServiceImpl
categoryPath, categoryType
-
Fields inherited from class org.cyclos.impl.system.BaseImageServiceImpl
$, imageHandler, imageType, nature, storedFileHandler
-
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 AdImageServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddImage(BasicAd ad, AdImage image)Adds the image to the given adprotected booleanisCategoryActive(BasicAd ad)The default implementation assumes the image category is active.protected booleanisTempValid(BasicAd ad, TempImage temp)Must be implemented to return whether the given temporary image is valid for the given ownerprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkprotected intresolveMaxImages(BasicAd ad)Must be implemented in order to resolve the maximum images upload limit.-
Methods inherited from class org.cyclos.impl.system.BaseOwnedImageServiceImpl
customizeListByCategoryQuery, doAddImage, importTempImage, importTempImages, newImage, newOrder, onAfterRemove, onAfterSave, onBeforeRemove, onOrderChanged, physicallyAddImage, removeAll, saveOrder, setFirstImage
-
Methods inherited from class org.cyclos.impl.system.BaseCategorizedImageServiceImpl
count, findCategory, getListData, isRequired, list, listByCategory, remove, save, toCategory, validateMaxImages, validateMaxImages
-
Methods inherited from class org.cyclos.impl.system.BaseImageServiceImpl
find, findByKey, getImageNature, isKeepOriginalContent, readContent, readContentByKey, remove, removeAll, saveName, setDataAndPersist, setImageName
-
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, 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.system.BaseCategorizedImageService
getListData, list
-
Methods inherited from interface org.cyclos.impl.system.BaseCategorizedImageServiceLocal
listByCategory, removeAll
-
Methods inherited from interface org.cyclos.services.system.BaseImageService
remove, removeAll, save, saveName
-
Methods inherited from interface org.cyclos.impl.system.BaseImageServiceLocal
find, getImageNature, readContent, readContentByKey
-
Methods inherited from interface org.cyclos.services.system.BaseOwnedImageService
saveOrder
-
Methods inherited from interface org.cyclos.impl.system.BaseOwnedImageServiceLocal
importTempImage, importTempImages
-
-
-
-
Method Detail
-
addImage
public void addImage(BasicAd ad, AdImage image)
Description copied from interface:AdImageServiceLocalAdds the image to the given ad- Specified by:
addImagein interfaceAdImageServiceLocal
-
isCategoryActive
protected boolean isCategoryActive(BasicAd ad)
Description copied from class:BaseOwnedImageServiceImplThe default implementation assumes the image category is active.- Overrides:
isCategoryActivein classBaseOwnedImageServiceImpl<BasicAd,AdImage,QAdImage,BasicAdVO>
-
isTempValid
protected boolean isTempValid(BasicAd ad, TempImage temp)
Description copied from class:BaseOwnedImageServiceImplMust be implemented to return whether the given temporary image is valid for the given owner- Specified by:
isTempValidin classBaseOwnedImageServiceImpl<BasicAd,AdImage,QAdImage,BasicAdVO>
-
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
-
resolveMaxImages
protected int resolveMaxImages(BasicAd ad)
Description copied from class:BaseCategorizedImageServiceImplMust be implemented in order to resolve the maximum images upload limit. Returns a negative number for unlimited upload.- Specified by:
resolveMaxImagesin classBaseCategorizedImageServiceImpl<AdImage,BasicAd,QAdImage,BasicAdVO>
-
-