1 package com.smartdevicelink.proxy.rpc;
\r
3 import java.util.Hashtable;
\r
4 import java.util.Vector;
\r
6 import com.smartdevicelink.proxy.RPCRequest;
\r
7 import com.smartdevicelink.proxy.constants.Names;
\r
9 * Sets value(s) for the specified global property(ies)
\r
11 * Function Group: Base <p>
\r
12 * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
\r
15 * @since SmartDeviceLink 1.0
\r
16 * @see ResetGlobalProperties
\r
18 public class SetGlobalProperties extends RPCRequest {
\r
20 * Constructs a new SetGlobalProperties object
\r
22 public SetGlobalProperties() {
\r
23 super("SetGlobalProperties");
\r
26 * Constructs a new SetGlobalProperties object indicated by the Hashtable
\r
31 * The Hashtable to use
\r
33 public SetGlobalProperties(Hashtable hash) {
\r
37 * Gets a Vector<TTSChunk> for Help Prompt representing Array of one or more
\r
38 * TTSChunk elements specifying the help prompt used in an interaction
\r
41 * @return Vector<TTSChunk> -an Array of one or more TTSChunk elements
\r
42 * specifying the help prompt used in an interaction started by PTT
\r
44 public Vector<TTSChunk> getHelpPrompt() {
\r
45 if (parameters.get(Names.helpPrompt) instanceof Vector<?>) {
\r
46 Vector<?> list = (Vector<?>)parameters.get(Names.helpPrompt);
\r
47 if (list != null && list.size() > 0) {
\r
48 Object obj = list.get(0);
\r
49 if (obj instanceof TTSChunk) {
\r
50 return (Vector<TTSChunk>) list;
\r
51 } else if (obj instanceof Hashtable) {
\r
52 Vector<TTSChunk> newList = new Vector<TTSChunk>();
\r
53 for (Object hashObj : list) {
\r
54 newList.add(new TTSChunk((Hashtable)hashObj));
\r
63 * Sets a Vector<TTSChunk> for Help Prompt that Array of one or more
\r
64 * TTSChunk elements specifying the help prompt used in an interaction
\r
68 * a Vector<TTSChunk> of one or more TTSChunk elements
\r
72 * <li>Array must have at least one element</li>
\r
73 * <li>Only optional it timeoutPrompt has been specified</li>
\r
76 public void setHelpPrompt(Vector<TTSChunk> helpPrompt) {
\r
77 if (helpPrompt != null) {
\r
78 parameters.put(Names.helpPrompt, helpPrompt);
\r
82 * Gets a Vector<TTSChunk> for Timeout Prompt representing Array of one or
\r
83 * more TTSChunk elements specifying the help prompt used in an interaction
\r
86 * @return Vector<TTSChunk> -an Array of one or more TTSChunk elements
\r
87 * specifying the help prompt used in an interaction started by PTT
\r
89 public Vector<TTSChunk> getTimeoutPrompt() {
\r
90 if (parameters.get(Names.timeoutPrompt) instanceof Vector<?>) {
\r
91 Vector<?> list = (Vector<?>)parameters.get(Names.timeoutPrompt);
\r
92 if (list != null && list.size() > 0) {
\r
93 Object obj = list.get(0);
\r
94 if (obj instanceof TTSChunk) {
\r
95 return (Vector<TTSChunk>) list;
\r
96 } else if (obj instanceof Hashtable) {
\r
97 Vector<TTSChunk> newList = new Vector<TTSChunk>();
\r
98 for (Object hashObj : list) {
\r
99 newList.add(new TTSChunk((Hashtable)hashObj));
\r
108 * Sets a Vector<TTSChunk> for Timeout Prompt representing Array of one or
\r
109 * more TTSChunk elements specifying the help prompt used in an interaction
\r
113 public void setTimeoutPrompt(Vector<TTSChunk> timeoutPrompt) {
\r
114 if (timeoutPrompt != null) {
\r
115 parameters.put(Names.timeoutPrompt, timeoutPrompt);
\r
120 * Gets a voice recognition Help Title
\r
122 * @return String - a String value representing the text, which is shown as
\r
123 * title of the VR help screen used in an interaction started by PTT
\r
124 * @since SmartDeviceLink 2.0
\r
126 public String getVrHelpTitle() {
\r
127 return (String) parameters.get(Names.vrHelpTitle);
\r
131 * Sets a voice recognition Help Title
\r
133 * @param vrHelpTitle
\r
134 * a String value representing a voice recognition Help Title
\r
136 * <b>Notes: </b><br/>
\r
138 * <li>If omitted on supported displays, the default SMARTDEVICELINK help
\r
139 * title will be used</li>
\r
140 * <li>If omitted and one or more vrHelp items are provided, the
\r
141 * request will be rejected.</li>
\r
142 * <li>String Maxlength = 500</li>
\r
144 * @since SmartDeviceLink 2.0
\r
146 public void setVrHelpTitle(String vrHelpTitle) {
\r
147 if (vrHelpTitle != null) {
\r
148 parameters.put(Names.vrHelpTitle, vrHelpTitle);
\r
150 parameters.remove(Names.vrHelpTitle);
\r
155 * Gets items listed in the VR help screen used in an interaction started by
\r
158 * @return Vector<VrHelpItem> - a Vector value representing items listed in
\r
159 * the VR help screen used in an interaction started by PTT
\r
160 * @since SmartDeviceLink 2.0
\r
162 public Vector<VrHelpItem> getVrHelp() {
\r
163 if (parameters.get(Names.vrHelp) instanceof Vector<?>) {
\r
164 Vector<?> list = (Vector<?>)parameters.get(Names.vrHelp);
\r
165 if (list != null && list.size() > 0) {
\r
166 Object obj = list.get(0);
\r
167 if (obj instanceof VrHelpItem) {
\r
168 return (Vector<VrHelpItem>) list;
\r
169 } else if (obj instanceof Hashtable) {
\r
170 Vector<VrHelpItem> newList = new Vector<VrHelpItem>();
\r
171 for (Object hashObj : list) {
\r
172 newList.add(new VrHelpItem((Hashtable)hashObj));
\r
182 * Sets the items listed in the VR help screen used in an interaction
\r
186 * a Vector value representing items listed in the VR help screen
\r
187 * used in an interaction started by PTT
\r
189 * <b>Notes: </b><br/>
\r
191 * <li>If omitted on supported displays, the default SmartDeviceLink VR
\r
192 * help / What Can I Say? screen will be used</li>
\r
193 * <li>If the list of VR Help Items contains nonsequential
\r
194 * positions (e.g. [1,2,4]), the RPC will be rejected</li>
\r
195 * <li>If omitted and a vrHelpTitle is provided, the request
\r
196 * will be rejected</li>
\r
197 * <li>Array Minsize: = 1</li>
\r
198 * <li>Array Maxsize = 100</li>
\r
200 * @since SmartDeviceLink 2.0
\r
202 public void setVrHelp(Vector<VrHelpItem> vrHelp) {
\r
203 if (vrHelp != null) {
\r
204 parameters.put(Names.vrHelp, vrHelp);
\r
206 parameters.remove(Names.vrHelp);
\r