• Welcome to KonaKart Community Forum. Please login or sign up.
 

To call one custom api from another api using adminengine obj

Started by bharatkasodariya, May 29, 2013, 02:01:50 pm

Previous topic - Next topic

bharatkasodariya

Is it possible to call one custom method from another custom method with custom admin engine.

Below is sample of two custom class. I tried with kkAdminEng.getAdminEng()....  but didn't work

@SuppressWarnings("all")
public class DeleteProduct
{
    KKAdmin kkAdminEng = null;

    /**
     * Constructor
     */
     public DeleteProduct(KKAdmin _kkAdminEng)
     {
         kkAdminEng = _kkAdminEng;
     }

  public void deleteProduct(String sessionId, int productId) throws KKAdminException
     {               
      Sysout("deleteProduct");
                //Logic
               //Here I want to call another method deleteMiscItem which is also custom.

     }
}

@SuppressWarnings("all")
public class DeleteMiscItem
{
    KKAdmin kkAdminEng = null;

    /**
     * Constructor
     */
     public DeleteMiscItem(KKAdmin _kkAdminEng)
     {
         kkAdminEng = _kkAdminEng;
     }

     public void deleteMiscItem(String sessionId, int miTypeId) throws KKAdminException
     {               
      Sysout("deleteMiscItem");
                //Logic

     }
}

ming

You can step back a level to achieve that.

Take a look at "C:\Program Files\KonaKart\custom\adminengine\gensrc\com\konakartadmin\app\KKAdminCustomEng.java"

This is the class that calls the individual API classes in a custom engine...

So you can modify how they get called in there...