com.ibm.commerce.rest.store.handler
Class StoreHandler
- java.lang.Object
-
- com.ibm.commerce.foundation.rest.resourcehandler.AbstractBaseResourceHandler
-
- com.ibm.commerce.foundation.rest.resourcehandler.AbstractResourceHandler
-
- com.ibm.commerce.foundation.rest.resourcehandler.AbstractClassicResourceHandler
-
- com.ibm.commerce.rest.classic.core.AbstractConfigBasedClassicHandler
-
- com.ibm.commerce.rest.store.handler.StoreHandler
-
- All Implemented Interfaces:
- DocumentedResourceHandler, IResourceHandler
@Path(value="store/{storeId}") public class StoreHandler extends AbstractConfigBasedClassicHandler
This class provides RESTful services to get resource URLs available for the store.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
CATEGORY_URL_KEY
The constant PERSON_URL_KEY.static java.lang.String
COPYRIGHT
IBM Copyright notice field.static java.lang.String
DEFAULT_ACCESS_PROFILE
Deprecated.Replaced withDEFAULT_ONLINESTORE_PROFILENAME
.static java.lang.String
DEFAULT_ONLINESTORE_PROFILENAME
The default profile name being used when a profile name is not specified using theprofileName
query parameter.static java.lang.String
DIRECTORY_KEY
The constant DIRECTORY_KEY.static java.lang.String
ESPOT_URL_TEMPLATE_KEY
The constant ESPOT_URL_TEMPLATE_KEY.static java.lang.String
FIND_BY_FINDALL_XPATH
The XPATH expression, used to retrieve the Store by findAllByUsagestatic java.lang.String
FIND_BY_FINDBYNAME_XPATH
The XPATH expression, used to retrieve the Store by findByStoreNameAndUsagestatic java.lang.String
FIND_BY_STORE_ID_XPATH
The XPATH expression, used to retrieve the OnlineStore by store ID.static java.lang.String
FORMAT_GROUP_NAME
The constant FORMAT_GROUP_NAMEstatic java.lang.String
GEONODE_URL_KEY
The constant GUEST_IDENTITY_URL_KEY.static java.lang.String
GUEST_IDENTITY_URL_KEY
The constant GUEST_IDENTITY_URL_KEY.static java.lang.String
I_REQUEST_PROPERTIES
The constant I_REQUEST_PROPERTIES which returns all stores for by range query.static java.lang.String
INVENTORY_URL_KEY
The constant GUEST_IDENTITY_URL_KEY.static java.lang.String
LOGIN_IDENTITY_URL_KEY
The constant LOGIN_IDENTITY_URL_KEY.static java.lang.String
LTPA_IDENTITY_URL_KEY
The constant LTPAIDENTITY_URL_KEY.static java.lang.String
ORDER_HISTORY_URL_KEY
The constant ORDER_HISTORY_URL_KEY.static java.lang.String
ORDER_URL_KEY
The constant ORDER_URL_KEY.static java.lang.String
PERSON_URL_KEY
The constant PERSON_URL_KEY.static java.lang.String
PRODUCTVIEW_URL_KEY
The constant PERSON_URL_KEY.static java.lang.String
RESOURCE_MAPPING_KEY
The Constant RESOURCE_MAPPING_KEY.static java.lang.String
RESOURCE_NAME
The Constant RESOURCE_NAME.static java.lang.String
RESULT_LIST
The constant RESULT_LIST.static java.lang.String
SHOPPING_CART_URL_KEY
The constant SHOPPING_CART_URL_KEY.static java.lang.String
STORE_LOCATOR_URL_KEY
The constant SHOPPING_CART_URL_KEY.static java.lang.String
TOP_CATEGORIES_URL_KEY
The constant TOP_CATEGORIES_URL_KEY.static java.lang.String
USAGE_STORE_MANAGEMENT_TOOL
The constant USAGE_STORE_MANAGEMENT_TOOL which returns all stores for by range query.static java.lang.String
WCS_CALCULATION_METHOD_ID
The constant WCS_CALCULATION_METHOD_ID.static java.lang.String
WISHLIST_URL_KEY
The constant TOP_CATEGORIES_URL_KEY.-
Fields inherited from class com.ibm.commerce.foundation.rest.resourcehandler.AbstractBaseResourceHandler
APPLICATION_ATOM_XML, APPLICATION_JSON, APPLICATION_XHTML_XML, APPLICATION_XML, CHANGE_VERB, PARAMETER_ACTION, PARAMETER_ACTION_DESCRIPTION, PARAMETER_CATALOG_ID, PARAMETER_CATALOG_ID_DESCRIPTION, PARAMETER_CURRENCY, PARAMETER_CURRENCY_DESCRIPTION, PARAMETER_FOR_USER, PARAMETER_FOR_USER_DESCRIPTION, PARAMETER_FOR_USER_ID, PARAMETER_FOR_USER_ID_DESCRIPTION, PARAMETER_LANG_ID, PARAMETER_LANG_ID_DESCRIPTION, PARAMETER_LOCALE, PARAMETER_LOCALE_DESCRIPTION, PARAMETER_MODE, PARAMETER_MODE_DESCRIPTION, PARAMETER_PAGE_NUMBER, PARAMETER_PAGE_NUMBER_DESCRIPTION, PARAMETER_PAGE_SIZE, PARAMETER_PAGE_SIZE_DESCRIPTION, PARAMETER_PROFILE_NAME, PARAMETER_PROFILE_NAME_DESCRIPTION, PARAMETER_QUERY, PARAMETER_QUERY_DESCRIPTION, PARAMETER_RESET_PASSWORD_DESCRIPTION, PARAMETER_RESPONSE_FORMAT, PARAMETER_RESPONSE_FORMAT_DESCRIPTION, PARAMETER_STORE_ID, PARAMETER_STORE_ID_DESCRIPTION, PARAMETER_WORKSPACE_IDENTIFIER, PARAMETER_WORKSPACE_IDENTIFIER_DESCRIPTION, PARAMETER_WORKSPACE_NAME, PARAMETER_WORKSPACE_NAME_DESCRIPTION, PARAMETER_WORKSPACE_TASK, PARAMETER_WORKSPACE_TASK_DESCRIPTION, PARAMETER_WORKSPACE_TASKGROUP, PARAMETER_WORKSPACE_TASKGROUP_DESCRIPTION, PROCESS_VERB, RESPONSE_200_DESCRIPTION, RESPONSE_201_DESCRIPTION, RESPONSE_204_DESCRIPTION, RESPONSE_400_DESCRIPTION, RESPONSE_401_DESCRIPTION, RESPONSE_403_DESCRIPTION, RESPONSE_404_DESCRIPTION, RESPONSE_500_DESCRIPTION
-
-
Constructor Summary
Constructors Constructor and Description StoreHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description javax.ws.rs.core.Response
fetchStore(java.lang.String storeId, java.lang.String responseFormat)
Fetch store.javax.ws.rs.core.Response
findAllByUsage(java.lang.String storeId)
This method returns the store details by specified store name and usagejavax.ws.rs.core.Response
findByQuery(java.lang.String storeId, java.lang.String queryName)
Finds stores by a query.javax.ws.rs.core.Response
findByQueryOnlineStore(java.lang.String storeId, java.lang.String queryName)
Finds online store details by a query.javax.ws.rs.core.Response
findByQueryTaxInformation(java.lang.String storeId, java.lang.String queryName)
Finds tax information for a store by a query.javax.ws.rs.core.Response
findByStoreNameAndUsage(java.lang.String storeId)
This method returns the store details by specified store name and usagejavax.ws.rs.core.Response
findDataBean(java.lang.String storeId)
Executes theStoreDataBean
based on the REST input and configuration mapping profile.javax.ws.rs.core.Response
findOnlineStore(java.lang.String storeId)
This method returns the store details by specified store ID.javax.ws.rs.core.Response
findOnlineStoresByRange(java.lang.String storeId)
This method returns the store details of all stores with store IDs within a range of two numbers.java.lang.String
getFormattingGroupName()
(non-Javadoc)javax.ws.rs.core.Response
getRemoteConfig(java.lang.String storeId, java.lang.String responseFormat)
Fetch remote store config.java.lang.String
getResourceName()
(non-Javadoc)javax.ws.rs.core.Response
getSalesTaxCalculationRule(java.lang.String storeId)
This method returns the sales tax calculation rule information for the store.javax.ws.rs.core.Response
getStoreAsset(java.lang.String storeId)
This method returns the asset at the specified path (relative or full) from the Watson Content Hub.void
initializeQueryRegistry(OperationRegistry registry)
Initializes the registry mapping between the query names and the methods being called to handle requests.-
Methods inherited from class com.ibm.commerce.rest.classic.core.AbstractConfigBasedClassicHandler
executeConfigBasedBean, executeConfigBasedBean, executeConfigBasedBeanWithContext, executeConfigBasedBeanWithContext, executeConfigBasedCommand, executeConfigBasedCommandWithContext
-
Methods inherited from class com.ibm.commerce.foundation.rest.resourcehandler.AbstractResourceHandler
createMapForProvider, createMapForProvider, generateResponseForEntireDataObject, getMapFromRequest, getStoreId, getUserId, isRequestInPreviewMode, mergeMapsForProvider, prepareAndValidate
-
Methods inherited from class com.ibm.commerce.foundation.rest.resourcehandler.AbstractBaseResourceHandler
addError, createMapForProviderWithResultData, documentApi, generateResponseFromHttpStatusCodeAndRespData, getActionRegistry, getBooleanParameterValue, getClassDescription, getDoubleParameterValue, getDoubleParameterValues, getEnumeratedParameterValue, getErrorCodeFromMessage, getExternalResourceName, getFormattedMessage, getFormattedMessageWithLocale, getInstrumentor, getIntegerParameterValue, getIntegerParameterValues, getLongParameterValue, getLongParameterValues, getParameterValue, getParameterValue, getParameterValues, getQueryRegistry, getRequest, getResponse, getUriInfo, handleException, initializeActionRegistry, performAction, postProcess, preProcess, registerOperationWithMethodSignature, runQuery, staticConvertStreamToString, throwInvalidQueryNameException, throwInvalidQueryNameException, throwRestException, throwRestExceptionIfErrorsAreDetected, validatePageNumberPageSize
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
IBM Copyright notice field.- See Also:
- Constant Field Values
-
FIND_BY_STORE_ID_XPATH
public static final java.lang.String FIND_BY_STORE_ID_XPATH
The XPATH expression, used to retrieve the OnlineStore by store ID.- See Also:
- Constant Field Values
-
FIND_BY_FINDALL_XPATH
public static final java.lang.String FIND_BY_FINDALL_XPATH
The XPATH expression, used to retrieve the Store by findAllByUsage- See Also:
- Constant Field Values
-
FIND_BY_FINDBYNAME_XPATH
public static final java.lang.String FIND_BY_FINDBYNAME_XPATH
The XPATH expression, used to retrieve the Store by findByStoreNameAndUsage- See Also:
- Constant Field Values
-
RESOURCE_NAME
public static final java.lang.String RESOURCE_NAME
The Constant RESOURCE_NAME.- See Also:
- Constant Field Values
-
RESOURCE_MAPPING_KEY
public static final java.lang.String RESOURCE_MAPPING_KEY
The Constant RESOURCE_MAPPING_KEY.- See Also:
- Constant Field Values
-
FORMAT_GROUP_NAME
public static final java.lang.String FORMAT_GROUP_NAME
The constant FORMAT_GROUP_NAME- See Also:
- Constant Field Values
-
DIRECTORY_KEY
public static final java.lang.String DIRECTORY_KEY
The constant DIRECTORY_KEY.- See Also:
- Constant Field Values
-
CATEGORY_URL_KEY
public static final java.lang.String CATEGORY_URL_KEY
The constant PERSON_URL_KEY.- See Also:
- Constant Field Values
-
ESPOT_URL_TEMPLATE_KEY
public static final java.lang.String ESPOT_URL_TEMPLATE_KEY
The constant ESPOT_URL_TEMPLATE_KEY.- See Also:
- Constant Field Values
-
LOGIN_IDENTITY_URL_KEY
public static final java.lang.String LOGIN_IDENTITY_URL_KEY
The constant LOGIN_IDENTITY_URL_KEY.- See Also:
- Constant Field Values
-
LTPA_IDENTITY_URL_KEY
public static final java.lang.String LTPA_IDENTITY_URL_KEY
The constant LTPAIDENTITY_URL_KEY.- See Also:
- Constant Field Values
-
GUEST_IDENTITY_URL_KEY
public static final java.lang.String GUEST_IDENTITY_URL_KEY
The constant GUEST_IDENTITY_URL_KEY.- See Also:
- Constant Field Values
-
GEONODE_URL_KEY
public static final java.lang.String GEONODE_URL_KEY
The constant GUEST_IDENTITY_URL_KEY.- See Also:
- Constant Field Values
-
INVENTORY_URL_KEY
public static final java.lang.String INVENTORY_URL_KEY
The constant GUEST_IDENTITY_URL_KEY.- See Also:
- Constant Field Values
-
ORDER_HISTORY_URL_KEY
public static final java.lang.String ORDER_HISTORY_URL_KEY
The constant ORDER_HISTORY_URL_KEY.- See Also:
- Constant Field Values
-
ORDER_URL_KEY
public static final java.lang.String ORDER_URL_KEY
The constant ORDER_URL_KEY.- See Also:
- Constant Field Values
-
PERSON_URL_KEY
public static final java.lang.String PERSON_URL_KEY
The constant PERSON_URL_KEY.- See Also:
- Constant Field Values
-
PRODUCTVIEW_URL_KEY
public static final java.lang.String PRODUCTVIEW_URL_KEY
The constant PERSON_URL_KEY.- See Also:
- Constant Field Values
-
SHOPPING_CART_URL_KEY
public static final java.lang.String SHOPPING_CART_URL_KEY
The constant SHOPPING_CART_URL_KEY.- See Also:
- Constant Field Values
-
STORE_LOCATOR_URL_KEY
public static final java.lang.String STORE_LOCATOR_URL_KEY
The constant SHOPPING_CART_URL_KEY.- See Also:
- Constant Field Values
-
TOP_CATEGORIES_URL_KEY
public static final java.lang.String TOP_CATEGORIES_URL_KEY
The constant TOP_CATEGORIES_URL_KEY.- See Also:
- Constant Field Values
-
WISHLIST_URL_KEY
public static final java.lang.String WISHLIST_URL_KEY
The constant TOP_CATEGORIES_URL_KEY.- See Also:
- Constant Field Values
-
USAGE_STORE_MANAGEMENT_TOOL
public static final java.lang.String USAGE_STORE_MANAGEMENT_TOOL
The constant USAGE_STORE_MANAGEMENT_TOOL which returns all stores for by range query.- See Also:
- Constant Field Values
-
I_REQUEST_PROPERTIES
public static final java.lang.String I_REQUEST_PROPERTIES
The constant I_REQUEST_PROPERTIES which returns all stores for by range query.- See Also:
- Constant Field Values
-
RESULT_LIST
public static final java.lang.String RESULT_LIST
The constant RESULT_LIST.- See Also:
- Constant Field Values
-
WCS_CALCULATION_METHOD_ID
public static final java.lang.String WCS_CALCULATION_METHOD_ID
The constant WCS_CALCULATION_METHOD_ID.- See Also:
- Constant Field Values
-
DEFAULT_ACCESS_PROFILE
public static final java.lang.String DEFAULT_ACCESS_PROFILE
Deprecated. Replaced withDEFAULT_ONLINESTORE_PROFILENAME
.The default access profile, used when an access profile is not specified using theaccessProfile
query parameter.- See Also:
- Constant Field Values
-
DEFAULT_ONLINESTORE_PROFILENAME
public static final java.lang.String DEFAULT_ONLINESTORE_PROFILENAME
The default profile name being used when a profile name is not specified using theprofileName
query parameter.- See Also:
- Constant Field Values
-
-
Method Detail
-
initializeQueryRegistry
public void initializeQueryRegistry(OperationRegistry registry)
Initializes the registry mapping between the query names and the methods being called to handle requests.- Overrides:
initializeQueryRegistry
in classAbstractBaseResourceHandler
- Parameters:
registry
- The operation registry object.
-
getResourceName
public java.lang.String getResourceName()
(non-Javadoc)- Returns:
- the resource name
- See Also:
IResourceHandler.getResourceName()
-
getFormattingGroupName
public java.lang.String getFormattingGroupName()
(non-Javadoc)- Specified by:
getFormattingGroupName
in interfaceIResourceHandler
- Overrides:
getFormattingGroupName
in classAbstractBaseResourceHandler
- Returns:
- the formatting group name.
- See Also:
AbstractBaseResourceHandler.getFormattingGroupName()
-
getStoreAsset
@GET @Path(value="storeAsset") @Produces(value="*/*") public javax.ws.rs.core.Response getStoreAsset(@PathParam(value="storeId") java.lang.String storeId)
This method returns the asset at the specified path (relative or full) from the Watson Content Hub.- Parameters:
storeId
- The store identifier.- Returns:
- The response.
-
findDataBean
@GET @Path(value="databean") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response findDataBean(@PathParam(value="storeId") java.lang.String storeId)
Executes theStoreDataBean
based on the REST input and configuration mapping profile.- Parameters:
storeId
- The store ID.- Returns:
- the response with the store related data.
-
findOnlineStoresByRange
@Path(value="online_store") public javax.ws.rs.core.Response findOnlineStoresByRange(@PathParam(value="storeId") java.lang.String storeId)
This method returns the store details of all stores with store IDs within a range of two numbers.- Parameters:
storeId
- The store identifier.- Returns:
- The stores details.
-
getSalesTaxCalculationRule
@Path(value="taxInformation") public javax.ws.rs.core.Response getSalesTaxCalculationRule(@PathParam(value="storeId") java.lang.String storeId)
This method returns the sales tax calculation rule information for the store.- Parameters:
storeId
- The store identifier.- Returns:
- The response.
-
findOnlineStore
@Path(value="online_store") public javax.ws.rs.core.Response findOnlineStore(@PathParam(value="storeId") java.lang.String storeId)
This method returns the store details by specified store ID.- Parameters:
storeId
- The store identifier.- Returns:
- The store details.
-
fetchStore
@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response fetchStore(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
Fetch store.- Parameters:
storeId
- the store idresponseFormat
- the response format- Returns:
- the response
-
findByQuery
@GET @Path(value="adminLookup") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response findByQuery(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="q") java.lang.String queryName)
Finds stores by a query. See each query for details on input and output.- Parameters:
storeId
- The store ID.queryName
- The query name.- Returns:
- The response.
-
findByQueryTaxInformation
@GET @Path(value="taxInformation") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response findByQueryTaxInformation(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="q") java.lang.String queryName)
Finds tax information for a store by a query. See each query for details on input and output.- Parameters:
storeId
- The store ID.queryName
- The query name.- Returns:
- The response.
-
findByQueryOnlineStore
@GET @Path(value="online_store") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response findByQueryOnlineStore(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="q") java.lang.String queryName)
Finds online store details by a query. See each query for details on input and output.- Parameters:
storeId
- The store ID.queryName
- The query name.- Returns:
- The response.
-
findAllByUsage
@Path(value="adminLookup") public javax.ws.rs.core.Response findAllByUsage(@PathParam(value="storeId") java.lang.String storeId)
This method returns the store details by specified store name and usage- Parameters:
storeId
- The store identifier.- Returns:
- The array of configuration details in the specified format.
-
findByStoreNameAndUsage
@Path(value="adminLookup") public javax.ws.rs.core.Response findByStoreNameAndUsage(@PathParam(value="storeId") java.lang.String storeId)
This method returns the store details by specified store name and usage- Parameters:
storeId
- The store identifier- Returns:
- the response for the
OnlineStore
. *
-
getRemoteConfig
@GET @Path(value="remoteConfig") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response getRemoteConfig(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
Fetch remote store config.- Parameters:
storeId
- the store idresponseFormat
- the response format- Returns:
- the response
-
-