Jahia Dev Forum > Override Image processing...

0 (0 Good)
0 (0 Bad)

Override Image processing service

by  bharatkasodariya »  2016/02/17 07:41

checked below link to change image processing service.

http://www.jahia.com/get-started/for-developers/developers-techwiki/services/images-processing

 

Is it possible to override existing jahia image processing service by defining custom service bean to store and manipulate image in custom way. Can it be defined like 

  1. imageService = CustomImageService.

where CustomImageService is

public class CustomImageService extends AbstractImageService {

......

I have tried to define custom bean in 

digital-factory-config --> jahia --> applicationcontext-custom.xml

but it throws class not found exception during bean creation. class is defined inside custom module which is added as jar in module dir.

  • Override Image processing service
    2016/02/19 12:08

    bharatkasodariya <p style="line-height: 20.8px;">checked below link to change image processing service.</p> <p style="line-height: 20.8px;">http://www.jahia.com/get-started/for-developers/developers-techwiki/services/images-processing</p> <p style="line-height: 20.8px;">&nbsp;</p> <p style="line-height: 20.8px;">Is it possible to override existing jahia image processing service by defining custom service bean to store and manipulate image in custom way. Can it be defined like&nbsp;</p> <ol class="linenums" style="padding-right: 0px; padding-left: 0px; box-sizing: border-box; margin: 0px; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; line-height: 18.5714px; white-space: pre;"> <li class="L7" style="box-sizing: border-box; margin: 0px; padding: 0px; list-style: none; background: rgb(238, 238, 238);"><span class="pln" style="box-sizing: border-box; color: rgb(0, 0, 0);">imageService </span><span class="pun" style="box-sizing: border-box; color: rgb(102, 102, 0);">=</span><span class="pln" style="box-sizing: border-box; color: rgb(0, 0, 0);"> </span><span class="typ" style="box-sizing: border-box; color: rgb(102, 0, 102);">CustomImageService.</span></li> </ol> <p style="line-height: 20.8px;">where CustomImageService is</p> <p style="line-height: 20.8px;"><span style="font-family: 'Courier New'; font-size: 9pt; white-space: pre-wrap; line-height: 1.6; color: rgb(0, 0, 128); font-weight: bold;">public class </span><span style="font-size: 9pt; color: rgb(102, 0, 102); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; line-height: 18.5714px; white-space: pre; background-color: rgb(238, 238, 238);">CustomImageService</span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-size: 9pt; white-space: pre-wrap; line-height: 1.6;"> </span><span style="font-family: 'Courier New'; font-size: 9pt; white-space: pre-wrap; line-height: 1.6; color: rgb(0, 0, 128); font-weight: bold;">extends </span><span style="color: rgb(0, 0, 0); font-family: 'Courier New'; font-size: 9pt; white-space: pre-wrap; line-height: 1.6;">AbstractImageService {</span></p> <p style="line-height: 20.8px;">......</p> <p style="line-height: 20.8px;">I have tried to define custom bean in&nbsp;</p> <p style="line-height: 20.8px;"><strong>digital-factory-config --&gt;&nbsp;jahia --&gt;&nbsp;applicationcontext-custom.xml</strong></p> <p style="line-height: 20.8px;">but it throws<strong> class not found </strong>exception during bean creation. class is defined inside custom module which is added as jar in module dir.</p>

  • Number of messages  57
    Registration date Feb 17, 2016
    0 (0 Good)
    0 (0 Bad)

    Re: Override Image processing service

    by  shyrkov »  2016/02/23 08:08

    Hello,

    the image service lookup the bean in the main (core) Spring application context, but not in modules. So, the bean class should be in the Web application classloader (WEB-INF/classes or WEB-INF/lib) to avoid clas not found exception.

     

    Kind regards

    Sergiy

  • Re: Override Image processing service
    2016/02/23 08:08

    shyrkov <p>Hello,</p> <p>the image service lookup the bean in the main (core) Spring application context, but not in modules. So, the bean class should be in the Web application classloader (WEB-INF/classes or WEB-INF/lib) to avoid clas not found exception.</p> <p>&nbsp;</p> <p>Kind regards</p> <p>Sergiy</p>

  • Number of messages  407
    Registration date Feb 23, 2016
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page