@Encoded public class CategoryViewHandler extends AbstractResourceHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String | BY_ID
The Constant BY_ID.
|
static java.lang.String | CATEGORIES_BY_ID
The Constant CATEGORIES_BY_ID.
|
static java.lang.String | CATEGORIES_BY_IDENTIFIER
The Constant CATEGORIES_BY_IDENTIFIER.
|
static java.lang.String | CATEGORIES_BY_PARENT_CATEGORY
The Constant CATEGORIES_BY_PARENT_CATEGORY.
|
static java.lang.String | COPYRIGHT
IBM Copyright notice field.
|
protected SearchHelper | helper
Helper to retrieve and deal with BOD.
|
static java.lang.String | RESOURCE_MAPPING_KEY_DETAILS
The Constant RESOURCE_MAPPING_KEY_DETAILS.
|
static java.lang.String | RESOURCE_MAPPING_KEY_SUMMARY
The Constant RESOURCE_MAPPING_KEY_SUMMARY.
|
static java.lang.String | RESOURCE_NAME
The Constant RESOURCE_NAME.
|
static java.lang.String | TOP_CATEGORIES
The Constant TOP_CATEGORIES.
|
Constructor and Description |
---|
CategoryViewHandler() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response | findCategoryByIdentifier(java.lang.String storeId, java.lang.String categoryIdentifier, java.lang.String responseFormat)
This method retrieves the category based on identifier.
|
javax.ws.rs.core.Response | findCategoryByUniqueId(java.lang.String storeId, java.lang.String categoryId, java.lang.String responseFormat)
This method retrieves the category based on unique ID.
|
javax.ws.rs.core.Response | findSubCategories(java.lang.String storeId, java.lang.String parentCategoryId, int pageNumber, int pageSize, java.lang.String responseFormat)
This method retrieves the sub-categories for a given parent category.
|
javax.ws.rs.core.Response | findTopCategories(java.lang.String storeId, java.lang.String responseFormat)
This method retrieves the top categories of the catalog.
|
protected javax.ws.rs.core.Response | generateResponse(com.ibm.commerce.catalog.facade.datatypes.ShowCatalogNavigationViewDataAreaType dataArea, java.lang.String urlParamGroupName, java.lang.String responseFormat)
Generates REST response from a given data object and its corresponding URL parameter group name from the BOD to URL mapping configuration.
|
java.lang.String | getExternalResourceName()
Get the resource name to show externally.
|
java.lang.String | getFormattingGroupName()
Returns the formatting group name for resolving the struts action of the formatting JSP.
|
SearchHelper | getHelper()
Return the BOD helper associated with the catalog resource.
|
java.lang.String | getResourceName()
This method returns the name of the resource used primarily to determine the representation of the resource.
|
void | postProcess(java.util.Map<java.lang.String,java.lang.Object> dataMap)
Method to provide post process in out of box JSON/XML entity providers after each DataObject has been converted to a Map and before constructing the REST response.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String RESOURCE_NAME
public static final java.lang.String RESOURCE_MAPPING_KEY_SUMMARY
public static final java.lang.String RESOURCE_MAPPING_KEY_DETAILS
public static final java.lang.String CATEGORIES_BY_ID
public static final java.lang.String CATEGORIES_BY_IDENTIFIER
public static final java.lang.String TOP_CATEGORIES
public static final java.lang.String CATEGORIES_BY_PARENT_CATEGORY
public static final java.lang.String BY_ID
protected SearchHelper helper
public java.lang.String getResourceName()
public SearchHelper getHelper()
public java.lang.String getFormattingGroupName()
public javax.ws.rs.core.Response findCategoryByUniqueId(java.lang.String storeId, java.lang.String categoryId, java.lang.String responseFormat)
public javax.ws.rs.core.Response findCategoryByIdentifier(java.lang.String storeId, java.lang.String categoryIdentifier, java.lang.String responseFormat)
public javax.ws.rs.core.Response findTopCategories(java.lang.String storeId, java.lang.String responseFormat)
public javax.ws.rs.core.Response findSubCategories(java.lang.String storeId, java.lang.String parentCategoryId, int pageNumber, int pageSize, java.lang.String responseFormat)
protected javax.ws.rs.core.Response generateResponse(com.ibm.commerce.catalog.facade.datatypes.ShowCatalogNavigationViewDataAreaType dataArea, java.lang.String urlParamGroupName, java.lang.String responseFormat)
This method calls createMapForProvider to create the response data map. The response status code is resolved based on the input parameters.
public void postProcess(java.util.Map<java.lang.String,java.lang.Object> dataMap)
public java.lang.String getExternalResourceName()