Package org.cyclos.services.system
Interface InternalImageService
-
- All Superinterfaces:
Service
- All Known Subinterfaces:
InternalImageServiceLocal
public interface InternalImageService extends Service
Contains methods to access image contents, regardless the image type. Used to prevent access of image contents through other means than the controller, which caches, resizes, etc
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 type
-
-
-
Method Detail
-
load
ImageVO load(Long id) throws FrameworkException
Loads an image by id- Throws:
FrameworkException
-
loadByKey
ImageVO loadByKey(String key) throws FrameworkException
Loads an image by key- Throws:
FrameworkException
-
qrCode
SerializableInputStream qrCode(String value, ImageSize size) throws FrameworkException
Generates a qr-code image with the given value and size- Throws:
FrameworkException
-
readConfigurationImage
SerializableInputStream readConfigurationImage(Long configurationId, ConfigurationImageType type) throws FrameworkException
Returns the content of a given configuration image, for the given configuration- Throws:
FrameworkException
-
readContent
SerializableInputStream readContent(Long id) throws FrameworkException
Reads the contents for the image with the given id, with the specified size- Throws:
FrameworkException
-
readContentByKey
SerializableInputStream readContentByKey(String key) throws FrameworkException
Reads the contents for the image with the given key, with the specified size- Throws:
FrameworkException
-
readThemeImage
SerializableInputStream readThemeImage(Long themeId, ThemeImageType type, String name) throws FrameworkException
Returns the content of an image, according to the given image nature- 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
SerializableInputStream readVoucherTemplateImage(Long voucherTemplateId, String name) throws FrameworkException
Returns the content of an image,- Parameters:
voucherTemplateId- The voucher template identifiername- The file name.- Throws:
FrameworkException
-
remove
void remove(Long id) throws FrameworkException
Removes an image, no matter its type- Throws:
FrameworkException
-
removeByKey
void removeByKey(String key) throws FrameworkException
Removes an image, no matter its type- Throws:
FrameworkException
-
-