Update change log and spec for wrt-plugins-tizen_0.4.52
authorDongjin Choi <milkelf.choi@samsung.com>
Wed, 10 Jul 2013 07:58:45 +0000 (16:58 +0900)
committerDongjin Choi <milkelf.choi@samsung.com>
Wed, 10 Jul 2013 07:58:45 +0000 (16:58 +0900)
[model] REDWOOD
[binary_type] PDA
[customer] OPEN

[Issue] intensive test.
[Problem] simple absolute path was allowed for resolve api.
[Cause] no check.
[Solution] deny simple absolute path without file:// scheme.

[Bluetooth] Fix bug in getting onconnect of BluetoothHealthApplication
[Bluetooth] Use system_info_get_platform_bool()

[Application] exception should not be thrown for get/set properties

[Issue#] N/A
[Problem] The returned value has to be the biggest possible unit without losing the precision. But its unit is smaller one of two TimeDurations.
[Cause] It changed to smaller unit before calculating the differce and the result was returned.
[Solution] The result to calculate the  difference will be changed to the biggest possible unit without losing the precision.

[Issue] N/A
[Problem] loadMessageAttachment fail after loadMessageBody
[Cause] message is not set for attachments
[Solution] message set for attachments

[team] WebAPI
[request] N/A
[horizontal_expansion] N/A

UnitTC passed.

21 files changed:
packaging/wrt-plugins-tizen.spec
src/Application/JSApplication.cpp
src/Application/JSApplication.h
src/Application/JSApplicationCert.cpp
src/Application/JSApplicationContext.cpp
src/Application/JSApplicationControl.cpp
src/Application/JSApplicationControlData.cpp
src/Application/JSApplicationInformation.cpp
src/Application/JSApplicationMetaData.cpp
src/Application/JSRequestedApplicationControl.cpp
src/Bluetooth/JSBluetoothAdapter.cpp
src/Bluetooth/JSBluetoothHealthApplication.cpp
src/Filesystem/FilesystemUtils.cpp
src/Filesystem/FilesystemUtils.h
src/Filesystem/JSFilesystemManager.cpp
src/Filesystem/Manager.cpp
src/Filesystem/Node.cpp
src/Messaging/MailSync.cpp
src/TimeUtil/JSTimeDuration.cpp
src/TimeUtil/TimeUtilConverter.cpp
src/TimeUtil/TimeUtilConverter.h

index 1600340..0ed41ce 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       wrt-plugins-tizen
 Summary:    JavaScript plugins for WebRuntime
-Version:    0.4.51
+Version:    0.4.52
 Release:    0
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
index f96dd9b..46a7f90 100644 (file)
@@ -68,14 +68,6 @@ JSClassDefinition JSApplication::m_classInfo = {
     NULL,     //ConvertToType
 };
 
-#if 0
-JSStaticValue JSApplication::m_property[] = {
-    { TIZEN_APPLICATION_APP_INFO, getProperty, NULL, kJSPropertyAttributeReadOnly },
-    { TIZEN_APPLICATION_APP_CONTEXT_ID, getProperty, NULL, kJSPropertyAttributeReadOnly },
-    { 0, 0, 0, 0 }
-};
-#endif
-
 JSStaticFunction JSApplication::m_function[] = {
                { APPLICATION_FUNCTION_API_EXIT, JSApplication::exit, kJSPropertyAttributeNone },
                { APPLICATION_FUNCTION_API_HIDE, JSApplication::hide, kJSPropertyAttributeNone },
@@ -120,50 +112,6 @@ JSValueRef JSApplication::makeObject(JSContextRef ctx, const ApplicationPtr valu
        return target;
 }
 
-#if 0
-
-bool JSApplication::isObjectOfClass(JSContextRef context, JSValueRef value)
-{
-       return JSValueIsObjectOfClass(context, value, getClassRef());
-}
-
-ApplicationPtr JSApplication::getPrivData(JSObjectRef object)
-{
-       JSApplicationPriv *priv = static_cast<JSApplicationPriv*>(JSObjectGetPrivate(object));
-       if (!priv) {
-               ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null");
-       }
-       ApplicationPtr result = priv->getObject();
-       if (!result) {
-               ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null");
-       }
-       return result;
-}
-
-
-JSValueRef JSApplication::getProperty(JSContextRef context,
-       JSObjectRef object,
-       JSStringRef propertyName,
-       JSValueRef* exception)
-{
-       Try     {
-               ApplicationConverterFactory::ConverterType converter = ApplicationConverterFactory::getConverter(context);
-               ApplicationPtr privateData = getPrivData(object);
-       
-               if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_APP_INFO)) {
-                       return converter->toJSValueRefFromApplicationInformation(privateData->getAppInfo());
-               } else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_APP_CONTEXT_ID)) {
-                       return converter->toJSValueRef(privateData->getContextId());
-               }
-       } Catch(WrtDeviceApis::Commons::Exception) {
-        LoggerE("Exception: " << _rethrown_exception.GetMessage());
-               JSWebAPIErrorFactory::postException(context, exception,JSWebAPIErrorFactory::INVALID_VALUES_ERROR, "Invalid value error");
-    }
-       
-       return NULL;
-}
-#endif
-
 JSValueRef JSApplication::exit(JSContextRef context, 
        JSObjectRef object, 
        JSObjectRef thisObject, 
index 6ad4619..1df90b9 100644 (file)
@@ -41,27 +41,9 @@ public:
        */
        static JSClassRef getClassRef();
 
-/*
-       static JSValueRef createJSObject(JSContextRef context,
-                       const std::string &name,
-                       const std::string &package,
-                       const std::string &iconPath,
-                       const std::string &version,
-                       const bool &show,
-                       const std::vector<std::string> &categories,
-                       const time_t &installDate,
-                       const long &installSize);
-
-       static bool isObjectOfClass(JSContextRef context, JSValueRef value);
-*/
-
-
        static JSValueRef makeObject(JSContextRef ctx, const ApplicationPtr value);
 
-/*
-       static ApplicationInformationPtr 
-               getApplicationInformation(JSContextRef context, JSValueRef value);
-*/
+
        /**
         * hide the application based on application context.
         */
@@ -113,15 +95,7 @@ private:
        static JSStaticFunction m_function[];   
 
        static JSClassRef m_classRef;
-#if 0
-
-       static ApplicationPtr getPrivData(JSObjectRef object);
 
-       static JSValueRef getProperty(JSContextRef context,
-               JSObjectRef object,
-               JSStringRef propertyName,
-               JSValueRef* exception);
-#endif
 };
 
 }
index 7153000..7b9f2c4 100644 (file)
@@ -118,14 +118,13 @@ JSValueRef JSApplicationCert::getProperty(JSContextRef context,
                } else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CERT_VALUE)) {
                        return converter.toJSValueRef(privateData->getValue());
                }
-       } catch (const BasePlatformException &err) {
-        return JSWebAPIErrorFactory::postException(context, exception, err);
-    } catch (...) {
-        DeviceAPI::Common::TypeMismatchException err("TypeMismatchException occured");
-        return JSWebAPIErrorFactory::postException(context, exception, err);
+       } catch (...) {
+        LoggerE("Exception occured while get property");
+               return JSValueMakeUndefined(context);
     }
        
-       return JSValueMakeUndefined(context);
+       /* do not return undefined object to find method */
+    return NULL;
 }
 
 }
index 1bc2408..8802dbf 100644 (file)
@@ -150,15 +150,13 @@ JSValueRef JSApplicationContext::getProperty(JSContextRef context,
                } else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CONTEXT_ID)) {
                        return converter.toJSValueRef(privateData->getContextId());
                } 
-
-       } catch (const BasePlatformException &err) {
-        return JSWebAPIErrorFactory::postException(context, exception, err);
-    } catch (...) {
-        DeviceAPI::Common::TypeMismatchException err("TypeMismatchException occured");
-        return JSWebAPIErrorFactory::postException(context, exception, err);
+       } catch (...) {
+        LoggerE("Exception occured while get property");
+               return JSValueMakeUndefined(context);
     }
        
-       return JSValueMakeUndefined(context);
+       /* do not return undefined object to find method */
+    return NULL;
 }
 
 
index 803a5e4..16766d0 100644 (file)
@@ -224,12 +224,11 @@ JSValueRef JSApplicationControl::getProperty(JSContextRef context, JSObjectRef o
                        return converter->toJSValueRef(appsvc->getAppControlDataArray());
                }
 
-    } catch (const BasePlatformException &err) {
-        return JSWebAPIErrorFactory::postException(context, exception, err);
     } catch (...) {
-        DeviceAPI::Common::TypeMismatchException err("TypeMismatchException occured");
-        return JSWebAPIErrorFactory::postException(context, exception, err);
+               LoggerE("Exception occured while get property");
+               return JSValueMakeUndefined(context);
     }
+       
        /* do not return undefined object to find method */
     return NULL;
 }
@@ -257,11 +256,8 @@ bool JSApplicationControl::setProperty(JSContextRef context, JSObjectRef object,
                        return true;
                } 
 
-       } catch (const BasePlatformException &err) {
-        return JSWebAPIErrorFactory::postException(context, exception, err);
-    } catch (...) {
-        DeviceAPI::Common::TypeMismatchException err("TypeMismatchException occured");
-        return JSWebAPIErrorFactory::postException(context, exception, err);
+       } catch (...) {
+       LoggerE("Exception occured while set property");
     }
        
        return false;
index a6eb790..186c288 100644 (file)
@@ -170,38 +170,37 @@ JSValueRef JSApplicationControlData::getProperty(JSContextRef context,
                } else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CONTROL_DATA_VALUE)) {
                        return converter.toJSValueRef(privateData->getValue());
                } 
-       } catch (const BasePlatformException &err) {
-        return JSWebAPIErrorFactory::postException(context, exception, err);
-    } catch (...) {
-        DeviceAPI::Common::TypeMismatchException err("TypeMismatchException occured");
-        return JSWebAPIErrorFactory::postException(context, exception, err);
+       } catch (...) {
+        LoggerE("Exception occured while get property");
+               return JSValueMakeUndefined(context);
     }
        
-       return JSValueMakeUndefined(context);
+       /* do not return undefined object to find method */
+    return NULL;
 }
 
+
 bool JSApplicationControlData::setProperty(JSContextRef context,
                        JSObjectRef object,
                        JSStringRef propertyName,
                        JSValueRef value,
                        JSValueRef* exception)
 {
+       const JSValueRef arguments[1] = {value};
+       ArgumentValidator validator(context, 1, arguments);
+
        try {
-               WrtDeviceApis::CommonsJavaScript::Converter converter(context);
                ApplicationControlDataPtr privateData = getPrivData(object);
                
                if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CONTROL_DATA_KEY)) {
-                       privateData->setKey(converter.toString(value));
+                       privateData->setKey(JSUtil::JSValueToString(context, value));
                        return true;
                } else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CONTROL_DATA_VALUE)) {
-                       privateData->setValue(converter.toVectorOfStrings(value));
+                       privateData->setValue(JSUtil::JSArrayToStringVector(context, validator.toArrayObject(0)));
                        return true;                    
                } 
        } catch (const BasePlatformException &err) {
-        return JSWebAPIErrorFactory::postException(context, exception, err);
-    } catch (...) {
-        DeviceAPI::Common::TypeMismatchException err("TypeMismatchException occured");
-        return JSWebAPIErrorFactory::postException(context, exception, err);
+        LoggerE("Setting property is failed." << err.getMessage());
     }
        
        return false;
index 97eb882..5031880 100644 (file)
@@ -191,14 +191,13 @@ JSValueRef JSApplicationInformation::getProperty(JSContextRef context,
                                return converter.toJSValueRefLong(privateData->getInstallSize());
                        } 
                }
-       } catch (const BasePlatformException &err) {
-        return JSWebAPIErrorFactory::postException(context, exception, err);
-    } catch (...) {
-        DeviceAPI::Common::TypeMismatchException err("TypeMismatchException occured");
-        return JSWebAPIErrorFactory::postException(context, exception, err);
+       } catch (...) {
+        LoggerE("Exception occured while get property");
+               return JSValueMakeUndefined(context);
     }
-       
-       return JSValueMakeUndefined(context);
+
+       /* do not return undefined object to find method */
+       return NULL;
 }
 
 }
index 8abeb0e..67df56a 100644 (file)
@@ -128,14 +128,13 @@ JSValueRef JSApplicationMetaData::getProperty(JSContextRef context,
                        
                        return converter.toJSValueRef(value);
                }
-       } catch (const BasePlatformException &err) {
-        return JSWebAPIErrorFactory::postException(context, exception, err);
-    } catch (...) {
-        DeviceAPI::Common::TypeMismatchException err("TypeMismatchException occured");
-        return JSWebAPIErrorFactory::postException(context, exception, err);
+       } catch (...) {
+        LoggerE("Exception occured while get property");
+               return JSValueMakeUndefined(context);
     }
        
-       return JSValueMakeUndefined(context);
+       /* do not return undefined object to find method */
+    return NULL;
 }
 
 }
index f0bb9d2..54e0370 100644 (file)
@@ -155,7 +155,8 @@ JSValueRef JSRequestedApplicationControl::getProperty(JSContextRef context, JSOb
 {
     JSRequestedApplicationControlPriv *priv = static_cast<JSRequestedApplicationControlPriv*>(JSObjectGetPrivate(object));
     if (!priv) {
-               return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::TYPE_MISMATCH_ERROR, "Type mistmatch error.");
+        LoggerE("Exception occured while get property");
+        return JSValueMakeUndefined(context);
        }
 
     try {
@@ -167,11 +168,9 @@ JSValueRef JSRequestedApplicationControl::getProperty(JSContextRef context, JSOb
         } else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_CALLER_APP_ID)) {
             return converter->toJSValueRef(providerMgr->getCallerAppId());
         }
-    } catch (const BasePlatformException &err) {
-        LoggerW("Getting property is failed. %s", err.getMessage().c_str());
     } catch (...) {
-        DeviceAPI::Common::UnknownException err("Unknown Error in RequestedApplicationControl.replyFailure().");
-        LoggerW("Getting property is failed. %s", err.getMessage().c_str());
+        LoggerE("Exception occured while get property");
+        return JSValueMakeUndefined(context);
     }
 
        /* do not return undefined object to find method */
index 91810e5..22badc7 100644 (file)
@@ -203,7 +203,7 @@ JSValueRef JSBluetoothAdapter::setPowered(JSContextRef context,
     try {
         // Check whether BT is supported or not
         bool supported = false;
-        if(system_info_get_value_bool(SYSTEM_INFO_KEY_BLUETOOTH_SUPPORTED, &supported) != SYSTEM_INFO_ERROR_NONE) {
+        if(system_info_get_platform_bool("tizen.org/feature/network.bluetooth", &supported) != SYSTEM_INFO_ERROR_NONE) {
             LoggerW("Can't check BT is supported or not");
         }
 
index 580e34b..14ced18 100644 (file)
@@ -130,7 +130,7 @@ JSValueRef JSBluetoothHealthApplication::getProperty(JSContextRef context,
         }
         else if (JSStringIsEqualToUTF8CString(propertyName, BLUETOOTH_HEALTH_APPLICATION_ONCONNECT)) {
             LoggerD("get onconnect");
-            return JSUtil::toJSValueRef(context, priv->mApp->getOnConnect());
+            return priv->mApp->getOnConnect(context);
         }        
         /*
         else if (JSStringIsEqualToUTF8CString(propertyName, BLUETOOTH_HEALTH_APPLICATION_IS_REGISTERED)) {
index e351ff3..8ac3232 100644 (file)
@@ -114,7 +114,7 @@ IPathPtr DLL_EXPORT fromVirtualPath(JSContextRef context,
        RootToPathMapIterator it = rootToPath.find(root);
 
        if (it == rootToPath.end()) {
-               //ThrowMsg(Commons::NotFoundException, "Location not found.");
+//             ThrowMsg(Commons::NotFoundException, "Location not found.");
                LoggerD("Allow non virtual root path " << arg);
                return IPath::create(arg);
        }
@@ -155,6 +155,33 @@ std::string DLL_EXPORT toVirtualPath(JSContextRef context, const std::string& ar
 //     ThrowMsg(Commons::ConversionException, "Path doesn't contain a valid location type.");
 }
 
+bool DLL_EXPORT isVirtualPath(const std::string& path) {       
+       std::string root;
+       std::string::size_type separatorPosition = path.find(IPath::getSeparator());
+       
+       if (separatorPosition != std::string::npos) {
+               root = path.substr(0, separatorPosition);
+       } else {
+               root = path;
+       }
+       
+       int widgetId = WrtAccessSingleton::Instance().getWidgetId();
+       WidgetDB::Api::IWidgetDBPtr widgetDB = WidgetDB::Api::getWidgetDB(widgetId);
+
+       RootToPathMap rootToPath = getRootToPathMap();
+       rootToPath["wgt-package"] = widgetDB->getWidgetInstallationPath();
+       rootToPath["wgt-private"] = widgetDB->getWidgetPersistentStoragePath();
+       rootToPath["wgt-private-tmp"] = widgetDB->getWidgetTemporaryStoragePath();
+       RootToPathMapIterator it = rootToPath.find(root);    
+
+       
+       if (it == rootToPath.end()) {
+               return false;
+       }
+       else {
+               return true;
+       }
+}
 bool DLL_EXPORT isUriPath(const std::string& path) {
                const char* uriPrefix = "file://";
                const char* stringFromPath = path.c_str();
index 1e50a16..4eb9e0d 100755 (executable)
@@ -33,6 +33,7 @@ std::string toVirtualPath(JSContextRef context, const std::string& arg);
 
 bool isPathValid(const std::string& path);
 bool isUriPath(const std::string& path);
+bool isVirtualPath(const std::string& path);
 
 void toUTF8String(std::string fromEncoding, const char* from, const size_t fromLength, std::string &outputString);
 }
index fbaa582..b6c0cef 100644 (file)
@@ -538,9 +538,14 @@ JSValueRef JSFilesystemManager::resolve(JSContextRef context,
                cbm->setObject(thisObject);
 
                IPathPtr path;
-               std::string virtualPath;
-               path = Utils::fromVirtualPath(globalContext, converter->toString(reserveArguments[0]));
-               virtualPath = converter->toString(reserveArguments[0]);
+               std::string virtualPath = converter->toString(reserveArguments[0]);
+
+               if (!Utils::isVirtualPath(virtualPath) && !Utils::isUriPath(virtualPath)) {
+                       ThrowMsg(Commons::NotFoundException, "Location not found.");
+               }
+
+               path = Utils::fromVirtualPath(globalContext, virtualPath);
+
                LoggerD("virtualPath:[" << virtualPath << "]");
                int permissions = PERM_READ | PERM_WRITE;
                std::string perm = "rw";
index 1518351..692efeb 100644 (file)
@@ -53,7 +53,8 @@ namespace Filesystem {
 Manager::Locations Manager::m_locations;
 Manager::RootList Manager::m_rootlist;
 Manager::SubRootList Manager::m_subrootlist;
-const std::size_t Manager::m_maxPathLength = 256;
+const std::size_t Manager::m_maxPathLength = PATH_MAX;
+       
 NodeList Manager::m_openedNodes;
 std::vector<Manager::WatcherPtr> Manager::m_watchers;
 
index 30b07cd..08c602d 100644 (file)
@@ -428,7 +428,17 @@ bool Node::exists(const IPathPtr& path)
     struct stat info;
     memset(&info, 0, sizeof(struct stat));
     int status = lstat(path->getFullPath().c_str(), &info);
-    if ((status == 0) || ((status != 0) && (errno != ENOENT))) {
+
+    if (status == 0) 
+    {
+        return true;
+    }
+    else if (errno == ENAMETOOLONG) 
+    {
+        ThrowMsg(Commons::PlatformException, "file name is too long");
+    }
+    else if (errno != ENOENT) 
+    {          
         return true;
     }
     return false;
index b716596..20236a4 100644 (file)
@@ -604,11 +604,26 @@ void MailSync::OnEventReceived(const DBus::MessageEvent& event)
                                EventMessagingServiceReqReceiver* requestReceiver = mail->getRequestReceiver();
                                if (mail && requestReceiver) {
                                        EventMessagingServicePtr event = mail->getMessagingServiceEvent();
-//                                     EventMessagingServicePtr event = messagingService->getEventFromHandle(handle);
                        
                                        if ( status == NOTI_DOWNLOAD_BODY_FINISH )
                                        {
                                                event->m_message->readAllData();
+
+                                               std::vector<IAttachmentPtr> attachments = mail->getAttachments();
+                                               std::vector<IAttachmentPtr> inlineAttachments = mail->getInlineAttachments();
+
+                                               for (unsigned int idx = 0; idx < attachments.size() ; idx++ )
+                                               {
+                                                       LoggerD("set Attachment ID = " << attachments[idx]->getAttachmentID());
+                                                       attachments[idx]->setMessage(event->m_message);
+
+                                               }
+                                               for (unsigned int idx = 0; idx < inlineAttachments.size() ; idx++ )
+                                               {
+                                                       LoggerD("set inline Attachment ID = " << inlineAttachments[idx]->getAttachmentID());
+                                                       inlineAttachments[idx]->setMessage(event->m_message);
+                                               }
+
                                                requestReceiver->ManualAnswer(event);
                                                m_SyncRequests.erase( handle );
                                        }
index 26adf36..9e836eb 100755 (executable)
@@ -21,6 +21,7 @@
 #include <Commons/Exception.h>
 #include <CommonsJavaScript/Utils.h>
 #include <CommonsJavaScript/JSCallbackManager.h>
+#include <JSUtil.h>
 #include <JSWebAPIErrorFactory.h>
 #include "JSTimeDuration.h"
 #include "TimeUtilConverter.h"
@@ -289,7 +290,7 @@ JSValueRef JSTimeDuration::diffTimeDuration(JSContextRef context, JSObjectRef th
                }
                case DIFFERENCE:
                default:
-                       return converter.makeDurationObject(diff);
+                       return converter.makeDurationObject(converter.optimizedTimeDuration(diff));
        }
 }
 
index fb931ae..df96235 100755 (executable)
@@ -226,6 +226,43 @@ long long TimeUtilConverter::convertDurationLength(DurationProperties duration,
     return result;
 }
 
+DurationProperties TimeUtilConverter::optimizedTimeDuration(DurationProperties origin) {
+       DurationProperties result;
+       result.unit = origin.unit;
+       result.length = origin.length;
+
+       switch(origin.unit) {
+               case MSECS_UNIT:
+                       if (result.length % 1000)
+                               return result;
+                       result.unit = SECONDS_UNIT;
+                       result.length /= 1000;
+                       // intentional fall-through
+
+               case SECONDS_UNIT:
+                       if (result.length % 60)
+                               return result;
+                       result.unit = MINUTES_UNIT;
+                       result.length /= 60;
+                       // intentional fall-through
+
+               case MINUTES_UNIT:
+                       if (result.length % 60)
+                               return result;
+                       result.unit = HOURS_UNIT;
+                       result.length /= 60;
+                       // intentional fall-through
+
+               case HOURS_UNIT:
+                       if (result.length % 24)
+                               return result;
+                       result.unit = DAYS_UNIT;
+                       result.length /= 24;
+                       // intentional fall-through
+       }       
+       return result;
+}
+
 double TimeUtilConverter::getTimeInMilliseconds(JSValueRef arg) {
        if (JSValueIsNull(m_context, arg) || JSValueIsUndefined(m_context, arg) || !JSValueIsObjectOfClass(m_context, arg, JSTZDate::getClassRef())) {
                ThrowMsg(Commons::ConversionException,
index 3962903..e29d558 100755 (executable)
@@ -63,7 +63,7 @@ class TimeUtilConverter : public Converter
        tm toTZDateTime(JSValueRef arg);
        tm toTZDateTime(JSObjectRef arg);
        JSObjectRef toJSValueRefTZDate(const double milliseconds, const std::string &timezone);
-
+       DurationProperties optimizedTimeDuration(DurationProperties origin);
 };
 
 }