@Path(value="store/{storeId}/inventoryavailability") @Encoded public class InventoryHandler extends AbstractResourceHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
static java.lang.String |
FORMAT_GROUP_NAME
The constant FORMAT_GROUP_NAME
|
static java.lang.String |
PARAMETER_ONLINE_STORE_ID
online store identifier
|
static java.lang.String |
PARAMETER_ONLINE_STORE_ID_DESCRIPTION
online store identifier description
|
static java.lang.String |
PARAMETER_ONLINE_STORE_NAME_DESCRIPTION
online store name description
|
static java.lang.String |
PARAMETER_ONLINE_STORE_NAME_IDENTIFIER
online store DIRECTORY
|
static java.lang.String |
PARAMETER_ORDER_ID
order identifier
|
static java.lang.String |
PARAMETER_ORDER_ID_DESCRIPTION
order identifier description
|
static java.lang.String |
PARAMETER_PARTNUMBERS |
static java.lang.String |
PARAMETER_PHYSICAL_STORE_IDENTIFIER
physical store external identifier
|
static java.lang.String |
PARAMETER_PHYSICAL_STORE_IDS
physical store identifier
|
static java.lang.String |
PARAMETER_PHYSICAL_STORE_IDS_DESCRIPTION
physical store identifier description
|
static java.lang.String |
PARAMETER_PHYSICAL_STORE_NAME_DESCRIPTION
physical store name description
|
static java.lang.String |
PARAMETER_PRODUCT_IDS
product identifier
|
static java.lang.String |
PARAMETER_PRODUCT_IDS_DESCRIPTION
product identifier description
|
static java.lang.String |
PARAMETER_PRODUCT_PARTNUMBER_DESCRIPTION |
static java.lang.String |
RESOURCE_KEY
The Constant RESOURCE_KEY.
|
static java.lang.String |
RESOURCE_MAPPING_KEY
The Constant RESOURCE_MAPPING_KEY.
|
static java.lang.String |
RESOURCE_NAME
The Constant RESOURCE_NAME.
|
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 and Description |
---|
InventoryHandler() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
createIntermediary(commonj.sdo.DataObject dataArea,
java.lang.Exception exception,
java.lang.String resourceType,
java.lang.String urlParamGrpName)
This method populated the map from the OAGIS BOD.
|
java.lang.String |
getFormattingGroupName()
Returns the formatting group name for resolving the struts action of the
formatting JSP.
|
InventoryHelper |
getHelper()
Returns the BOD helper associated with the inventory resource.
|
javax.ws.rs.core.Response |
getInventoryAvailabilityByPartNumber(java.lang.String storeId,
java.lang.String partNumbers,
java.lang.String responseFormat,
java.lang.String onlineStoreName,
java.lang.String physicalStoreName)
This method returns the inventory details for the specified product by it's identifier (PartNumber).
|
javax.ws.rs.core.Response |
getInventoryAvailabilityByProductId(java.lang.String storeId,
java.lang.String productIds,
java.lang.String responseFormat,
java.lang.String onlineStoreId,
java.lang.String physicalStoreId)
This method returns the inventory details for the specified product by it's identifier (Catalog Entry Id).
|
javax.ws.rs.core.Response |
getInventoryOverallAvailabilityByOrderId(java.lang.String storeId,
java.lang.String orderId,
java.lang.String responseFormat,
java.lang.String onlineStoreId,
java.lang.String physicalStoreId)
This method returns the inventory details for the specified order by it's identifier (Order Id).
|
java.lang.String |
getResourceName()
This method returns the name of the resource used primarily to determine
the representation of the resource.
|
java.util.Map<java.lang.String,java.lang.Object> |
mergeMapsForOverallInventoryAvailbility(java.util.Map<java.lang.String,java.lang.Object> map1,
java.util.Map<java.lang.String,java.lang.Object> map2)
Merge map1 and map2 for providers.
|
void |
postProcess(java.util.Map<java.lang.String,java.lang.Object> responseMap)
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.
|
java.util.Map<java.lang.String,java.lang.Object> |
renderInventoryAvAilability(java.lang.String productId,
java.lang.String responseFormat,
java.lang.String onlineStoreId,
java.lang.String physicalStoreId,
BusinessContextType businessContext)
This method builds the response in appropriate format.
|
java.util.Map<java.lang.String,java.lang.Object> |
renderInventoryAvAilabilityByPartNumber(java.lang.String partNumber,
java.lang.String responseFormat,
java.lang.String onlineStoreName,
java.lang.String physicalStoreName,
java.lang.String storeId,
BusinessContextType businessContext)
This method builds the response in appropriate format.
|
java.util.Map<java.lang.String,java.lang.Object> |
renderInventoryOverallAilability(java.lang.String storeId,
java.lang.String orderId,
java.lang.String responseFormat,
java.lang.String onlineStoreId,
java.lang.String physicalStoreId,
BusinessContextType businessContext)
This method builds the response in appropriate format.
|
createMapForProvider, createMapForProvider, generateResponseForEntireDataObject, getMapFromRequest, getStoreId, getUserId, isRequestInPreviewMode, mergeMapsForProvider, prepareAndValidate
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, initializeQueryRegistry, performAction, preProcess, registerOperationWithMethodSignature, runQuery, staticConvertStreamToString, throwInvalidQueryNameException, throwInvalidQueryNameException, throwRestException, throwRestExceptionIfErrorsAreDetected, validatePageNumberPageSize
public static final java.lang.String COPYRIGHT
public static final java.lang.String RESOURCE_NAME
public static final java.lang.String RESOURCE_MAPPING_KEY
public static final java.lang.String PARAMETER_ONLINE_STORE_ID
public static final java.lang.String PARAMETER_ONLINE_STORE_NAME_IDENTIFIER
public static final java.lang.String PARAMETER_PHYSICAL_STORE_IDENTIFIER
public static final java.lang.String PARAMETER_ONLINE_STORE_ID_DESCRIPTION
public static final java.lang.String PARAMETER_ONLINE_STORE_NAME_DESCRIPTION
public static final java.lang.String PARAMETER_PHYSICAL_STORE_IDS
public static final java.lang.String PARAMETER_PHYSICAL_STORE_IDS_DESCRIPTION
public static final java.lang.String PARAMETER_PHYSICAL_STORE_NAME_DESCRIPTION
public static final java.lang.String PARAMETER_PRODUCT_IDS
public static final java.lang.String PARAMETER_PARTNUMBERS
public static final java.lang.String PARAMETER_ORDER_ID
public static final java.lang.String PARAMETER_PRODUCT_IDS_DESCRIPTION
public static final java.lang.String PARAMETER_PRODUCT_PARTNUMBER_DESCRIPTION
public static final java.lang.String PARAMETER_ORDER_ID_DESCRIPTION
public static final java.lang.String RESOURCE_KEY
public static final java.lang.String FORMAT_GROUP_NAME
public java.lang.String getResourceName()
IResourceHandler
public InventoryHelper getHelper()
InventoryHelper
for customization.public java.lang.String getFormattingGroupName()
AbstractBaseResourceHandler
getFormattingGroupName
in interface IResourceHandler
getFormattingGroupName
in class AbstractBaseResourceHandler
@GET @Path(value="{productIds}") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response getInventoryAvailabilityByProductId(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="productIds") java.lang.String productIds, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="onlineStoreId") java.lang.String onlineStoreId, @QueryParam(value="physicalStoreId") java.lang.String physicalStoreId)
storeId
- the store identifier, this is mandatory parameter and cann't be null or empty.productIds
- the product identifier, this is mandatory parameter and cann't be null or empty.responseFormat
- the response format (xml, json, or atom).onlineStoreId
- the online store identifier, this is optional parameter and store identifier will be used in case this is null or empty.physicalStoreId
- the physical store identifier, this is optional parameter and store identifier will be used in case this is null or empty.@GET @Path(value="byPartNumber/{partNumbers}") @Produces(value={"application/atom+xml","application/json","application/xhtml+xml","application/xml"}) public javax.ws.rs.core.Response getInventoryAvailabilityByPartNumber(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="partNumbers") java.lang.String partNumbers, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="onlineStoreName") java.lang.String onlineStoreName, @QueryParam(value="physicalStoreName") java.lang.String physicalStoreName)
storeId
- the store identifier, this is mandatory parameter and cann't be null or empty.partNumber
- the product identifier, this is mandatory parameter and cann't be null or empty.responseFormat
- the response format (xml, json, or atom).onlineStoreName
- the online store identifier, this is mandatory parameter and cann't be null or empty.physicalStoreName
- the physical store identifier, this is optional parameter and store identifier will be used in case this is null or empty.public java.util.Map<java.lang.String,java.lang.Object> renderInventoryAvAilability(java.lang.String productId, java.lang.String responseFormat, java.lang.String onlineStoreId, java.lang.String physicalStoreId, BusinessContextType businessContext)
productId
- the product identifier, this is mandatory parameter and cann't be null or empty.responseFormat
- the response format (xml, json, or atom).onlineStoreId
- the online store identifier, this is optional parameter and store identifier will be used in case this is null or empty.physicalStoreId
- the physical store identifier, this is optional parameter and store identifier will be used in case this is null or empty.businessContext
- the business context for the user.public java.util.Map<java.lang.String,java.lang.Object> renderInventoryAvAilabilityByPartNumber(java.lang.String partNumber, java.lang.String responseFormat, java.lang.String onlineStoreName, java.lang.String physicalStoreName, java.lang.String storeId, BusinessContextType businessContext)
partNumber
- the product identifier, this is mandatory parameter and cann't be null or empty.responseFormat
- the response format (xml, json, or atom).onlineStoreName
- the online store name, this is mandatory parameter and cann't be null or empty.physicalStoreName
- the physical store name, this is optional parameter and store identifier will be used in case this is null or empty.businessContext
- the business context for the user.public void postProcess(java.util.Map<java.lang.String,java.lang.Object> responseMap)
postProcess
in interface IResourceHandler
postProcess
in class AbstractBaseResourceHandler
responseMap
- The response Map after each DataObject has been converted to a Map.public java.util.Map<java.lang.String,java.lang.Object> createIntermediary(commonj.sdo.DataObject dataArea, java.lang.Exception exception, java.lang.String resourceType, java.lang.String urlParamGrpName)
dataArea
- the data areaexception
- exceptionresourceType
- the resource typeurlParamGrpName
- the url param grp name@GET @Path(value="byOrderId/{orderId}") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response getInventoryOverallAvailabilityByOrderId(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="orderId") java.lang.String orderId, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="onlineStoreId") java.lang.String onlineStoreId, @QueryParam(value="physicalStoreId") java.lang.String physicalStoreId)
storeId
- the store identifier, this is mandatory parameter and cann't be null or empty.orderId
- the order identifier, this is mandatory parameter and cann't be null or empty.responseFormat
- the response format (xml, json, or atom).onlineStoreId
- the online store identifier, this is optional parameter and store identifier will be used in case this is null or empty.physicalStoreId
- the physical store identifier, this is optional parameter and store identifier will be used in case this is null or empty.public java.util.Map<java.lang.String,java.lang.Object> mergeMapsForOverallInventoryAvailbility(java.util.Map<java.lang.String,java.lang.Object> map1, java.util.Map<java.lang.String,java.lang.Object> map2)
map1
- first mapmap2
- second mappublic java.util.Map<java.lang.String,java.lang.Object> renderInventoryOverallAilability(java.lang.String storeId, java.lang.String orderId, java.lang.String responseFormat, java.lang.String onlineStoreId, java.lang.String physicalStoreId, BusinessContextType businessContext)
orderId
- the order identifier, this is mandatory parameter and cann't be null or empty.responseFormat
- the response format (xml, json, or atom).onlineStoreId
- the online store identifier, this is optional parameter and store identifier will be used in case this is null or empty.physicalStoreId
- the physical store identifier, this is optional parameter and store identifier will be used in case this is null or empty.businessContext
- the business context for the user.