package com.ikea.publishingplatform.service;

import android.content.Context;
import android.text.TextUtils;
import com.ikea.publishingplatform.model.PublishingPlatformResponse;
import java.util.concurrent.ExecutorService;

public class PublishingPlatformService extends PublishingPlatformBaseService
{
  private static String API_KEY = null;
  private static PublishingPlatformService instance;

  private PublishingPlatformService(Context paramContext)
  {
    super(paramContext);
  }

  public static final PublishingPlatformService i(Context paramContext)
  {
    try
    {
      if (instance == null)
        instance = new PublishingPlatformService(paramContext);
      PublishingPlatformService localPublishingPlatformService = instance;
      return localPublishingPlatformService;
    }
    finally
    {
    }
  }

  public void fetchInspirationContent(final String paramString1, String paramString2, String paramString3, final PublishingPlatformServiceCallback<PublishingPlatformResponse> paramPublishingPlatformServiceCallback)
  {
    if (!TextUtils.isEmpty(paramString1))
    {
      final PublishingPlatformRequest localPublishingPlatformRequest = PublishingPlatformResponseRequestUtil.getInspirationContentRequest(paramString1, paramString2, paramString3);
      this.mExecutorService.execute(new Runnable()
      {
        public void run()
        {
          try
          {
            PublishingPlatformResponse localPublishingPlatformResponse = (PublishingPlatformResponse)new PublishingPlatformBaseService.NetworkCaller(PublishingPlatformService.this, PublishingPlatformResponse.class, PublishingPlatformService.this.mContext).execute(localPublishingPlatformRequest);
            if (localPublishingPlatformResponse != null)
              localPublishingPlatformResponse.setContentId(paramString1);
            paramPublishingPlatformServiceCallback.callbackDone(localPublishingPlatformResponse, null, null);
            return;
          }
          catch (Exception localException)
          {
            paramPublishingPlatformServiceCallback.callbackDone(null, null, localException);
          }
        }
      });
      return;
    }
    paramPublishingPlatformServiceCallback.callbackDone(null, null, new NullPointerException());
  }

  public void initLib(String paramString)
  {
    API_KEY = paramString;
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.ikea.publishingplatform.service.PublishingPlatformService
 * JD-Core Version:    0.6.2
 */