SDL_Android/SmartDeviceLinkAndroidProxy - added the correct version of the proxy
[profile/ivi/smartdevicelink.git] / SDL_Android / SmartDeviceLinkProxyAndroid / src / com / smartdevicelink / proxy / rpc / ResetGlobalProperties.java
index 38775b4..096e5ec 100755 (executable)
@@ -1,54 +1,94 @@
-//
-// Copyright (c) 2013 Ford Motor Company
-//
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.smartdevicelink.proxy.RPCRequest;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.GlobalProperty;
-import com.smartdevicelink.util.DebugTool;
-
-public class ResetGlobalProperties extends RPCRequest {
-
-    public ResetGlobalProperties() {
-        super("ResetGlobalProperties");
-    }
-    public ResetGlobalProperties(Hashtable hash) {
-        super(hash);
-    }
-    public Vector<GlobalProperty> getProperties() {
-       if (parameters.get(Names.properties) instanceof Vector<?>) {
-               Vector<?> list = (Vector<?>)parameters.get(Names.properties);
-               if (list != null && list.size() > 0) {
-                   Object obj = list.get(0);
-                   if (obj instanceof GlobalProperty) {
-                       return (Vector<GlobalProperty>) list;
-                   } else if (obj instanceof String) {
-                       Vector<GlobalProperty> newList = new Vector<GlobalProperty>();
-                       for (Object hashObj : list) {
-                           String strFormat = (String)hashObj;
-                           GlobalProperty toAdd = null;
-                           try {
-                               toAdd = GlobalProperty.valueForString(strFormat);
-                           } catch (Exception e) {
-                               DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.properties, e);
-                           }
-                           if (toAdd != null) {
-                               newList.add(toAdd);
-                           }
-                       }
-                       return newList;
-                   }
-               }
-       }
-        return null;
-    }
-    public void setProperties( Vector<GlobalProperty> properties ) {
-        if (properties != null) {
-            parameters.put(Names.properties, properties );
-        }
-    }
-}
+package com.smartdevicelink.proxy.rpc;\r
+\r
+import java.util.Hashtable;\r
+import java.util.Vector;\r
+\r
+import com.smartdevicelink.proxy.RPCRequest;\r
+import com.smartdevicelink.proxy.constants.Names;\r
+import com.smartdevicelink.proxy.rpc.enums.GlobalProperty;\r
+import com.smartdevicelink.util.DebugTool;\r
+/**\r
+ * Resets the passed global properties to their default values as defined by\r
+ * SMARTDEVICELINK\r
+ * <p>\r
+ * The HELPPROMPT global property default value is generated by SMARTDEVICELINK consists of\r
+ * the first vrCommand of each Command Menu item defined at the moment PTT is\r
+ * pressed<br/>\r
+ * The TIMEOUTPROMPT global property default value is the same as the HELPPROMPT\r
+ * global property default value\r
+ * <p>\r
+ * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>\r
+ * </p>\r
+ * \r
+ * @since SmartDeviceLink 1.0\r
+ * @see SetGlobalProperties\r
+ */\r
+public class ResetGlobalProperties extends RPCRequest {\r
+       /**\r
+        * Constructs a new ResetGlobalProperties object\r
+        */\r
+    public ResetGlobalProperties() {\r
+        super("ResetGlobalProperties");\r
+    }\r
+       /**\r
+        * Constructs a new ResetGlobalProperties object indicated by the Hashtable\r
+        * parameter\r
+        * <p>\r
+        * \r
+        * @param hash\r
+        *            The Hashtable to use\r
+        */    \r
+    public ResetGlobalProperties(Hashtable hash) {\r
+        super(hash);\r
+    }\r
+       /**\r
+        * Gets an array of one or more GlobalProperty enumeration elements\r
+        * indicating which global properties to reset to their default value\r
+        * \r
+        * @return Vector<GlobalProperty> -an array of one or more GlobalProperty\r
+        *         enumeration elements\r
+        */    \r
+    public Vector<GlobalProperty> getProperties() {\r
+       if (parameters.get(Names.properties) instanceof Vector<?>) {\r
+               Vector<?> list = (Vector<?>)parameters.get(Names.properties);\r
+               if (list != null && list.size() > 0) {\r
+                   Object obj = list.get(0);\r
+                   if (obj instanceof GlobalProperty) {\r
+                       return (Vector<GlobalProperty>) list;\r
+                   } else if (obj instanceof String) {\r
+                       Vector<GlobalProperty> newList = new Vector<GlobalProperty>();\r
+                       for (Object hashObj : list) {\r
+                           String strFormat = (String)hashObj;\r
+                           GlobalProperty toAdd = null;\r
+                           try {\r
+                               toAdd = GlobalProperty.valueForString(strFormat);\r
+                           } catch (Exception e) {\r
+                               DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.properties, e);\r
+                           }\r
+                           if (toAdd != null) {\r
+                               newList.add(toAdd);\r
+                           }\r
+                       }\r
+                       return newList;\r
+                   }\r
+               }\r
+       }\r
+        return null;\r
+    }\r
+       /**\r
+        * Sets an array of one or more GlobalProperty enumeration elements\r
+        * indicating which global properties to reset to their default value\r
+        * \r
+        * @param properties\r
+        *            a Vector<GlobalProperty> An array of one or more\r
+        *            GlobalProperty enumeration elements indicating which global\r
+        *            properties to reset to their default value\r
+        *            <p>\r
+        *            <b>Notes: </b>Array must have at least one element\r
+        */    \r
+    public void setProperties( Vector<GlobalProperty> properties ) {\r
+        if (properties != null) {\r
+            parameters.put(Names.properties, properties );\r
+        }\r
+    }\r
+}\r