Changes since
the last release

com.ebay.sdk.call
Class GetCategoriesCall

java.lang.Object
  extended by com.ebay.sdk.ApiCall
      extended by com.ebay.sdk.call.GetCategoriesCall

public class GetCategoriesCall
extends ApiCall

Wrapper class of the GetCategories call of eBay SOAP API.

Title: SOAP API wrapper library.

Description: Contains wrapper classes for eBay SOAP APIs.

Copyright: Copyright (c) 2009

Company: eBay Inc.


Input property: CategorySiteID - This field is used if the user wants to retrieve category data for another eBay site (other than the one specified in the X-EBAY-API-SITEID request header).

If the user wishes to retrieve category data for the US eBay Motors site, the user must set the Site ID in the X-EBAY-API-SITEID request header to 0, and then set this field's value to 100.
Input property: ParentCategories - Specifies the ID of the highest-level category to return, along with its subcategories. If no parent category is specified, all categories are returned for the specified site. (Please do not pass a value of 0; zero (0) is an invalid value for CategoryParent.) To determine available category IDs, call GetCategories with no filters and use a DetailLevel value of ReturnAll. If you specify multiple parent categories, the hierarchy for each one is returned.
Input property: LevelLimit - Specifies the maximum depth of the category hierarchy to retrieve, where the top-level categories (meta-categories) are at level 1. Retrieves all category nodes with a category level less than or equal to this value. If not specified, retrieves categories at all applicable levels. As with all calls, the actual data returned will vary depending on how you configure other fields in the request (including DetailLevel).
Input property: ViewAllNodes - This flag controls whether all eBay categories (that satisfy input filters) are returned, or only leaf categories (you can only list items in leaf categories) are returned. The default value is 'true', so if this field is omitted, all eBay categories will be returned. If you only want to retrieve leaf categories, include this flag and set it to 'false'. The actual data returned will vary depending on how you configure other fields in the request.
Output property: ReturnedCategoryArray - List of the returned categories. The category array contains one CategoryType object for each returned category. Returns empty if no detail level is specified.
Output property: ReturnedCategoryCount - Indicates the number of categories returned (i.e., the number of CategoryType objects in CategoryArray).
Output property: ReturnedCategoryUpdateTime - Indicates the last date and time that eBay modified the category hierarchy for the specified eBay site.
Output property: ReturnedCategoryVersion - Indicates the version of the category hierarchy on the specified eBay site.
Output property: ReturnedReservePriceAllowed - If true, ReservePriceAllowed indicates that all categories on the site allow the seller to specify a reserve price for an item. If false, this field is not returned in the response and all categories on the site do not normally allow sellers to specify reserve prices. The Category.ORPA (override reserve price allowed) field can override (or toggle) the reserve price allowed setting for a given category. For example, if ReservePriceAllowed is false and Category.ORPA is true, the category overrides the site setting and supports reserve prices. If ReservePriceAllowed is true and Category.ORPA is true, the category overrides the site setting and does does not support reserve prices.
Output property: MinimumReservePrice - Indicates the lowest possible reserve price allowed for any item listed in any category on the site. You can use the fields returned by GetCategoryFeatures to determine if a different Minimum Reserve Price is defined for the category you want to use.
Output property: ReturnedReduceReserveAllowed - If true, ReduceReserveAllowed indicates that all categories on the site allow the seller to reduce an item's reserve price. If false, this field is not returned in the response and all categories on the site do not normally allow sellers to reduce an item's reserve price. The Category.ORRA (override reduce reserve price) field can override (or toggle) the reserve price reduction setting for a given category. For example, if ReduceReserveAllowed is false and Category.ORRA is true, the category overrides the site setting and supports reducing reserve prices. If ReduceReserveAllowed is true and Category.ORRA is true, the category overrides the site setting and does does not support reducing reserve prices.

Version:
1.0
Author:
Ron Murphy

Field Summary
 
Fields inherited from class com.ebay.sdk.ApiCall
apiException, sendReqListeners
 
Constructor Summary
GetCategoriesCall()
          Constructor.
GetCategoriesCall(ApiContext apiContext)
          Constructor.
 
Method Summary
static int getAllCategories(ApiContext apiContext, SiteCodeType siteID, int levelLimit, DetailLevelCodeType detailLevel, int groupSize, CategoryEventListener listener)
          Call eBay API to downloads all categories in asynchronized mode to reduce consumption of system resource.
 CategoryType[] getCategories()
          Retrieves the latest eBay category hierarchy for a given eBay site.
 SiteCodeType getCategorySiteID()
          Gets the GetCategoriesRequestType.categorySiteID.
 int getLevelLimit()
          Gets the GetCategoriesRequestType.levelLimit.
 java.lang.Double getMinimumReservePrice()
          Valid after executing the API.
 java.lang.String[] getParentCategories()
          Gets the GetCategoriesRequestType.parentCategories.
 GetCategoriesResponseType getResponse()
          Gets the GetCategoriesResponseType.
 CategoryType[] getReturnedCategoryArray()
          Valid after executing the API.
 java.lang.Integer getReturnedCategoryCount()
          Valid after executing the API.
 java.util.Calendar getReturnedCategoryUpdateTime()
          Valid after executing the API.
 java.lang.String getReturnedCategoryVersion()
          Valid after executing the API.
 java.lang.Boolean getReturnedReduceReserveAllowed()
          Valid after executing the API.
 java.lang.Boolean getReturnedReservePriceAllowed()
          Valid after executing the API.
 java.lang.Boolean getViewAllNodes()
          Gets the GetCategoriesRequestType.viewAllNodes.
 void setCategorySiteID(SiteCodeType categorySiteID)
          Sets the GetCategoriesRequestType.categorySiteID.
 void setLevelLimit(int levelLimit)
          Sets the GetCategoriesRequestType.levelLimit.
 void setMinimumReservePrice(java.lang.Double minimumReservePrice)
          No longer supported - do not use.
 void setParentCategories(java.lang.String[] parentCategories)
          Sets the GetCategoriesRequestType.parentCategories.
 void setParentCategory(java.lang.String[] parentCategories)
          Backward compatible function - use setParentCategories instead.
 void setViewAllNodes(java.lang.Boolean viewAllNodes)
          Sets the GetCategoriesRequestType.viewAllNodes.
static java.lang.String stringFromSiteCodeType(SiteCodeType categorySiteID)
           
 
Methods inherited from class com.ebay.sdk.ApiCall
addDetailLevel, addSendRequestListener, execute, executeByApiName, getApiContext, getApiException, getBotBlock, getCallRetry, getDetailLevel, getEnableCompression, getEndUserIP, getErrorHandling, getInvocationID, getMessageID, getOutputSelector, getRequestXml, getResponseObject, getResponseXml, getSite, getWarningLevel, hasError, hasWarning, isEnableoAuthTokenHTTPHeader, removeSendRequestListener, setApiContext, setBotBlock, setCallRetry, setDetailLevel, setEnableCompression, setEnableoAuthTokenHTTPHeader, setEndUserIP, setErrorHandling, setInvocationID, setMessageID, setOutputSelector, setSite, setWarningLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetCategoriesCall

public GetCategoriesCall()
Constructor.


GetCategoriesCall

public GetCategoriesCall(ApiContext apiContext)
Constructor.

Parameters:
apiContext - The ApiContext object to be used to make the call.
Method Detail

getCategories

public CategoryType[] getCategories()
                             throws ApiException,
                                    SdkException,
                                    java.lang.Exception
Retrieves the latest eBay category hierarchy for a given eBay site. Information returned for each category includes the category name and the unique ID for the category (unique within the eBay site for which categories are retrieved). A category ID is a required input when you list most items.

Returns:
The CategoryType[] object.
Throws:
ApiException
SdkException
java.lang.Exception

getCategorySiteID

public SiteCodeType getCategorySiteID()
Gets the GetCategoriesRequestType.categorySiteID.

Returns:
SiteCodeType

setCategorySiteID

public void setCategorySiteID(SiteCodeType categorySiteID)
Sets the GetCategoriesRequestType.categorySiteID.

Parameters:
categorySiteID - SiteCodeType

getLevelLimit

public int getLevelLimit()
Gets the GetCategoriesRequestType.levelLimit.

Returns:
int

setLevelLimit

public void setLevelLimit(int levelLimit)
Sets the GetCategoriesRequestType.levelLimit.

Parameters:
levelLimit - int

getParentCategories

public java.lang.String[] getParentCategories()
Gets the GetCategoriesRequestType.parentCategories.

Returns:
String[]

setParentCategories

public void setParentCategories(java.lang.String[] parentCategories)
Sets the GetCategoriesRequestType.parentCategories.

Parameters:
parentCategories - String[]

getViewAllNodes

public java.lang.Boolean getViewAllNodes()
Gets the GetCategoriesRequestType.viewAllNodes.

Returns:
Boolean

setViewAllNodes

public void setViewAllNodes(java.lang.Boolean viewAllNodes)
Sets the GetCategoriesRequestType.viewAllNodes.

Parameters:
viewAllNodes - Boolean

getAllCategories

public static int getAllCategories(ApiContext apiContext,
                                   SiteCodeType siteID,
                                   int levelLimit,
                                   DetailLevelCodeType detailLevel,
                                   int groupSize,
                                   CategoryEventListener listener)
                            throws java.lang.Exception
Call eBay API to downloads all categories in asynchronized mode to reduce consumption of system resource. Usually if you use GetCategoriesCall.getCategories() to retrieve all categories it will require large amount of memory. This static method devides all categories into small groups then call GetCategories for each group.

Parameters:
apiContext - ApiContext
siteID - SiteCodeType The eBay site associated with the categories.
levelLimit - int Used to download parent categories to start from. These parent categories will be devided into groups with the size of groupSize. CatCategories API will be called for each group then all results will be cominbed together.
detailLevel - DetailLevelCodeType The detail level to use to download categories.
groupSize - int Size of parent category group.
listener - CategoryEventListener Listener to receive downloaded categories.
Returns:
int Total number of categories received.
Throws:
java.lang.Exception

getResponse

public GetCategoriesResponseType getResponse()
Gets the GetCategoriesResponseType.

Returns:
GetCategoriesResponseType

setMinimumReservePrice

public void setMinimumReservePrice(java.lang.Double minimumReservePrice)
No longer supported - do not use.


setParentCategory

public void setParentCategory(java.lang.String[] parentCategories)
Backward compatible function - use setParentCategories instead.

Parameters:
parentCategories - String[]

stringFromSiteCodeType

public static java.lang.String stringFromSiteCodeType(SiteCodeType categorySiteID)
Parameters:
strList - String[]
Returns:
ItemIDType[]

getMinimumReservePrice

public java.lang.Double getMinimumReservePrice()
Valid after executing the API. Gets the returned GetCategoriesResponseType.minimumReservePrice.

Returns:
Double

getReturnedCategoryArray

public CategoryType[] getReturnedCategoryArray()
Valid after executing the API. Gets the returned GetCategoriesResponseType.returnedCategoryArray.

Returns:
CategoryType[]

getReturnedCategoryCount

public java.lang.Integer getReturnedCategoryCount()
Valid after executing the API. Gets the returned GetCategoriesResponseType.returnedCategoryCount.

Returns:
Integer

getReturnedCategoryUpdateTime

public java.util.Calendar getReturnedCategoryUpdateTime()
Valid after executing the API. Gets the returned GetCategoriesResponseType.returnedCategoryUpdateTime.

Returns:
Calendar

getReturnedCategoryVersion

public java.lang.String getReturnedCategoryVersion()
Valid after executing the API. Gets the returned GetCategoriesResponseType.returnedCategoryVersion.

Returns:
String

getReturnedReduceReserveAllowed

public java.lang.Boolean getReturnedReduceReserveAllowed()
Valid after executing the API. Gets the returned GetCategoriesResponseType.returnedReduceReserveAllowed.

Returns:
Boolean

getReturnedReservePriceAllowed

public java.lang.Boolean getReturnedReservePriceAllowed()
Valid after executing the API. Gets the returned GetCategoriesResponseType.returnedReservePriceAllowed.

Returns:
Boolean

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.