public class WeatherUtils
extends java.lang.Object
| Constructor and Description |
|---|
WeatherUtils() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
assignmentInWeatherAlertLifeSpan(Assignment assignment,
WeatherAlertImpact alertImpact)
check if wo schedule is in alert life span
|
static void |
createEvent(java.lang.String productCode,
UserInfo userInfo) |
static void |
createSubscription(java.lang.String productCode,
java.lang.String personid,
UserInfo userInfo) |
static double |
geoDistance(double lat1,
double lon1,
double lat2,
double lon2,
java.lang.String uom)
Calculate distance between two geo points
|
double |
geoDistance(WeatherAddress addr,
MboRemote zone)
Calculate distance between two weather address and weather zone
|
static WeatherAddress |
getLatitudeLongitudeForLocation(MboRemote locationMbo) |
static WeatherAddress |
getLatitudeLongitudeForWO(MboRemote workOrder)
Gets the latitude and longitude for work order.
|
int |
getLifeSpanMin(java.lang.String lifespan)
getLifespan in min fromString like 2d,12h,60m
|
java.lang.String |
getweatherAlertForAddr(java.util.Date apptdate,
WeatherAddress addr,
UserInfo userinfo) |
MboSetRemote |
getWeatherAlertImpactForLoc(WeatherAddress addr,
UserInfo userInfo)
Calculate distance between two weather address and weather zone
|
static WeatherConfig |
GetWeatherConfig(java.lang.String appname,
java.lang.String weatherName,
java.lang.String portforlio,
UserInfo userInfo)
Retrieve weather config information, using: appname, weatherName,portfolio .
|
static WeatherDisplayConfig |
getWeatherDisplayConfig(java.lang.String appname,
UserInfo userInfo) |
static WeatherForecastLookup |
getWeatherLookup(long woid,
java.util.Date start,
java.util.Date end,
UserInfo userInfo)
Retrieve weather lookup information, using: WONUM, SCHEDSTART and SCHEDFINISH.
|
boolean |
locationInWeatherZone(WeatherAddress addr,
MboRemote zone)
check if location in weather zone
|
boolean |
overlapAlert(java.util.Date WorkStart,
java.util.Date WorkFinish,
MboRemote alertImpact) |
boolean |
woInWeatherAlertLifeSpan(MboRemote wo,
MboRemote alertImpact)
check if wo schedule is in alert life span
|
boolean |
woInWeatherZone(MboRemote wo,
MboRemote zone)
Calculaye distance beween two weather address and weather zone
|
public static void createEvent(java.lang.String productCode,
UserInfo userInfo)
throws java.rmi.RemoteException,
MXException
java.rmi.RemoteExceptionMXExceptionpublic static void createSubscription(java.lang.String productCode,
java.lang.String personid,
UserInfo userInfo)
throws java.rmi.RemoteException,
MXException
java.rmi.RemoteExceptionMXExceptionpublic static WeatherAddress getLatitudeLongitudeForWO(MboRemote workOrder) throws java.rmi.RemoteException, MXException
workOrder - MXExceptionjava.rmi.RemoteExceptionpublic static WeatherAddress getLatitudeLongitudeForLocation(MboRemote locationMbo) throws java.rmi.RemoteException, MXException
java.rmi.RemoteExceptionMXExceptionpublic static WeatherForecastLookup getWeatherLookup(long woid, java.util.Date start, java.util.Date end, UserInfo userInfo) throws java.rmi.RemoteException, MXException
woNum - - Work Order number.start - - Start Date.end - - End Date.java.rmi.RemoteExceptionMXExceptionpublic static WeatherConfig GetWeatherConfig(java.lang.String appname, java.lang.String weatherName, java.lang.String portforlio, UserInfo userInfo) throws java.rmi.RemoteException, MXException
appname - - application name.weatherName - - Weather config name.portfolio - - Current,Daily or Hourly.java.rmi.RemoteExceptionMXExceptionpublic static WeatherDisplayConfig getWeatherDisplayConfig(java.lang.String appname, UserInfo userInfo)
public boolean woInWeatherAlertLifeSpan(MboRemote wo, MboRemote alertImpact) throws java.rmi.RemoteException, MXException
MXException - MAXIMO exceptionjava.rmi.RemoteExceptionpublic boolean assignmentInWeatherAlertLifeSpan(Assignment assignment, WeatherAlertImpact alertImpact) throws java.rmi.RemoteException, MXException
MXException - MAXIMO exceptionjava.rmi.RemoteExceptionpublic boolean overlapAlert(java.util.Date WorkStart,
java.util.Date WorkFinish,
MboRemote alertImpact)
throws java.rmi.RemoteException,
MXException
java.rmi.RemoteExceptionMXExceptionpublic boolean woInWeatherZone(MboRemote wo, MboRemote zone) throws java.rmi.RemoteException, MXException
MXException - MAXIMO exceptionjava.rmi.RemoteExceptionpublic double geoDistance(WeatherAddress addr, MboRemote zone) throws java.rmi.RemoteException, MXException
MXException - MAXIMO exceptionjava.rmi.RemoteExceptionpublic int getLifeSpanMin(java.lang.String lifespan)
throws java.rmi.RemoteException,
MXException
MXException - MAXIMO exceptionjava.rmi.RemoteExceptionpublic MboSetRemote getWeatherAlertImpactForLoc(WeatherAddress addr, UserInfo userInfo) throws java.rmi.RemoteException, MXException
MXException - MAXIMO exceptionjava.rmi.RemoteExceptionpublic java.lang.String getweatherAlertForAddr(java.util.Date apptdate,
WeatherAddress addr,
UserInfo userinfo)
throws java.rmi.RemoteException,
MXException
java.rmi.RemoteExceptionMXExceptionpublic boolean locationInWeatherZone(WeatherAddress addr, MboRemote zone) throws java.rmi.RemoteException, MXException
MXException - MAXIMO exceptionjava.rmi.RemoteExceptionpublic static double geoDistance(double lat1,
double lon1,
double lat2,
double lon2,
java.lang.String uom)
throws java.rmi.RemoteException,
MXException
MXException - MAXIMO exceptionjava.rmi.RemoteException