Package org.cyclos.impl.system
Class ConfigurationImageServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.system.BaseImageServiceImpl<ConfigurationImage,QConfigurationImage,NewConfigurationImageParams>
-
- org.cyclos.impl.system.ConfigurationImageServiceImpl
-
- All Implemented Interfaces:
BaseImageServiceLocal<ConfigurationImage,NewConfigurationImageParams>,ConfigurationImageServiceLocal,Service,BaseImageService<NewConfigurationImageParams>,ConfigurationImageService
@Service public class ConfigurationImageServiceImpl extends BaseImageServiceImpl<ConfigurationImage,QConfigurationImage,NewConfigurationImageParams> implements ConfigurationImageServiceLocal
Implementation forConfigurationImageService
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.system.BaseImageServiceImpl
$, imageHandler, imageType, nature
-
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 ConfigurationImageServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigurationImagefind(Long id)Finds an image by idStringgetCurrentUrl(Configuration configuration, ConfigurationImageType type)Returns the URL for the given configuration image type and current configurationConfigurationImageVOgetImageVO(ConfigurationVO configurationVO, @NotNull ConfigurationImageType type)Returns data about a configuration image, for a given type.ConfigurationImagesListDatagetListData(ConfigurationVO configurationVO)Returns data to list images in a given configurationStringgetUrl(Configuration configuration, ConfigurationImageType type)Returns the URL for the given configuration image type and specific configurationList<ConfigurationImageVO>list(ConfigurationVO configurationVO)Lists a configuration's images, optionally including inherited images from parent configurationsConfigurationImageVOload(@NotNull Long id)Returns metadata of a configuration image by idConfigurationImagenewImage(NewConfigurationImageParams param)Returns a new image for the given parametersSerializableInputStreamreadByConfigurationAndType(Long configurationId, ConfigurationImageType type)Returns the content of a given configuration image, for the given configurationprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkvoidremoveByConfigurationAndType(ConfigurationVO configurationVO, ConfigurationImageType type)Removes a configuration image, making it inherit the default (either from a parent configuration or the hardcoded default)ConfigurationImageVOsave(NewConfigurationImageParams param, String name, SerializableInputStream content, String contentType)Saves the given image for the given parameter (which depends on each image type), returning the descriptorConfigurationImagesaveImageContent(Configuration configuration, ConfigurationImageType type, String name, SerializableInputStream in, String contentType)Saves an image content-
Methods inherited from class org.cyclos.impl.system.BaseImageServiceImpl
findByKey, getImageNature, isUseImageLimits, onAfterRemove, onAfterSave, onBeforeRemove, readContent, readContentByKey, remove, removeAll, saveName, setDataAndPersist, setImageName, validateMaxImages
-
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, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, 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.system.BaseImageService
remove, removeAll, saveName
-
Methods inherited from interface org.cyclos.impl.system.BaseImageServiceLocal
getImageNature, readContent, readContentByKey
-
-
-
-
Method Detail
-
find
public ConfigurationImage find(Long id)
Description copied from interface:BaseImageServiceLocalFinds an image by id- Specified by:
findin interfaceBaseImageServiceLocal<ConfigurationImage,NewConfigurationImageParams>- Overrides:
findin classBaseImageServiceImpl<ConfigurationImage,QConfigurationImage,NewConfigurationImageParams>
-
getCurrentUrl
public String getCurrentUrl(Configuration configuration, ConfigurationImageType type)
Description copied from interface:ConfigurationImageServiceLocalReturns the URL for the given configuration image type and current configuration- Specified by:
getCurrentUrlin interfaceConfigurationImageServiceLocal
-
getImageVO
public ConfigurationImageVO getImageVO(ConfigurationVO configurationVO, @NotNull @NotNull ConfigurationImageType type) throws FrameworkException
Description copied from interface:ConfigurationImageServiceReturns data about a configuration image, for a given type. If the configuration is null, assumes the current configuration.- Specified by:
getImageVOin interfaceConfigurationImageService- Throws:
FrameworkException
-
getListData
public ConfigurationImagesListData getListData(ConfigurationVO configurationVO) throws FrameworkException
Description copied from interface:ConfigurationImageServiceReturns data to list images in a given configuration- Specified by:
getListDatain interfaceConfigurationImageService- Throws:
FrameworkException
-
getUrl
public String getUrl(Configuration configuration, ConfigurationImageType type)
Description copied from interface:ConfigurationImageServiceLocalReturns the URL for the given configuration image type and specific configuration- Specified by:
getUrlin interfaceConfigurationImageServiceLocal
-
list
public List<ConfigurationImageVO> list(ConfigurationVO configurationVO) throws FrameworkException
Description copied from interface:ConfigurationImageServiceLists a configuration's images, optionally including inherited images from parent configurations- Specified by:
listin interfaceConfigurationImageService- Throws:
FrameworkException
-
load
public ConfigurationImageVO load(@NotNull @NotNull Long id) throws FrameworkException
Description copied from interface:ConfigurationImageServiceReturns metadata of a configuration image by id- Specified by:
loadin interfaceConfigurationImageService- Throws:
FrameworkException
-
newImage
public ConfigurationImage newImage(NewConfigurationImageParams param)
Description copied from class:BaseImageServiceImplReturns a new image for the given parameters- Specified by:
newImagein classBaseImageServiceImpl<ConfigurationImage,QConfigurationImage,NewConfigurationImageParams>
-
readByConfigurationAndType
public SerializableInputStream readByConfigurationAndType(Long configurationId, ConfigurationImageType type) throws FrameworkException
Description copied from interface:ConfigurationImageServiceLocalReturns the content of a given configuration image, for the given configuration- Specified by:
readByConfigurationAndTypein interfaceConfigurationImageServiceLocal- Throws:
FrameworkException
-
removeByConfigurationAndType
public void removeByConfigurationAndType(ConfigurationVO configurationVO, ConfigurationImageType type) throws FrameworkException
Description copied from interface:ConfigurationImageServiceRemoves a configuration image, making it inherit the default (either from a parent configuration or the hardcoded default)- Specified by:
removeByConfigurationAndTypein interfaceConfigurationImageService- Throws:
FrameworkException
-
save
public ConfigurationImageVO save(NewConfigurationImageParams param, String name, SerializableInputStream content, String contentType) throws FrameworkException
Description copied from interface:BaseImageServiceSaves the given image for the given parameter (which depends on each image type), returning the descriptor- Specified by:
savein interfaceBaseImageService<NewConfigurationImageParams>- Overrides:
savein classBaseImageServiceImpl<ConfigurationImage,QConfigurationImage,NewConfigurationImageParams>- Throws:
FrameworkException
-
saveImageContent
public ConfigurationImage saveImageContent(Configuration configuration, ConfigurationImageType type, String name, SerializableInputStream in, String contentType) throws FrameworkException
Description copied from interface:ConfigurationImageServiceLocalSaves an image content- Specified by:
saveImageContentin interfaceConfigurationImageServiceLocal- Throws:
FrameworkException
-
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
-
-