예제 #1
0
        public bool HasConfiguration(VmPlannedRouteConfiguration configuration)
        {
            String path = GetPlannedRouteLocalPath(configuration.GetDirectoryName());

            if ( ! Directory.Exists(path) ) return false;

            JwTimestamp ts = GetLastUpdatedTimestamp(configuration);

            return JwUtility.IsEqual(ts, configuration.LastUpdateTs);
        }
예제 #2
0
        public void WritePlannedRoute(
            VmPlannedRouteConfiguration configuration,
            String plannedRouteData,
            String plannedRouteCloseOutData)
        {
            String localName = configuration.GetDirectoryName();

            JwUtility.WriteToFile(
                GetPlannedRouteDataPath(localName),
                plannedRouteData);

            JwUtility.WriteToFile(
                GetPlannedRouteCloseOutDataPath(localName),
                plannedRouteCloseOutData);

            JwUtility.WriteToFile(
                GetPlannedRouteLastUpdateCookiePath(localName),
                JwTimestampPolicy.GetIsoTimestampPolicy().Format( configuration.LastUpdateTs));
        }
예제 #3
0
 public JwTimestamp GetLastUpdatedTimestamp(VmPlannedRouteConfiguration configuration)
 {
     String filePath = GetPlannedRouteLastUpdateCookiePath(configuration.GetDirectoryName());
     String s = JwUtility.ReadString(filePath);
     if( s == null ) return null;
     s = s.Trim();
     if( JwUtility.IsEmpty(s) ) return null;
     JwTimestamp ts = JwTimestampPolicy.GetIsoTimestampPolicy().Parse(s);
     return ts;
 }