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.RemoteException
MXException
public static void createSubscription(java.lang.String productCode, java.lang.String personid, UserInfo userInfo) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public static WeatherAddress getLatitudeLongitudeForWO(MboRemote workOrder) throws java.rmi.RemoteException, MXException
workOrder
- MXException
java.rmi.RemoteException
public static WeatherAddress getLatitudeLongitudeForLocation(MboRemote locationMbo) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public 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.RemoteException
MXException
public 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.RemoteException
MXException
public 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.RemoteException
public boolean assignmentInWeatherAlertLifeSpan(Assignment assignment, WeatherAlertImpact alertImpact) throws java.rmi.RemoteException, MXException
MXException
- MAXIMO exceptionjava.rmi.RemoteException
public boolean overlapAlert(java.util.Date WorkStart, java.util.Date WorkFinish, MboRemote alertImpact) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public boolean woInWeatherZone(MboRemote wo, MboRemote zone) throws java.rmi.RemoteException, MXException
MXException
- MAXIMO exceptionjava.rmi.RemoteException
public double geoDistance(WeatherAddress addr, MboRemote zone) throws java.rmi.RemoteException, MXException
MXException
- MAXIMO exceptionjava.rmi.RemoteException
public int getLifeSpanMin(java.lang.String lifespan) throws java.rmi.RemoteException, MXException
MXException
- MAXIMO exceptionjava.rmi.RemoteException
public MboSetRemote getWeatherAlertImpactForLoc(WeatherAddress addr, UserInfo userInfo) throws java.rmi.RemoteException, MXException
MXException
- MAXIMO exceptionjava.rmi.RemoteException
public java.lang.String getweatherAlertForAddr(java.util.Date apptdate, WeatherAddress addr, UserInfo userinfo) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public boolean locationInWeatherZone(WeatherAddress addr, MboRemote zone) throws java.rmi.RemoteException, MXException
MXException
- MAXIMO exceptionjava.rmi.RemoteException
public 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