/*
 * ********************************************************************************************************************
 *  <p/>
 *  BACKENDLESS.COM CONFIDENTIAL
 *  <p/>
 *  ********************************************************************************************************************
 *  <p/>
 *  Copyright 2012 BACKENDLESS.COM. All Rights Reserved.
 *  <p/>
 *  NOTICE: All information contained herein is, and remains the property of Backendless.com and its suppliers,
 *  if any. The intellectual and technical concepts contained herein are proprietary to Backendless.com and its
 *  suppliers and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade secret
 *  or copyright law. Dissemination of this information or reproduction of this material is strictly forbidden
 *  unless prior written permission is obtained from Backendless.com.
 *  <p/>
 *  ********************************************************************************************************************
 */

package com.backendless.servercode.extension;

import com.backendless.commons.util.SocialType;
import com.backendless.persistence.BackendlessDataQuery;
import com.backendless.property.UserProperty;
import com.backendless.servercode.ExecutionResult;
import com.backendless.servercode.RunnerContext;

import java.util.List;
import java.util.HashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: ivanlappo
 * Date: 5/20/13
 * Time: 12:40 PM
 * To change this template use File | Settings | File Templates.
 */
public abstract class UserExtender
{
  public UserExtender()
  {
  }

  public void beforeFind( RunnerContext context, BackendlessDataQuery query ) throws Exception
  {

  }

  public void afterFind( RunnerContext context, BackendlessDataQuery query,
                         ExecutionResult<List> result ) throws Exception
  {
  }

  public void beforeFindById( RunnerContext context, Object objectId, String[] relations ) throws Exception
  {

  }

  public void afterFindById( RunnerContext context, Object objectId, String[] relations,
                             ExecutionResult<HashMap> result ) throws Exception
  {
  }

  public void beforeLogin( RunnerContext context, String login, String password ) throws Exception
  {
  }

  public void afterLogin( RunnerContext context, String login, String password,
                          ExecutionResult<HashMap> result ) throws Exception
  {
  }

  public void beforeSocialLogin( RunnerContext context, Map<String, String> userValues,
                                 SocialType socialType ) throws Exception
  {
  }

  public void afterSocialLogin( RunnerContext context, Map<String, String> userValues, SocialType socialType,
                                ExecutionResult<HashMap> result ) throws Exception
  {
  }

  public void beforeRegister( RunnerContext context, HashMap userValues ) throws Exception
  {
  }

  public void afterRegister( RunnerContext context, HashMap userValues,
                             ExecutionResult<HashMap> result ) throws Exception
  {
  }

  public void beforeSocialRegister( RunnerContext context, Map<String, String> userValues,
                                    SocialType socialType ) throws Exception
  {
  }

  public void afterSocialRegister( RunnerContext context, Map<String, String> userValues, SocialType socialType,
                                   ExecutionResult<HashMap> result ) throws Exception
  {
  }

  public void beforeUpdate( RunnerContext context, HashMap userValues ) throws Exception
  {
  }

  public void afterUpdate( RunnerContext context, HashMap userValues, ExecutionResult<HashMap> result ) throws Exception
  {
  }

  public void beforeUpdateBulk( RunnerContext context, String whereClause, HashMap userValues ) throws Exception
  {
  }

  public void afterUpdateBulk( RunnerContext context, String whereClause, HashMap userValues,
                               ExecutionResult<Integer> result ) throws Exception
  {
  }

  public void beforeRemove( RunnerContext context, String id ) throws Exception
  {
  }

  public void afterRemove( RunnerContext context, String id, ExecutionResult<Long> result ) throws Exception
  {
  }

  public void beforeRemoveBulk( RunnerContext context, String whereClause ) throws Exception
  {
  }

  public void afterRemoveBulk( RunnerContext context, String whereClause,
                               ExecutionResult<Integer> result ) throws Exception
  {
  }

  public void beforeDescribe( RunnerContext context ) throws Exception
  {
  }

  public void afterDescribe( RunnerContext context, ExecutionResult<UserProperty[]> result ) throws Exception
  {
  }

  public void beforeRestorePassword( RunnerContext context, String email ) throws Exception
  {
  }

  public void afterRestorePassword( RunnerContext context, String email, ExecutionResult result ) throws Exception
  {
  }

  public void beforeLogout( RunnerContext context ) throws Exception
  {
  }

  public void afterLogout( RunnerContext context, ExecutionResult result ) throws Exception
  {
  }

  public void afterEmailConfirmed( RunnerContext context, String confirmationKey,
                                   ExecutionResult<String> result ) throws Exception
  {
  }

  public void beforeEmailConfirmed( RunnerContext context, String confirmationKey ) throws Exception
  {
  }
}


@@ -1066,16 +1066,56 @@
 nsion;%0A%0A
+import com.backendless.BackendlessUser;%0A
 import c
@@ -1362,31 +1362,8 @@
 t;%0A%0A
-import java.util.List;%0A
 impo
@@ -1405,171 +1405,36 @@
 til.
-Map;%0A%0A/**%0A * Created with IntelliJ IDEA.%0A * User: ivanlappo%0A * Date: 5/20/13%0A * Time: 12:40 PM%0A * To change this template use File %7C Settings %7C File Templates.%0A */
+List;%0Aimport java.util.Map;%0A
 %0Apub
@@ -1684,33 +1684,8 @@
 ery,
-%0A                        
  Exe
@@ -1701,16 +1701,33 @@
 ult%3CList
+%3CBackendlessUser%3E
 %3E result
@@ -1999,39 +1999,47 @@
 ExecutionResult%3C
-HashMap
+BackendlessUser
 %3E result ) throw
@@ -2250,34 +2250,8 @@
 ord,
-%0A                         
  Exe
@@ -2255,39 +2255,47 @@
 ExecutionResult%3C
-HashMap
+BackendlessUser
 %3E result ) throw
@@ -2406,41 +2406,8 @@
 ues,
-%0A                                
  Soc
@@ -2603,39 +2603,47 @@
 ExecutionResult%3C
-HashMap
+BackendlessUser
 %3E result ) throw
@@ -2838,37 +2838,8 @@
 ues,
-%0A                            
  Exe
@@ -2843,39 +2843,47 @@
 ExecutionResult%3C
-HashMap
+BackendlessUser
 %3E result ) throw
@@ -2997,44 +2997,8 @@
 ues,
-%0A                                   
  Soc
@@ -3200,39 +3200,47 @@
 ExecutionResult%3C
-HashMap
+BackendlessUser
 %3E result ) throw
@@ -3444,23 +3444,31 @@
 nResult%3C
-HashMap
+BackendlessUser
 %3E result
@@ -4189,39 +4189,8 @@
 use,
-%0A                              
  Exe
@@ -4934,43 +4934,8 @@
 Key,
-%0A                                  
  Exe
@@ -5101,9 +5101,8 @@
 %7B%0A  %7D%0A%7D%0A
-%0A

Fix generic signature for UserExtender.