Re: Users - Multiple images and thumbnail images

Posted by Midhat on
URL: http://ofbiz.116.s1.nabble.com/Multiple-images-and-thumbnail-images-tp139304p139320.html

I have only seen the first file u sent. the general methd o adding a service
to OFBiz application is
1. implement the functionality as a utility class, without any startup
methods like main etc.  ur current file is an executable class. save the
class in the package hieraricy in the src folder of the application.

2. add a service to the services.xml file lke this

    <service name="getBOMTree" default-entity-name="ProductAssoc"
engine="java"
            location="org.ofbiz.manufacturing.bom.BOMServices"
invoke="getBOMTree">
        <description>Returns a BOMTree (an object that represents a
configured bill of material tree in memory). Useful for tree traversal
(breakdown, explosion, implosion).</description>
        <attribute mode="IN" name="productId" optional="false"
type="String"/>
        <attribute mode="IN" name="type" optional="true" type="Integer"/>
        <attribute mode="IN" name="fromDate" optional="true" type="String"/>
        <attribute mode="IN" name="bomType" optional="false" type="String"/>
        <attribute mode="IN" name="quantity" optional="true" type="Double"/>
        <attribute mode="IN" name="amount" optional="true" type="Double"/>
        <attribute mode="OUT" name="tree" optional="true" type="
org.ofbiz.manufacturing.bom.BOMTree"/>
    </service>

location specifies the classfile and invoke specifies the methid in the
class. attributes are the method attributes.

3. add a request URI to controller.xml to invoke th eservice like
    <request-map uri="runBomSimulation">
        <security https="true" auth="true"/>
        <event type="service" invoke="getBOMTree"/>
        <response name="success" type="view" value="BomSimulation"/>
    </request-map>

4. link to the request map using hyperlink or form.


hope it helps

On 7/29/06, rohit2006 <[hidden email]> wrote:

>
>
>
>
> hi,
>
> i got a bit of code that can create new images from existing images. I
> need
> some help in integrating this code with the ofbiz. The idea is to create
> smaller thumbnails from the larger images, if the thumbnail do not exist.
>
> This code uses ImageIO API,
> http://www.nabble.com/user-files/144/JPEGImageIO.java JPEGImageIO.java
>
> This code uses Java Advanced Imaging API
> http://www.nabble.com/user-files/146/JPEGJai.java JPEGJai.java
>
> This code uses Java2D API
> http://www.nabble.com/user-files/145/JPEGJ2d.java JPEGJ2d.java
>
> I am not sure which can be the best for ofbiz, so i have included all
> three
> of them. I was not really able to get them work with Ofbiz due to my
> limited
> knowlegde of ofbiz. If anyone can integrate them or guide me how to do it,
> i
> will really appreciate it.
>
> Thanks
>
> rohit
> --
> View this message in context:
> http://www.nabble.com/Multiple-images-and-thumbnail-images-tf1642877.html#a5552383
> Sent from the OFBiz - User forum at Nabble.com.
>
>