com.ibm.rfid.premises.app.access
Class SensorEventsAPIAccess

java.lang.Object
  extended by com.ibm.rfid.premises.app.access.SensorEventsAPIAccess
Direct Known Subclasses:
SensorEventsAPIAccessLocal, SensorEventsAPIAccessRemote

public abstract class SensorEventsAPIAccess
extends java.lang.Object

A SensorEventsAPIAccessAccess is an abstract class used to query for device information and send commands to devices.

Use the method SensorEventsAPIAccessContext#getPremisesAccess() to retrieve a SensorEventsAPIAccessAccess object.

See Also:
SensorEventsAPIAccessRemote, SensorEventsAPIAccessLocal, SensorEventsAPIAccessContext

Constructor Summary
SensorEventsAPIAccess()
           
 
Method Summary
 void clearALEData(java.lang.String location)
          clears the ALE Data for a given location
 java.util.Map<java.lang.String,java.lang.String> decodeEPCValue(java.lang.String epcVal)
          Decodes given EPC Hex value and retrun map for all the decoded values.
 void deleteControllerMetaData(java.lang.String controllerid, java.lang.String keyname)
          Deletes the metadata key and value for the given Controller object
 void deleteLocationMetaData(java.lang.String locationid, java.lang.String keyname)
          Deletes the metadata key and value for the given Location object
 ECReports[] getALEData(java.lang.String location)
          gets the ECReports for a given location/reader
 java.lang.String[] getAllChildLocation(java.lang.String locationid)
          Get all the child location id's for given location id Location id's will be in ascending order for example we have location topology - STORE 1 -> L99 -> L100 -> L101 -> L102 and get we try to child locations for L99 following will be array layout returned by API Array[0]L100 Array[1]L101 Array[2]L102 Array[3]L103
 Controller[] getAllController()
          Gets all Controller objects defined in the WebSphere Sensor Events
 Device[] getAllDevices()
          Gets all Device objects defined in the WebSphere Sensor Events
 Device[] getAllDevicesByCategoryName(java.lang.String category)
          Gets all Device objects defined in the WebSphere Sensor Events for given Device Category
 Location[] getAllLocation()
          Gets all Location objects defined in the WebSphere Sensor Events
 java.lang.String[] getAllParentLocation(java.lang.String locationid)
          Get all the parent location id's for given location id Location id's will be in descending order for example we have location topology - STORE 1 -> L99 -> L100 -> L101 -> L102 and get we try to parent locations for L102 following will be array layout returned by API Array[0]L101 Array[1]L100 Array[2]L99 Array[3]STORE 1
 PassiveRFIDReader[] getAllPassiveRFIDReader()
          Gets all PassiveRFIDReader objects defined in the WebSphere Sensor Events
 Printer[] getAllPrinters()
          Gets all printers defined in the IBM WebSphere Sensor Events
 PrintTemplate[] getAllPrintTemplates()
          Gets all of the print templates
 Controller getController(java.lang.String controllerid)
          Gets the Controller object with the specified Controller ID
 java.util.HashMap<java.lang.String,java.lang.String> getControllerMetaData(java.lang.String controllerid)
          Gets the metdadata values for given Controller
 Device getDevice(java.lang.String deviceid)
          Gets the Device with the specified device ID
protected abstract  DeviceCommandsAdmin getDeviceCommandsAdmin()
          Gets an object used to send device commands
protected abstract  DeviceConfigAdmin getDeviceConfigAdmin()
          Gets an object used to get device configuration
protected abstract  DeviceDataAdmin getDeviceDataAdmin()
          Gets an object used to get device data
 java.lang.String[] getDeviceIDByCategoryName(java.lang.String category)
          Gets all Device objects defined in the WebSphere Sensor Events for given Device Category
 java.lang.String getDeviceStatus(java.lang.String locationId)
          Gets the device status
protected abstract  EPCCommands getEPCCommand()
           
 java.lang.String getEpcEncodingfromUrn(java.lang.String urn)
          Parse an EPC tag URN of the form "urn:epc:tag:sgtin-64:0.1234567.200160.1" into its EPC encoding "sgtin-64"
 java.lang.String[] getEpcTagData(java.lang.String printJobId)
          Gets the EPC Tag Data for a specific print job
 java.lang.String[] getEpcTagDataByBusinessRef(java.lang.String businessRef)
          Gets the EPC Tag Data for a specific business reference
 HistoryForTagOutput[] getHistoryForTag(long startDateTime, java.lang.String tag)
          gets the TagHistories For given EPC Tag ID
 java.lang.String getItemReferenceIdByUrn(java.lang.String urn)
          Gets an item reference from WebSphere Sensor Events based on human readable epc urn e.g., "sgtin-64:0.1234567.100110.1" note: urns stored in WebSphere Sensor Events are prepended with "urn:epc:tag:".
 Location getLocation(java.lang.String locationid)
          Gets the Location object with the specified Location ID or Location Alias
 java.util.HashMap<java.lang.String,java.lang.String> getLocationMetaData(java.lang.String locationid)
          Gets the metadata values for given Location
 PassiveRFIDReader getPassiveRFIDReader(java.lang.String id)
          Gets all PassiveRFIDReader objects defined in the WebSphere Sensor Events
 java.lang.String getPremisesPropertiesKeyValue(java.lang.String key)
          Gets the key value from System Agent
 PrintDetails getPrintDetails(java.lang.String printJobId)
          Gets the PrintDetails for a specific print job
 PrintDetails[] getPrintDetailsByBusinessRef(java.lang.String businessRefId)
          Gets the PrintDetails using a specified business reference ID
 Printer getPrinter(java.lang.String deviceid)
          Gets the printer with the specified device ID
 PrinterType getPrinterType(java.lang.String printerTypeId)
          Gets the PrinterType using the specified printer type ID
 PrintJob getPrintJob(java.lang.String printJobId)
          Get registered print job
 java.lang.String getPrintJobIdByUrn(java.lang.String urn)
          Gets a print job id from WebSphere Sensor Events based on human readable epc urn e.g., "sgtin-64:0.1234567.100110.1" note: urns stored in WebSphere Sensor Events are prepended with "urn:epc:tag:".
 PrintJob[] getPrintJobs()
          Get all of the print jobs that have been registered.
 java.lang.String getPrintJobStatus(java.lang.String printJobId)
          Get status for the given Print Job ID
 PrintTemplate[] getPrintTemplatesOfType(java.lang.String printerTypeId)
          Gets the Print templates of the specified type
protected abstract  StatusAdmin getStatusAdmin()
          Gets an object used to get device and job status
 SupplyChainProfile getSupplyChainProfile(java.lang.String id)
          Gets the SupplyChainProfile with a specified ID
 SupplyChainProfile[] getSupplyChainProfiles()
          Gets all of the SupplyChainProfiles that are currently defined
protected abstract  TagApiAdmin getTagApiAdmin()
          Gets an object used to query the WebSphere Sensor Events tag history
protected abstract  TagCommissioningAdmin getTagCommissioningAdmin()
          Gets an object used to interact with tag commissioning functions
 TagHistoriesForLocationOutput[] getTagHistoriesForLocation(long startDateTime, java.lang.String locationId)
          gets the TagHistories For given Location ID
 TagHistoriesForReaderOutput[] getTagHistoriesForReader(long startDateTime, java.lang.String readerId)
          gets the TagHistories For given Reader/Device ID
 java.lang.String printJob(java.lang.String locationid, java.lang.String printerid, PrintDetails pd)
          Sends a print job command to the IBM WebSphere Sensor Events
 void publish(java.lang.String message)
          Publishes message to IBM WebSphere Sensor Events messaging infrastructure.
 void publishOutBound(java.lang.String message)
          Publishes message to IBM WebSphere Sensor Events output channel.
 void sendAcceptToLightStack(java.lang.String locationid)
          Sends an accept message to the light stack at the specified location
 void sendApplicationPongPayload(java.lang.String applicationPingPayload)
          Send applicationpong payload to Data Capture
 void sendLocationMetaData(java.lang.String locationId, boolean isDelete, java.util.Map<java.lang.String,java.lang.String> attributes)
          This API call will send IBMSensorEvent to the Data Capture Controller.
 void sendRejectToLightStack(java.lang.String locationid)
          Sends a reject message to the light stack at the specified location
 void setControllerMetaData(java.lang.String controllerid, java.util.HashMap<java.lang.String,java.lang.String> metadata)
          Sets the Controller object with given metadata values
 void setGPIO(java.lang.String eventType, java.lang.String locationid, java.lang.String payloadvalue)
          Sets GPIO setting and sends ON/OFF message for given EventType and Location ID
 void setLocationMetaData(java.lang.String locationid, java.util.HashMap<java.lang.String,java.lang.String> metadata)
          Sets the Location object with given metadata values
 void setLocationMetaDataAndStartLocation(java.lang.String locationid, java.util.HashMap<java.lang.String,java.lang.String> metadata)
          Sets metadata and starts the given location object
 void startLocation(java.lang.String locationid)
          Sends a start Location command to the given location ID
 void stopLocation(java.lang.String locationid)
          Sends a stop location command to the given Location
 void updateControllerMetaData(java.lang.String controllerid, java.util.HashMap<java.lang.String,java.lang.String> metadata)
          Updates the Controller object with given metadata values
 void updateLocationMetaData(java.lang.String locationid, java.util.HashMap<java.lang.String,java.lang.String> metadata)
          Updates the Location object with given metadata values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensorEventsAPIAccess

public SensorEventsAPIAccess()
Method Detail

getDeviceConfigAdmin

protected abstract DeviceConfigAdmin getDeviceConfigAdmin()
Gets an object used to get device configuration

Returns:
DeviceConfigAdmin object

getEPCCommand

protected abstract EPCCommands getEPCCommand()

getDeviceDataAdmin

protected abstract DeviceDataAdmin getDeviceDataAdmin()
Gets an object used to get device data

Returns:
DeviceDataAdmin object

getStatusAdmin

protected abstract StatusAdmin getStatusAdmin()
Gets an object used to get device and job status

Returns:
StatusAdmin object

getDeviceCommandsAdmin

protected abstract DeviceCommandsAdmin getDeviceCommandsAdmin()
Gets an object used to send device commands

Returns:
DeviceCommandsAdmin object

getTagCommissioningAdmin

protected abstract TagCommissioningAdmin getTagCommissioningAdmin()
Gets an object used to interact with tag commissioning functions

Returns:
TagCommissioningAdmin object

getTagApiAdmin

protected abstract TagApiAdmin getTagApiAdmin()
Gets an object used to query the WebSphere Sensor Events tag history

Returns:
TagApiAdmin object

getEpcEncodingfromUrn

public java.lang.String getEpcEncodingfromUrn(java.lang.String urn)
Parse an EPC tag URN of the form "urn:epc:tag:sgtin-64:0.1234567.200160.1" into its EPC encoding "sgtin-64"

Returns:
the EPC encoding string

getPrintJobIdByUrn

public java.lang.String getPrintJobIdByUrn(java.lang.String urn)
                                    throws SensorEventsAPIAccessException
Gets a print job id from WebSphere Sensor Events based on human readable epc urn e.g., "sgtin-64:0.1234567.100110.1" note: urns stored in WebSphere Sensor Events are prepended with "urn:epc:tag:". This string is added to correctly query the database.

Parameters:
urn -
Returns:
Throws:
SensorEventsAPIAccessException

getItemReferenceIdByUrn

public java.lang.String getItemReferenceIdByUrn(java.lang.String urn)
                                         throws SensorEventsAPIAccessException
Gets an item reference from WebSphere Sensor Events based on human readable epc urn e.g., "sgtin-64:0.1234567.100110.1" note: urns stored in WebSphere Sensor Events are prepended with "urn:epc:tag:". This string is added to correctly query the database.

Parameters:
urn -
Returns:
Item Reference for given urn
Throws:
SensorEventsAPIAccessException

sendAcceptToLightStack

public void sendAcceptToLightStack(java.lang.String locationid)
                            throws SensorEventsAPIAccessException
Sends an accept message to the light stack at the specified location

Parameters:
locationid - location id of the light stack
Throws:
SensorEventsAPIAccessException

sendRejectToLightStack

public void sendRejectToLightStack(java.lang.String locationid)
                            throws SensorEventsAPIAccessException
Sends a reject message to the light stack at the specified location

Parameters:
locationid - location id of the light stack
Throws:
SensorEventsAPIAccessException

startLocation

public void startLocation(java.lang.String locationid)
                   throws SensorEventsAPIAccessException
Sends a start Location command to the given location ID

Parameters:
locationid - location ID
Throws:
SensorEventsAPIAccessException

stopLocation

public void stopLocation(java.lang.String locationid)
                  throws SensorEventsAPIAccessException
Sends a stop location command to the given Location

Parameters:
locationid - location ID
Throws:
SensorEventsAPIAccessException

getDeviceStatus

public java.lang.String getDeviceStatus(java.lang.String locationId)
                                 throws SensorEventsAPIAccessException
Gets the device status

Parameters:
locationId - location ID of device
Returns:
the status of a Device
Throws:
SensorEventsAPIAccessException

printJob

public java.lang.String printJob(java.lang.String locationid,
                                 java.lang.String printerid,
                                 PrintDetails pd)
                          throws SensorEventsAPIAccessException
Sends a print job command to the IBM WebSphere Sensor Events

Parameters:
locationid - location ID of Printer object
printerid - printer ID of Printer object
pd - PrintDetails object
Returns:
the print job id if successfully submitted, null if not
Throws:
SensorEventsAPIAccessException

getPrintTemplatesOfType

public PrintTemplate[] getPrintTemplatesOfType(java.lang.String printerTypeId)
                                        throws SensorEventsAPIAccessException
Gets the Print templates of the specified type

Parameters:
printerTypeId - the unique ID of the printer type
Returns:
and array of PrintTemplate objects for a printer type
Throws:
SensorEventsAPIAccessExceptio
SensorEventsAPIAccessException

getAllPrintTemplates

public PrintTemplate[] getAllPrintTemplates()
                                     throws SensorEventsAPIAccessException
Gets all of the print templates

Returns:
an array of all print templates on the IBM WebSphere Sensor Events Server
Throws:
SensorEventsAPIAccessException

getPrinter

public Printer getPrinter(java.lang.String deviceid)
                   throws SensorEventsAPIAccessException
Gets the printer with the specified device ID

Parameters:
deviceid - device ID of Printer
Returns:
Printer object from IBM WebSphere Sensor Events
Throws:
SensorEventsAPIAccessException

getAllPrinters

public Printer[] getAllPrinters()
                         throws SensorEventsAPIAccessException
Gets all printers defined in the IBM WebSphere Sensor Events

Returns:
array of all Printer objects defined in the IBM WebSphere Sensor Events
Throws:
SensorEventsAPIAccessException

getAllDevices

public Device[] getAllDevices()
                       throws SensorEventsAPIAccessException
Gets all Device objects defined in the WebSphere Sensor Events

Returns:
array of all Device objects defined in the WebSphere Sensor Events
Throws:
SensorEventsAPIAccessException

getAllDevicesByCategoryName

public Device[] getAllDevicesByCategoryName(java.lang.String category)
                                     throws SensorEventsAPIAccessException
Gets all Device objects defined in the WebSphere Sensor Events for given Device Category

Parameters:
Device - Category Name
Returns:
array of all Device objects defined in the WebSphere Sensor Events
Throws:
SensorEventsAPIAccessException

getDeviceIDByCategoryName

public java.lang.String[] getDeviceIDByCategoryName(java.lang.String category)
                                             throws SensorEventsAPIAccessException
Gets all Device objects defined in the WebSphere Sensor Events for given Device Category

Parameters:
Device - Category Name
Returns:
String array of Device ID's defined in the WebSphere Sensor Events for given Category.
Throws:
SensorEventsAPIAccessException

getDevice

public Device getDevice(java.lang.String deviceid)
                 throws SensorEventsAPIAccessException
Gets the Device with the specified device ID

Parameters:
deviceid - device ID of Reader
Returns:
Device object on IBM WebSphere Sensor Events
Throws:
SensorEventsAPIAccessException

getAllController

public Controller[] getAllController()
                              throws SensorEventsAPIAccessException
Gets all Controller objects defined in the WebSphere Sensor Events

Returns:
array of all Controller objects defined in the WebSphere Sensor Events for the Data Capture Configuration
Throws:
SensorEventsAPIAccessException

getAllPassiveRFIDReader

public PassiveRFIDReader[] getAllPassiveRFIDReader()
                                            throws SensorEventsAPIAccessException
Gets all PassiveRFIDReader objects defined in the WebSphere Sensor Events

Returns:
array of all Controller objects defined in the WebSphere Sensor Events for the Data Capture Configuration
Throws:
SensorEventsAPIAccessException

getPassiveRFIDReader

public PassiveRFIDReader getPassiveRFIDReader(java.lang.String id)
                                       throws SensorEventsAPIAccessException
Gets all PassiveRFIDReader objects defined in the WebSphere Sensor Events

Returns:
array of all Controller objects defined in the WebSphere Sensor Events for the Data Capture Configuration
Throws:
SensorEventsAPIAccessException

getController

public Controller getController(java.lang.String controllerid)
                         throws SensorEventsAPIAccessException
Gets the Controller object with the specified Controller ID

Parameters:
controllerid - unique ID for Controller
Returns:
Controller object on IBM WebSphere Sensor Events for the Data Capture Configuration
Throws:
SensorEventsAPIAccessException

getAllLocation

public Location[] getAllLocation()
                          throws SensorEventsAPIAccessException
Gets all Location objects defined in the WebSphere Sensor Events

Returns:
array of all Location objects from IBM WebSphere Sensor Events
Throws:
SensorEventsAPIAccessException

getLocation

public Location getLocation(java.lang.String locationid)
                     throws SensorEventsAPIAccessException
Gets the Location object with the specified Location ID or Location Alias

Parameters:
locationid - or location alias for the Location
Returns:
Location object on WebSphere Sensor Events for the Data Capture Configuration
Throws:
SensorEventsAPIAccessException

setLocationMetaData

public void setLocationMetaData(java.lang.String locationid,
                                java.util.HashMap<java.lang.String,java.lang.String> metadata)
                         throws SensorEventsAPIAccessException
Sets the Location object with given metadata values

Parameters:
locationid - for the Location
metadata - for the Location
Throws:
SensorEventsAPIAccessException

getLocationMetaData

public java.util.HashMap<java.lang.String,java.lang.String> getLocationMetaData(java.lang.String locationid)
                                                                         throws SensorEventsAPIAccessException
Gets the metadata values for given Location

Parameters:
locationid - for the Location
Throws:
SensorEventsAPIAccessException

updateLocationMetaData

public void updateLocationMetaData(java.lang.String locationid,
                                   java.util.HashMap<java.lang.String,java.lang.String> metadata)
                            throws SensorEventsAPIAccessException
Updates the Location object with given metadata values

Parameters:
locationid - for the Location
metadata - for the Location
Throws:
SensorEventsAPIAccessException

deleteLocationMetaData

public void deleteLocationMetaData(java.lang.String locationid,
                                   java.lang.String keyname)
                            throws SensorEventsAPIAccessException
Deletes the metadata key and value for the given Location object

Parameters:
locationid - for the Location
keyname - for the value to be deleted from the Backend DataBase
Throws:
SensorEventsAPIAccessException

setControllerMetaData

public void setControllerMetaData(java.lang.String controllerid,
                                  java.util.HashMap<java.lang.String,java.lang.String> metadata)
                           throws SensorEventsAPIAccessException
Sets the Controller object with given metadata values

Parameters:
controllerid - for the Contoller
metadata - for the Controller
Throws:
SensorEventsAPIAccessException

getControllerMetaData

public java.util.HashMap<java.lang.String,java.lang.String> getControllerMetaData(java.lang.String controllerid)
                                                                           throws SensorEventsAPIAccessException
Gets the metdadata values for given Controller

Parameters:
controllerid - for the Contoller
Throws:
SensorEventsAPIAccessException

updateControllerMetaData

public void updateControllerMetaData(java.lang.String controllerid,
                                     java.util.HashMap<java.lang.String,java.lang.String> metadata)
                              throws SensorEventsAPIAccessException
Updates the Controller object with given metadata values

Parameters:
controllerid - for the Contoller
metadata - for the Controller
Throws:
SensorEventsAPIAccessException

deleteControllerMetaData

public void deleteControllerMetaData(java.lang.String controllerid,
                                     java.lang.String keyname)
                              throws SensorEventsAPIAccessException
Deletes the metadata key and value for the given Controller object

Parameters:
controllerid - for the Contoller
keyname - for the value to be deleted from the Backend DataBase
Throws:
SensorEventsAPIAccessException

setLocationMetaDataAndStartLocation

public void setLocationMetaDataAndStartLocation(java.lang.String locationid,
                                                java.util.HashMap<java.lang.String,java.lang.String> metadata)
                                         throws SensorEventsAPIAccessException
Sets metadata and starts the given location object

Parameters:
locationid - for the Location
metadata - for the Location
Throws:
SensorEventsAPIAccessException

getPremisesPropertiesKeyValue

public java.lang.String getPremisesPropertiesKeyValue(java.lang.String key)
                                               throws SensorEventsAPIAccessException
Gets the key value from System Agent

Parameters:
key - properties key name
Returns:
value for the given key
Throws:
SensorEventsAPIAccessException

getPrinterType

public PrinterType getPrinterType(java.lang.String printerTypeId)
                           throws SensorEventsAPIAccessException
Gets the PrinterType using the specified printer type ID

Parameters:
printerTypeId - printer type unique ID
Returns:
PrinterType object for printerTypeId
Throws:
SensorEventsAPIAccessException

getPrintJobStatus

public java.lang.String getPrintJobStatus(java.lang.String printJobId)
                                   throws SensorEventsAPIAccessException
Get status for the given Print Job ID

Parameters:
printJobId - id
Returns:
PrintJob Status
Throws:
SensorEventsAPIAccessException

getPrintJob

public PrintJob getPrintJob(java.lang.String printJobId)
                     throws SensorEventsAPIAccessException
Get registered print job

Parameters:
printJobId - id of print job you are looking for
Returns:
PrintJob object if print job with id printJobId has been successfully registered.

note: "successfully registered" does not mean "successfully printed".

Throws:
SensorEventsAPIAccessException

getPrintJobs

public PrintJob[] getPrintJobs()
                        throws SensorEventsAPIAccessException
Get all of the print jobs that have been registered.

Returns:
an array of PrintJob objects representing all print jobs that have been successfully registered.

note: "successfully registered" does not mean "successfully printed".

Throws:
SensorEventsAPIAccessException

getSupplyChainProfiles

public SupplyChainProfile[] getSupplyChainProfiles()
                                            throws SensorEventsAPIAccessException
Gets all of the SupplyChainProfiles that are currently defined

Returns:
an array of SupplyChainProfile objects that are currently defined on the IBM WebSphere Sensor Events
Throws:
SensorEventsAPIAccessExceptionn
SensorEventsAPIAccessException

getSupplyChainProfile

public SupplyChainProfile getSupplyChainProfile(java.lang.String id)
                                         throws SensorEventsAPIAccessException
Gets the SupplyChainProfile with a specified ID

Parameters:
id - supply chain profile id
Returns:
SupplyChainProfile object
Throws:
SensorEventsAPIAccessException

getPrintDetailsByBusinessRef

public PrintDetails[] getPrintDetailsByBusinessRef(java.lang.String businessRefId)
                                            throws SensorEventsAPIAccessException
Gets the PrintDetails using a specified business reference ID

Parameters:
businessRefId -
Returns:
an array of PrintDetails objects that have been submitted to the WebSphere Sensor Events to be printed (you can have multiple print job submissions per business reference)
Throws:
SensorEventsAPIAccessException

getPrintDetails

public PrintDetails getPrintDetails(java.lang.String printJobId)
                             throws SensorEventsAPIAccessException
Gets the PrintDetails for a specific print job

Parameters:
printJobId -
Returns:
PrintDetails object representing the print job that was submitted to the IBM WebSphere Sensor Events.
Throws:
SensorEventsAPIAccessException

getEpcTagData

public java.lang.String[] getEpcTagData(java.lang.String printJobId)
                                 throws SensorEventsAPIAccessException
Gets the EPC Tag Data for a specific print job

Parameters:
printJobId -
Returns:
an array of epc tag data Strings that were printed based on
Throws:
SensorEventsAPIAccessException

getEpcTagDataByBusinessRef

public java.lang.String[] getEpcTagDataByBusinessRef(java.lang.String businessRef)
                                              throws SensorEventsAPIAccessException
Gets the EPC Tag Data for a specific business reference

Parameters:
businessRef - business reference id
Returns:
an array of epc tag data strings for all labels printed for all print jobs that used businessRef as the business reference id.
Throws:
SensorEventsAPIAccessException

clearALEData

public void clearALEData(java.lang.String location)
                  throws SensorEventsAPIAccessException
clears the ALE Data for a given location

Parameters:
location - location id
Throws:
SensorEventsAPIAccessException

getALEData

public ECReports[] getALEData(java.lang.String location)
                       throws SensorEventsAPIAccessException
gets the ECReports for a given location/reader

Parameters:
location - location id of reader
Returns:
array of ECReports objects
Throws:
SensorEventsAPIAccessException

getTagHistoriesForLocation

public TagHistoriesForLocationOutput[] getTagHistoriesForLocation(long startDateTime,
                                                                  java.lang.String locationId)
                                                           throws PremisesAccessException
gets the TagHistories For given Location ID

Parameters:
long - startDateTime
String - locationId
Returns:
array of TagHistoriesForLocationOutput objects
Throws:
SensorEventsAPIAccessException
PremisesAccessException

getTagHistoriesForReader

public TagHistoriesForReaderOutput[] getTagHistoriesForReader(long startDateTime,
                                                              java.lang.String readerId)
                                                       throws SensorEventsAPIAccessException
gets the TagHistories For given Reader/Device ID

Parameters:
long - startDateTime
String - Reader / Device ID
Returns:
array of TagHistoriesForReaderOutput objects
Throws:
SensorEventsAPIAccessException

getHistoryForTag

public HistoryForTagOutput[] getHistoryForTag(long startDateTime,
                                              java.lang.String tag)
                                       throws SensorEventsAPIAccessException
gets the TagHistories For given EPC Tag ID

Parameters:
long - startDateTime
String - EPC Tag ID
Returns:
array of HistoryForTagOutput objects
Throws:
SensorEventsAPIAccessException

decodeEPCValue

public java.util.Map<java.lang.String,java.lang.String> decodeEPCValue(java.lang.String epcVal)
                                                                throws SensorEventsAPIAccessException
Decodes given EPC Hex value and retrun map for all the decoded values.

Parameters:
EPC - Hex value as String.
Returns:
map of EPC decoed values

Following are the map key names for the decoded EPC value.
TagType
CompanyPrefix
Filter
Partition
IndividualAssetReference
AssetType
SerialNumber
LocationReference
ExtensionComponent
GeneralManagerNumber
ObjectClass
CAGECode
SerialReference
TagHeader
If given tag does not have any of the mentioned values above in the tag, the map is not going to be populated with the certain key name and value.

Throws:
SensorEventsAPIAccessException

sendLocationMetaData

public void sendLocationMetaData(java.lang.String locationId,
                                 boolean isDelete,
                                 java.util.Map<java.lang.String,java.lang.String> attributes)
                          throws SensorEventsAPIAccessException
This API call will send IBMSensorEvent to the Data Capture Controller. Payload for the IBMSensorEvent will contain key and value mention in the Map as attributes. Purpose of this method is to keep Data Capture Controller in sync with Location MetaData set on the IBM WebSphere Sensor Events.

Parameters:
Location - ID as String.
Ture/false - is API need to send Delete Event to Data Capture Device.
Attributes - as Map to set into the IBMSensorEvent Payload.
Throws:
SensorEventsAPIAccessException

publish

public void publish(java.lang.String message)
             throws SensorEventsAPIAccessException
Publishes message to IBM WebSphere Sensor Events messaging infrastructure.

Parameters:
Message - as XML String.
Throws:
SensorEventsAPIAccessException

publishOutBound

public void publishOutBound(java.lang.String message)
                     throws SensorEventsAPIAccessException
Publishes message to IBM WebSphere Sensor Events output channel.

Parameters:
Message - as XML String.
Throws:
SensorEventsAPIAccessException

getAllChildLocation

public java.lang.String[] getAllChildLocation(java.lang.String locationid)
                                       throws SensorEventsAPIAccessException
Get all the child location id's for given location id Location id's will be in ascending order for example we have location topology - STORE 1 -> L99 -> L100 -> L101 -> L102 and get we try to child locations for L99 following will be array layout returned by API Array[0]L100 Array[1]L101 Array[2]L102 Array[3]L103

Parameters:
location - id.
Returns:
string array of child location id's
Throws:
SensorEventsAPIAccessException

getAllParentLocation

public java.lang.String[] getAllParentLocation(java.lang.String locationid)
                                        throws SensorEventsAPIAccessException
Get all the parent location id's for given location id Location id's will be in descending order for example we have location topology - STORE 1 -> L99 -> L100 -> L101 -> L102 and get we try to parent locations for L102 following will be array layout returned by API Array[0]L101 Array[1]L100 Array[2]L99 Array[3]STORE 1

Parameters:
location - id.
Returns:
string array of parent location id's
Throws:
SensorEventsAPIAccessException

sendApplicationPongPayload

public void sendApplicationPongPayload(java.lang.String applicationPingPayload)
                                throws SensorEventsAPIAccessException
Send applicationpong payload to Data Capture

Parameters:
application - ping payload as XML string
Throws:
SensorEventsAPIAccessException

setGPIO

public void setGPIO(java.lang.String eventType,
                    java.lang.String locationid,
                    java.lang.String payloadvalue)
             throws SensorEventsAPIAccessException
Sets GPIO setting and sends ON/OFF message for given EventType and Location ID

Parameters:
EventType -
Location - ID
Payload - value - ON / OFF
Throws:
SensorEventsAPIAccessException


Copyright © 2005 - 2009 IBM Corp. All Rights Reserved.