public class IoTUtils extends java.lang.Object implements IoTServicesConstants
ACTIVE, AGGMSGSCHEMA, AGGTIMERANGE, BODY, DESCRIPTION, DEVICEIDTAG, DEVICETYPE, DEVICETYPEDESC, DEVICETYPEDESCRTAG, DEVICETYPETAG, ENDPOINTNAME, ENDPOINTVALUE, EXTSYSTEM, FEEDMAPPINGPROP, GROUPLEVEL, HASIOTCFG, HISTMAPPER, HISTQUERY, HTTPMETHOD, IFACENAME, INSTANCENAME, IOTCFG, IOTCONNSERVLOGGER, IOTSERVEP, IOTSERVICENAME, ISDEFAULT, LABEL, LASTMESSAGETAG, MAPPER, METERNAME, METHOD, NAMETAG, PAYLOADIDATTR, PINGENDPOINT, PROCESSOR, PROPAGGREGATION, PROPERTY, READINGDATEFORMAT, READINGDATETAGMAP, READINGDATETAGNAME, RESULTTAGNAME, RULENAME, SEQUENCE, SORT, USEDBY, USEDWITH, USEDWITH_getAggregateResultForDeviceType, USEDWITH_getAllDevicetypes, USEDWITH_getDevices, USEDWITH_getLastMessage, USEDWITH_getMessage, USEDWITH_getSampleAggregate, USEWITH, VALUE, VALUETAG
Constructor and Description |
---|
IoTUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getActiveService()
Returns the name of the active service
|
static java.lang.String |
getCachedEndPointBody(java.lang.String servicename,
java.lang.String usedwith)
Returns the Body for the endpoint
|
static java.lang.String |
getCachedEndPointHttpMethod(java.lang.String servicename,
java.lang.String usedwith)
Returns the Http Method for the endpoint
|
static java.lang.String |
getCachedEndPointResultTag(java.lang.String servicename,
java.lang.String usedwith)
Returns the ResultTagName for the end point.
|
static java.lang.String |
getCachedEndPointValue(java.lang.String servicename,
java.lang.String usedwith)
Returns a Rest EndPoint Value
|
static java.util.List<IoTRestEndPointsInfo> |
getCachedRestEndPointInfo(java.lang.String servicename)
Returns Rest EndPoints Info for a Service
|
static IoTRestEndPointsInfo |
getCachedRestEndPointInfo(java.lang.String servicename,
java.lang.String usedwith)
Returns a Rest EndPoints Info object
|
static java.util.Map<java.lang.String,IoTServiceDeviceTypeInfo> |
getDeviceTypeInfoForActiveService()
Returns a map of
|
static java.lang.String |
getJsonObjectAsString(com.ibm.json.java.JSONArtifact ja) |
static java.lang.String |
getJsonResourceForActiveService()
Returns the JSONResource name for active service
|
static java.lang.Object |
getJsonTagElementVal(com.ibm.json.java.JSONObject jsonObject,
java.lang.String jsonPath)
Get the data desired within a JSON data structure.
|
static java.util.Map<java.lang.String,java.lang.String> |
getPayloadProps(java.lang.String service)
Returns a map List
|
static java.util.Map<java.lang.String,java.lang.String> |
getPayloadProps(java.lang.String service,
java.lang.String usedby)
Returns a map List
|
static IoTPayloadPropsInfo |
getPayloadPropsUsedBy(java.lang.String service,
java.lang.String property) |
static boolean |
isDeviceOnAssetMeter(java.lang.String servicename)
Returns a boolean indicating if devices are associated at the meter level.
|
static java.lang.String |
parseDelimiter(java.lang.String str,
java.lang.String delimiter,
int startPos)
Returns the right side of a delimited string preserving the rest of the string
which may contain the same delimiter.
|
static java.util.List<java.lang.String[]> |
parseTagMap(java.lang.String ranges)
Parses a date tag-mapping string.
|
static java.lang.String |
substituteVariable(java.lang.String template,
java.lang.String variable,
java.lang.String replacement) |
static java.lang.String |
toISO8601UTC(java.util.Date date)
Takes a Date and converts it to a UTC string that conforms to ISO8601 standard
|
public static IoTRestEndPointsInfo getCachedRestEndPointInfo(java.lang.String servicename, java.lang.String usedwith) throws java.rmi.RemoteException, MXException
servicename
- usedwith
- java.rmi.RemoteException
MXException
public static java.util.List<IoTRestEndPointsInfo> getCachedRestEndPointInfo(java.lang.String servicename) throws java.rmi.RemoteException, MXException
servicename
- java.rmi.RemoteException
MXException
public static java.lang.String getCachedEndPointValue(java.lang.String servicename, java.lang.String usedwith)
servicename
- usedwith
- java.rmi.RemoteException
MXException
public static boolean isDeviceOnAssetMeter(java.lang.String servicename)
servicename
- public static java.lang.String getCachedEndPointHttpMethod(java.lang.String servicename, java.lang.String usedwith)
servicename
- usedwith
- java.rmi.RemoteException
MXException
public static java.lang.String getCachedEndPointBody(java.lang.String servicename, java.lang.String usedwith)
servicename
- usedwith
- java.rmi.RemoteException
MXException
public static java.lang.String getCachedEndPointResultTag(java.lang.String servicename, java.lang.String usedwith)
servicename
- usedwith
- public static java.lang.String parseDelimiter(java.lang.String str, java.lang.String delimiter, int startPos)
str
- delimiter
- startPos
- (zero based)public static java.util.Map<java.lang.String,IoTServiceDeviceTypeInfo> getDeviceTypeInfoForActiveService()
public static java.lang.String getJsonResourceForActiveService()
public static java.util.Map<java.lang.String,java.lang.String> getPayloadProps(java.lang.String service)
public static IoTPayloadPropsInfo getPayloadPropsUsedBy(java.lang.String service, java.lang.String property)
public static java.util.Map<java.lang.String,java.lang.String> getPayloadProps(java.lang.String service, java.lang.String usedby)
public static java.lang.String getActiveService()
public static java.lang.String toISO8601UTC(java.util.Date date)
date
- public static java.lang.String getJsonObjectAsString(com.ibm.json.java.JSONArtifact ja)
public static java.lang.String substituteVariable(java.lang.String template, java.lang.String variable, java.lang.String replacement)
public static java.lang.Object getJsonTagElementVal(com.ibm.json.java.JSONObject jsonObject, java.lang.String jsonPath)
jsonObject
- The JSON data structurejsonPath
- A string specifying the path to get desired data.public static java.util.List<java.lang.String[]> parseTagMap(java.lang.String ranges) throws MXException
ranges
- String in the form of: MXException