public abstract class LocationFacadeClientExtended extends AbstractLocationFacadeClient
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CREATE_ACTION_CODE
The create action code.
|
CHANGE_VERB_ACTION_ADD, CHANGE_VERB_ACTION_CHANGE, CHANGE_VERB_ACTION_CREATE, CHANGE_VERB_ACTION_DELETE, CHANGE_VERB_ACTION_UPDATE
Constructor and Description |
---|
LocationFacadeClientExtended()
Creates an instance of the client to communicate with the Location facade.
|
LocationFacadeClientExtended(BusinessContextType businessContext,
javax.security.auth.callback.CallbackHandler callbackHandler)
Creates an instance of the client to communicate with the Location facade.
|
Modifier and Type | Method and Description |
---|---|
ExpressionType |
buildExpressionWithGeolocation(java.util.Map parameters)
This method creates a
SelectionCriteriaHelper object with the provided XPath expression and
access profile. |
java.util.Map |
createClientLocation(java.util.Map parameters)
Creates a client location based on the input parameters
|
java.util.List |
getPointsOfInterestByProximity(java.util.Map<java.lang.String,java.lang.String[]> parameters)
Convenience method for retrieving PointOfInterest nouns given a parameter map.
|
ShowPointOfInterestDataAreaType |
getPointsOfInterestByProximity(java.lang.String storeId,
java.lang.String poiType,
double latitude,
double longitude,
double radius,
java.lang.String dataLanguageIds,
java.lang.String accessProfile)
This method returns a list of all PointOfInterestType data objects which are associated with a given
store ID and have a give type ("poiType"), which are within a given radius of a given reference point,
expressed as (latitude,longitude) pair.
|
changeClientLocation, changePointOfInterest, getClientLocation, getClientLocation, getClientLocation, getPointOfInterest, getPointOfInterest, getPointOfInterest, processClientLocation, processPointOfInterest
createActionExpression, createChangeVerb, createGetVerb, createGetVerb, createProcessVerb, createSyncVerb
public static final java.lang.String CREATE_ACTION_CODE
public LocationFacadeClientExtended()
public LocationFacadeClientExtended(BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler callbackHandler)
businessContext
- The default business context to associate with the messages
when making requests.callbackHandler
- Used for authentication purposes so the controller can give
the authentication information to the transport when required.public ShowPointOfInterestDataAreaType getPointsOfInterestByProximity(java.lang.String storeId, java.lang.String poiType, double latitude, double longitude, double radius, java.lang.String dataLanguageIds, java.lang.String accessProfile) throws PointOfInterestException
ShowPointOfInterestDataAreaType
data object -- callers
can retrieve the matching PointOfInterestType nouns by calling the getPointOfInterest() method
to extract a list containing the matching PointOfInterestType data objects.
storeId
- Identifier of the store across which all points of interest are searched.
poiType
- Type ("poiType") of the points of interest to be returned, e.g. "store" -- if this value is null,
points of interest of any type are considered.
latitude
- The latitude of the reference point, expressed in degrees.
longitude
- The longitude of the reference point, expressed in degrees.
radius
- The radius within which PointOfInterestType nouns should be searched, expressed in meters (e.g. "within 5000 m") --
if this value is zero or less, the nearest point of interest is returned, regardless of its distance to
the reference point.
dataLanguageIds
- Comma seperated list of language IDs indicating the language(s) for which
the PointOfInterestDescriptionType children of the Description member of each returned
PointOfInterestType data object are to be populated.
accessProfile
- The access profile (e.g. "IBM_All")PointOfInterestException
- The PointOfInterestException
is thrown if error
information is found in the specified ShowPointOfInterestDataArea
--
this will represent that there was a problem when performing the operation.
public java.util.List getPointsOfInterestByProximity(java.util.Map<java.lang.String,java.lang.String[]> parameters) throws PointOfInterestException
parameters
- Map of parameters. The following parameters are valid:
PointOfInterestException
- The PointOfInterestException
is thrown if error
information is found in the specified ShowPointOfInterestDataArea
.
This will represent that there was a problem when performing the operation.public ExpressionType buildExpressionWithGeolocation(java.util.Map parameters)
SelectionCriteriaHelper
object with the provided XPath expression and
access profile. This method can be overridden to add additional control parameters to the expression.parameters
- A map contains the parameter to build the expression.
The following sample code demonstrates how to use the API:
Map parameters = new HashMap(); parameters.put("storeId", new String[] { "10101" }); parameters.put("poiType", new String[] { "Store" }); parameters.put("latitude", new String[] { "43.67300"}); parameters.put("longitude", new String[] { "-79.55400"}); parameters.put("radius", new String[] { "8000"});
ExpressionType
with the provided XPath expression and access profile.public java.util.Map createClientLocation(java.util.Map parameters) throws ClientLocationException
parameters
- The map of String [] corresponding to the input parameters. By default
there are no input parameters.clientLocationId
The following sample code demonstrates how to use the API:
Map parameters = new HashMap();
parameters.put("programId", new String[] { "test" });
parameters.put("status", new String[] { "shopping");
parameters.put("clientType", new String[] { "user" });
parameters.put("clientId", new String[] { "10001" });
parameters.put("personalizationId", new String[] { "1234567890-1" });
parameters.put("sourceType", new String[] { "RFID_sensor");
parameters.put("regionId", new String[] { "Canada" });
parameters.put("zoneId", new String[] { "Safeway.1951" });
parameters.put("latitude", new String[] { "43.67300"});
parameters.put("longitude", new String[] { "-79.55400"});
Map response = client.createClientLocation(parameters);
String[] clientLocationId = (String[]) response.get("clientLocationId");
ClientLocationException