com.ibm.commerce.rest.store.handler
Class GeoNodeHandler
- java.lang.Object
-
- com.ibm.commerce.foundation.rest.resourcehandler.AbstractBaseResourceHandler
-
- com.ibm.commerce.foundation.rest.resourcehandler.AbstractResourceHandler
-
- com.ibm.commerce.rest.store.handler.GeoNodeHandler
-
- All Implemented Interfaces:
- DocumentedResourceHandler, IResourceHandler
@Path(value="store/{storeId}/geonode") @Encoded public class GeoNodeHandler extends AbstractResourceHandler
This class provides RESTful services to get geo node details.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
ACCESS_PROFILE_DETAILS_INFORMATION
The Constant ACCESS_PROFILE_DETAILS_INFORMATION.static java.lang.String
COPYRIGHT
IBM Copyright notice field.static java.lang.String
FORMAT_GROUP_NAME
The constant FORMAT_GROUP_NAMEstatic java.lang.String
GEO_TOP_RESOURCE_MAPPING_KEY
The Constant GEO_TOP_RESOURCE_MAPPING_KEY.static java.lang.String
PARAMETER_PARENT_GEO_ID
parent Geo Node identifierstatic java.lang.String
PARAMETER_PARENT_GEO_ID_DESCRIPTION
parent Geo Node identifier descriptionstatic java.lang.String
PARAMETER_SITE_LEVEL_SEARCH
site level search flagstatic java.lang.String
PARAMETER_SITE_LEVEL_SEARCH_DESCRIPTION
site level search flag descriptionstatic java.lang.String
RESOURCE_NAME
The Constant RESOURCE_NAME.-
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 GeoNodeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description javax.ws.rs.core.Response
findByQuery(java.lang.String storeId, java.lang.String queryName)
Find geo nodes based on query name.javax.ws.rs.core.Response
findGeoByParentGeoId(java.lang.String storeId, java.lang.String parentgeoid, java.lang.String responseFormat)
This method retrieves geo nodes by parent geo node unique ID.javax.ws.rs.core.Response
findGeoByTypeAndName(java.lang.String storeId)
Find geo nodes that match the type and the name.javax.ws.rs.core.Response
findTopGeoNodes(java.lang.String storeId, java.lang.String responseFormat)
Deprecated.Adding query parameter "siteLevelSearch"javax.ws.rs.core.Response
findTopGeoNodes(java.lang.String storeId, java.lang.String responseFormat, java.lang.String siteLevelSearch)
This method retrieves top geo nodes details.java.lang.String
getFormattingGroupName()
Returns the formatting group name for resolving the struts action of the formatting JSP.GeoNodeHelper
getHelper()
Return the BOD helper associated with the geo node resource.java.lang.String
getResourceName()
This method returns the name of the resource used primarily to determine the representation of the resource.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.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
-
ACCESS_PROFILE_DETAILS_INFORMATION
public static final java.lang.String ACCESS_PROFILE_DETAILS_INFORMATION
The Constant ACCESS_PROFILE_DETAILS_INFORMATION.- See Also:
- Constant Field Values
-
RESOURCE_NAME
public static final java.lang.String RESOURCE_NAME
The Constant RESOURCE_NAME.- See Also:
- Constant Field Values
-
GEO_TOP_RESOURCE_MAPPING_KEY
public static final java.lang.String GEO_TOP_RESOURCE_MAPPING_KEY
The Constant GEO_TOP_RESOURCE_MAPPING_KEY.- See Also:
- Constant Field Values
-
PARAMETER_SITE_LEVEL_SEARCH
public static final java.lang.String PARAMETER_SITE_LEVEL_SEARCH
site level search flag- See Also:
- Constant Field Values
-
PARAMETER_SITE_LEVEL_SEARCH_DESCRIPTION
public static final java.lang.String PARAMETER_SITE_LEVEL_SEARCH_DESCRIPTION
site level search flag description- See Also:
- Constant Field Values
-
PARAMETER_PARENT_GEO_ID
public static final java.lang.String PARAMETER_PARENT_GEO_ID
parent Geo Node identifier- See Also:
- Constant Field Values
-
PARAMETER_PARENT_GEO_ID_DESCRIPTION
public static final java.lang.String PARAMETER_PARENT_GEO_ID_DESCRIPTION
parent Geo Node identifier description- 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
-
-
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()
Description copied from interface:IResourceHandler
This method returns the name of the resource used primarily to determine the representation of the resource. This class can be overridden to change the name of the resource and therefore the representation, while keeping all the methods in this class.- Returns:
- the resource name
-
getFormattingGroupName
public java.lang.String getFormattingGroupName()
Description copied from class:AbstractBaseResourceHandler
Returns the formatting group name for resolving the struts action of the formatting JSP. Overwrite this method in your resource handler class to return a formatting group name specific to your resource handler.- Specified by:
getFormattingGroupName
in interfaceIResourceHandler
- Overrides:
getFormattingGroupName
in classAbstractBaseResourceHandler
- Returns:
- the formatting group name.
-
getHelper
public GeoNodeHelper getHelper()
Return the BOD helper associated with the geo node resource.- Returns:
- GeoNodeHelper
-
findTopGeoNodes
@GET @Path(value="byTopGeoNode") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response findTopGeoNodes(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="siteLevelSearch") java.lang.String siteLevelSearch)
This method retrieves top geo nodes details.- Parameters:
storeId
- the store idresponseFormat
- the response formatsiteLevelSearch
- The site level search flag. If it is presented and is set to 'true', a site level search will be performed; otherwise, a store level search will be performed. Optional parameter; when it is not set, it is defaulted to 'true'.- Returns:
- Response
-
findTopGeoNodes
@GET @Path(value="byTopGeoNode") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response findTopGeoNodes(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
Deprecated. Adding query parameter "siteLevelSearch"This method retrieves top geo nodes details for the site.- Parameters:
storeId
- the store idresponseFormat
- the response format- Returns:
- Response
-
findGeoByParentGeoId
@GET @Path(value="byParentGeoNode/{parentgeoid}") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response findGeoByParentGeoId(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="parentgeoid") java.lang.String parentgeoid, @QueryParam(value="responseFormat") java.lang.String responseFormat)
This method retrieves geo nodes by parent geo node unique ID.- Parameters:
storeId
- the store idparentgeoid
- the parentgeoidresponseFormat
- the response format- Returns:
- Response
-
findGeoByTypeAndName
public javax.ws.rs.core.Response findGeoByTypeAndName(@PathParam(value="storeId") java.lang.String storeId)
Find geo nodes that match the type and the name.- Parameters:
storeId
- The store ID.- Returns:
- The response.
-
findByQuery
@GET @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)
Find geo nodes based on query name. Supported query name is byGeoNodeTypeAndName.- Parameters:
storeId
- The store ID.queryName
- The query name.- Returns:
- The response.
-
-