1 package com.smartdevicelink.proxy.rpc;
\r
3 import java.util.Hashtable;
\r
5 import com.smartdevicelink.proxy.RPCStruct;
\r
6 import com.smartdevicelink.proxy.constants.Names;
\r
8 * Used when adding a sub menu to an application menu or existing sub menu.
\r
9 * <p><b> Parameter List
\r
10 * <table border="1" rules="all">
\r
14 * <th>Description</th>
\r
15 * <th>SmartDeviceLink Ver. Available</th>
\r
20 * <td>The unique ID of an existing submenu to which a command will be added.
\r
21 * If this element is not provided, the command will be added to the top level of the Command Menu.
\r
24 * <li>Max: 2000000000</li>
\r
27 * <td>SmartDeviceLink 1.0</td>
\r
32 * <td>Position within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc.
\r
33 * Position of any submenu will always be located before the return and exit options.
\r
35 * <li>Min Value: 0</li>
\r
36 * <li>Max Value: 1000</li>
\r
37 * <li>If position is greater or equal than the number of items in the parent Command Menu, the sub menu will be appended to the end of that Command Menu.</li>
\r
38 * <li>If this element is omitted, the entry will be added at the end of the parent menu.</li>
\r
41 * <td>SmartDeviceLink 1.0</td>
\r
46 * <td>Text which appears in menu, representing this command.
\r
52 * <td>SmartDeviceLink 1.0</td>
\r
55 * @since SmartDeviceLink 1.0
\r
57 public class MenuParams extends RPCStruct {
\r
59 * Constructs a newly allocated MenuParams object
\r
61 public MenuParams() { }
\r
63 * Constructs a newly allocated MenuParams object indicated by the Hashtable parameter
\r
64 * @param hash The Hashtable to use
\r
66 public MenuParams(Hashtable hash) {
\r
70 * Get the unique ID of an existing submenu to which a command will be added.
\r
71 * If this element is not provided, the command will be added to the top level of the Command Menu.
\r
72 * @return parentID Min: 0 Max: 2000000000
\r
74 public Integer getParentID() {
\r
75 return (Integer) store.get( Names.parentID );
\r
78 * Set the unique ID of an existing submenu to which a command will be added.
\r
79 * If this element is not provided, the command will be added to the top level of the Command Menu.
\r
80 * @param parentID Min: 0; Max: 2000000000
\r
82 public void setParentID( Integer parentID ) {
\r
83 if (parentID != null) {
\r
84 store.put(Names.parentID, parentID );
\r
88 * Get the position within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc.
\r
89 * Position of any submenu will always be located before the return and exit options.
\r
91 * <li>Min Value: 0</li>
\r
92 * <li>Max Value: 1000</li>
\r
93 * <li>If position is greater or equal than the number of items in the parent Command Menu, the sub menu will be appended to the end of that Command Menu.</li>
\r
94 * <li>If this element is omitted, the entry will be added at the end of the parent menu.</li>
\r
96 * @return the position within the items of the parent Command Menu
\r
98 public Integer getPosition() {
\r
99 return (Integer) store.get( Names.position );
\r
102 * Set the position within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc.
\r
103 * Position of any submenu will always be located before the return and exit options.
\r
105 * <li>Min Value: 0</li>
\r
106 * <li>Max Value: 1000</li>
\r
107 * <li>If position is greater or equal than the number of items in the parent Command Menu, the sub menu will be appended to the end of that Command Menu.</li>
\r
108 * <li>If this element is omitted, the entry will be added at the end of the parent menu.</li>
\r
110 * @param position Mix: 0 Max: 1000
\r
112 public void setPosition( Integer position ) {
\r
113 if (position != null) {
\r
114 store.put(Names.position, position );
\r
118 * Get the text which appears in menu, representing this command.
\r
121 * <li>Max: 100</li>
\r
123 * @return menuName the menu name
\r
126 public String getMenuName() {
\r
127 return (String) store.get( Names.menuName );
\r
130 * Set text which appears in menu, representing this command.
\r
133 * <li>Max: 100</li>
\r
135 * @param menuName the menu name
\r
138 public void setMenuName( String menuName ) {
\r
139 if (menuName != null) {
\r
140 store.put(Names.menuName, menuName );
\r