org.alfresco.bm.user
Class PickUserCallback

java.lang.Object
  extended by org.alfresco.bm.user.PickUserCallback
All Implemented Interfaces:
AuthenticatedHttpEventProcessor.HttpRequestCallback<String>

public class PickUserCallback
extends Object
implements AuthenticatedHttpEventProcessor.HttpRequestCallback<String>

Callback that extracts the nodeRef from the picked user. Throws an exception when no user can be extracted from the response.

Author:
Frederik Heremans

Constructor Summary
PickUserCallback(String userName)
           
 
Method Summary
 String onCallSuccess(org.apache.commons.httpclient.HttpMethod method)
          Called when call was successful.
 boolean onError(org.apache.commons.httpclient.HttpMethod method, Throwable t)
          Called when an error occurs when sending the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PickUserCallback

public PickUserCallback(String userName)
Method Detail

onCallSuccess

public String onCallSuccess(org.apache.commons.httpclient.HttpMethod method)
Description copied from interface: AuthenticatedHttpEventProcessor.HttpRequestCallback
Called when call was successful.

Specified by:
onCallSuccess in interface AuthenticatedHttpEventProcessor.HttpRequestCallback<String>
Parameters:
method - the method executed which can be used to extract response from.
Returns:
any result extracted from the response body.

onError

public boolean onError(org.apache.commons.httpclient.HttpMethod method,
                       Throwable t)
Description copied from interface: AuthenticatedHttpEventProcessor.HttpRequestCallback
Called when an error occurs when sending the request.

Specified by:
onError in interface AuthenticatedHttpEventProcessor.HttpRequestCallback<String>
Parameters:
method - the method executed
t - optional exception that caused the error
Returns:
true, if error is handled. False, if an exception should be thrown.


Copyright © 2012. All Rights Reserved.