Package org.cyclos.security.system
Class InternalImageServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.system.InternalImageServiceSecurity
-
- All Implemented Interfaces:
Service,InternalImageService
@Security public class InternalImageServiceSecurity extends BaseServiceSecurity implements InternalImageService
Security forInternalImageService. Actually just delegates to the implementation, but the framework requires a Security for invocation.
-
-
Field Summary
-
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 InternalImageServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoInitialize()ImageVOload(Long id)Loads an image by idImageVOloadByKey(String key)Loads an image by keySerializableInputStreamqrCode(String value, ImageSize size)Generates a qr-code image with the given value and sizeSerializableInputStreamreadConfigurationImage(Long configurationId, ConfigurationImageType type)Returns the content of a given configuration image, for the given configurationSerializableInputStreamreadContent(Long id)Reads the contents for the image with the given id, with the specified sizeSerializableInputStreamreadContentByKey(String key)Reads the contents for the image with the given key, with the specified sizeSerializableInputStreamreadThemeImage(Long themeId, ThemeImageType type, String name)Returns the content of an image, according to the given image natureSerializableInputStreamreadVoucherTemplateImage(Long voucherTemplateId, String name)Returns the content of an image,voidremove(Long id)Removes an image, no matter its typevoidremoveByKey(String key)Removes an image, no matter its typeprotected EntityCheck<?>resolveEntityCheck()Must be implemented in order to return theEntityCheckmanaged by this security component, or null if none-
Methods inherited from class org.cyclos.security.BaseServiceSecurity
checkGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkScope, checkVO, checkVOs, getEntityCheckRegistry, getUser, initialize
-
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
-
-
-
-
Method Detail
-
load
public ImageVO load(Long id) throws FrameworkException
Description copied from interface:InternalImageServiceLoads an image by id- Specified by:
loadin interfaceInternalImageService- Throws:
FrameworkException
-
loadByKey
public ImageVO loadByKey(String key) throws FrameworkException
Description copied from interface:InternalImageServiceLoads an image by key- Specified by:
loadByKeyin interfaceInternalImageService- Throws:
FrameworkException
-
qrCode
public SerializableInputStream qrCode(String value, ImageSize size) throws FrameworkException
Description copied from interface:InternalImageServiceGenerates a qr-code image with the given value and size- Specified by:
qrCodein interfaceInternalImageService- Throws:
FrameworkException
-
readConfigurationImage
public SerializableInputStream readConfigurationImage(Long configurationId, ConfigurationImageType type) throws FrameworkException
Description copied from interface:InternalImageServiceReturns the content of a given configuration image, for the given configuration- Specified by:
readConfigurationImagein interfaceInternalImageService- Throws:
FrameworkException
-
readContent
public SerializableInputStream readContent(Long id) throws FrameworkException
Description copied from interface:InternalImageServiceReads the contents for the image with the given id, with the specified size- Specified by:
readContentin interfaceInternalImageService- Throws:
FrameworkException
-
readContentByKey
public SerializableInputStream readContentByKey(String key) throws FrameworkException
Description copied from interface:InternalImageServiceReads the contents for the image with the given key, with the specified size- Specified by:
readContentByKeyin interfaceInternalImageService- Throws:
FrameworkException
-
readThemeImage
public SerializableInputStream readThemeImage(Long themeId, ThemeImageType type, String name) throws FrameworkException
Description copied from interface:InternalImageServiceReturns the content of an image, according to the given image nature- Specified by:
readThemeImagein interfaceInternalImageService- Parameters:
themeId- The theme identifiertype- The image type. Will determine the semantics for the other parametersname- Depends on the nature. When nature ==ThemeImageType.CUSTOM, will be the file name. Otherwise, will be the name for the corresponding enumeration- Throws:
FrameworkException
-
readVoucherTemplateImage
public SerializableInputStream readVoucherTemplateImage(Long voucherTemplateId, String name) throws FrameworkException
Description copied from interface:InternalImageServiceReturns the content of an image,- Specified by:
readVoucherTemplateImagein interfaceInternalImageService- Parameters:
voucherTemplateId- The voucher template identifiername- The file name.- Throws:
FrameworkException
-
remove
public void remove(Long id) throws FrameworkException
Description copied from interface:InternalImageServiceRemoves an image, no matter its type- Specified by:
removein interfaceInternalImageService- Throws:
FrameworkException
-
removeByKey
public void removeByKey(String key) throws FrameworkException
Description copied from interface:InternalImageServiceRemoves an image, no matter its type- Specified by:
removeByKeyin interfaceInternalImageService- Throws:
FrameworkException
-
doInitialize
protected void doInitialize()
- Overrides:
doInitializein classBaseServiceSecurity
-
resolveEntityCheck
protected EntityCheck<?> resolveEntityCheck()
Description copied from class:BaseServiceSecurityMust be implemented in order to return theEntityCheckmanaged by this security component, or null if none- Specified by:
resolveEntityCheckin classBaseServiceSecurity
-
-