Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 5516 #533

Merged
merged 8 commits into from Jul 1, 2014
Merged

Feature 5516 #533

merged 8 commits into from Jul 1, 2014

Conversation

mmoqui
Copy link
Member

@mmoqui mmoqui commented Jun 27, 2014

Code a system of image resizing on-demand. The images are resized at the asked size if not already done and save the result into a cache.
For doing, a two stages system is coded:

  • a JSL tag in ViewGenerator to render an image and that take into account size parameters and size properties to refine the URL of the image in order to target its resized version.
  • an image resizing processor triggered when the image is accessed in order to deliver it to the end-user.

For instance, only the users' avatar and the images in an XML form are taken in charge by the dynamic image resizing.

…d in the filesystem is now performed through the SilverpeasFile and SilverpeasFileFactory classes. SilverpeasFile represents now a file in Silverpeas whereas SilverpeasFileFactory wraps the way to access them according to some business rules (attachment, file serving, ...). These new classes are now used by the following servlets: FileServer and any subclasses of AbstractFileSender class
…r. SilverpeasFileProvider supports now pre and post processing when fetching a file in silverpeas. The pre processors are executed against the file path whereas the post processors are executed against the retrieved file itself. To processors are defined: one to resize an image from its path and another one to check the existance of the asked file. The image resizing processor resizes an image if the asked file is an image and its path contains as information the targeted size (for example: a path such as /display/avatar/108x140/myavatar.jpg).
…account size parameter. This size parameter is then taken at service side to resize dynamically the image if not already done. Update the JSPs to take into account this new tag when rendering the avatar. The image displayer of a XML form uses the new functionality of the dynamic resizing of images.
…e users' avatar, for the image in a XML form
… the original image is also updated. No deletion occurs currently in the cache.
…to manage files in Silverpeas. It provides currently methods to write, to delete and to move a file. This new API is yet used by ImageProfil (it manages the avatar) and ThumbnailController (it manages the vignettes and thumbnails of some contributions like the publications). ImageResizingProcessor that is hooked to SilverpeasFileProvider takes advantage of this to manages the cache of resized images when their original image is either deleted or updated. Beside that, a ResizedImageCleaner is introduced to clean up resized images of non existing original images; it is scheduled by a cron instruction in the org.silverpeas.lookAndFeel.generalLook.properties bundle.
@NicolasEYSSERIC NicolasEYSSERIC merged commit 8cdd651 into Silverpeas:master Jul 1, 2014
@mmoqui mmoqui deleted the feature-5516 branch October 7, 2015 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants