Changes since
the last release

com.ebay.sdk
Class ApiCredential

java.lang.Object
  extended by com.ebay.sdk.ApiCredential

public class ApiCredential
extends java.lang.Object

Defines credentials to be used for making eBay API call. Set either eBay token (seteBayToken()) or ApiAccount plus eBayAccount since they are exclusive to each other.

Title:

Description:

Copyright: Copyright (c) 2004

Company: eBay Inc.

Version:
1.0
Author:
Weijun Li

Field Summary
protected  javax.swing.event.EventListenerList listenerList
           
 
Constructor Summary
ApiCredential()
          Constructor.
 
Method Summary
 void addTokenEventListener(TokenEventListener l)
          Add listener for token renewal event.
 void fireRenewTokenEvent(java.lang.String newToken)
          Called by ApiCall class when a new token is returned through the response of API call.
 void fireWarnTokenHardExpiration(java.util.Date expDate)
          Called by ApiCall class when a token-hard-expiration-warning was received.
 ApiAccount getApiAccount()
          Get the ApiAccount to use.
 eBayAccount geteBayAccount()
          Get the eBay auction account to use.
 java.lang.String geteBayToken()
          Get the eBay token string.
 java.lang.String getOAuthToken()
          Get the eBay OAuthToken string.
 void removeTokenEventListener(TokenEventListener l)
          Remove listener for token renewal event.
 void setApiAccount(ApiAccount apiAccount)
          Set the ApiAccount to use.
 void seteBayAccount(eBayAccount ebayAccount)
          Set the eBay auction account to use.
 void seteBayToken(java.lang.String eBayToken)
          Set the eBay token string.
 void setOAuthToken(java.lang.String oAuthToken)
          Set the eBay OAuthToken string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listenerList

protected javax.swing.event.EventListenerList listenerList
Constructor Detail

ApiCredential

public ApiCredential()
Constructor.

Method Detail

addTokenEventListener

public void addTokenEventListener(TokenEventListener l)
Add listener for token renewal event.

Parameters:
l - TokenEventListener

removeTokenEventListener

public void removeTokenEventListener(TokenEventListener l)
Remove listener for token renewal event.

Parameters:
l - TokenEventListener

fireRenewTokenEvent

public void fireRenewTokenEvent(java.lang.String newToken)
Called by ApiCall class when a new token is returned through the response of API call.

Parameters:
newToken - String

fireWarnTokenHardExpiration

public void fireWarnTokenHardExpiration(java.util.Date expDate)
Called by ApiCall class when a token-hard-expiration-warning was received.

Parameters:
expDate - Date

getApiAccount

public ApiAccount getApiAccount()
Get the ApiAccount to use.

Returns:
the ApiAccount instance.

setApiAccount

public void setApiAccount(ApiAccount apiAccount)
Set the ApiAccount to use. If you set eBay token string, the ApiAccount and eBayAccount properties will be ignored.

Parameters:
apiAccount - the ApiAccount instance to be set to.

geteBayAccount

public eBayAccount geteBayAccount()
Get the eBay auction account to use.

Returns:
the eBayAccount instance.

seteBayAccount

public void seteBayAccount(eBayAccount ebayAccount)
Set the eBay auction account to use. If you set eBay token string, the ApiAccount and eBayAccount properties will be ignored.

Parameters:
ebayAccount - the eBayAccount to be set to.

geteBayToken

public java.lang.String geteBayToken()
Get the eBay token string.

Returns:
The eBay token string.

seteBayToken

public void seteBayToken(java.lang.String eBayToken)
Set the eBay token string. If you set eBay token string, the OAuthToken, ApiAccount and eBayAccount properties will be ignored.

Parameters:
eBayToken - The eBay token string to be set to.

getOAuthToken

public java.lang.String getOAuthToken()
Get the eBay OAuthToken string.

Returns:
The eBay OAuthToken string.

setOAuthToken

public void setOAuthToken(java.lang.String oAuthToken)
Set the eBay OAuthToken string. If eBay OAuthToken string is set, the ApiAccount and eBayAccount properties will be ignored.

Parameters:
oAuthToken - The eBay token string to be set to.

Changes since
the last release

The information contained in this document is proprietary and confidential. Use of this information and the eBay API requires a Non-Disclosure Agreement (NDA) between the user and eBay Inc. For information regarding a qualifying NDA, contact Developer Relations: developer-relations@ebay.com
© 2004-2009 eBay Inc. All rights reserved.