/*
   Copyright (c) 2012 LinkedIn Corp.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package com.linkedin.restli.tools.twitter;

import com.linkedin.common.callback.Callback;
import com.linkedin.parseq.promise.Promise;
import com.linkedin.restli.common.PatchRequest;
import com.linkedin.restli.server.BatchFinderResult;
import com.linkedin.restli.server.CreateResponse;
import com.linkedin.restli.server.PagingContext;
import com.linkedin.restli.server.ResourceLevel;
import com.linkedin.restli.server.UpdateResponse;
import com.linkedin.restli.server.annotations.Action;
import com.linkedin.restli.server.annotations.ActionParam;
import com.linkedin.restli.server.annotations.AlternativeKey;
import com.linkedin.restli.server.annotations.AlternativeKeys;
import com.linkedin.restli.server.annotations.BatchFinder;
import com.linkedin.restli.server.annotations.CallbackParam;
import com.linkedin.restli.server.annotations.PagingContextParam;
import com.linkedin.restli.server.annotations.Finder;
import com.linkedin.restli.server.annotations.Optional;
import com.linkedin.restli.server.annotations.QueryParam;
import com.linkedin.restli.server.annotations.RestLiCollection;
import com.linkedin.restli.server.resources.CollectionResourceAsyncTemplate;
import com.linkedin.restli.server.resources.CollectionResourceTemplate;
import com.linkedin.restli.tools.twitter.TwitterTestDataModels.Status;
import com.linkedin.restli.tools.twitter.TwitterTestDataModels.StatusType;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * CollectionResource containing all statuses implemented as an async resource.
 *
 * @author dellamag
 */
@RestLiCollection(name="statusesAsync",
    keyName="statusID")
@AlternativeKeys(alternativeKeys = {@AlternativeKey(name="alt", keyCoercer=StringLongCoercer.class, keyType=String.class),
    @AlternativeKey(name="newAlt", keyCoercer=StringLongCoercer.class, keyType=String.class)})
public class StatusAsyncResource extends CollectionResourceAsyncTemplate<Long,Status>
{
  /**
   * Gets a sample of the timeline of statuses generated by all users
   */
  @Finder("public_timeline")
  public void getPublicTimeline(@PagingContextParam PagingContext pagingContext, @CallbackParam Callback<List<Status>> callback)
  {

  }
  /**
   * Batch finder for statuses
   */
  @BatchFinder(value="batchFinderByAction",  batchParam="criteria")
  public void batchFindStatuses(@QueryParam("criteria") Status[] criteria,
      @CallbackParam Callback<BatchFinderResult<Status, Status, TwitterTestDataModels.User>> callback)
  {
  }

  /**
   * Creates a new Status
   */
  @Override
  public void create(Status entity, @CallbackParam Callback<CreateResponse> callback)
  {

  }

  /**
   * Gets a batch of statuses
   */
  @Override
  public void batchGet(Set<Long> ids, @CallbackParam Callback<Map<Long, Status>> callback)
  {

  }

  /**
   * Gets a single status resource
   */
  @Override
  public void get(Long key, @CallbackParam Callback<Status> callback)
  {

  }

  /**
   * Gets all the resources
   */
  @Override
  public void getAll(@PagingContextParam PagingContext ctx, @CallbackParam Callback<List<Status>> callback) {

  }

  /**
   * Deletes a status resource
   */
  @Override
  public void delete(Long key, @CallbackParam Callback<UpdateResponse> callback)
  {

  }

  /**
   * Updates a single status resource
   */
  @Override
  public void update(Long key, Status entity, @CallbackParam Callback<UpdateResponse> callback)
  {

  }

  /**
   * Ambiguous action binding test case
   */
  @Action(name="forward",
      resourceLevel= ResourceLevel.ENTITY)
  public void forward(@ActionParam("to") long userID, @CallbackParam Callback<String> callback)
  {

  }
}
