1 /*
2  * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.
8  *
9  * This code is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * version 2 for more details (a copy is included in the LICENSE file that
13  * accompanied this code).
14  *
15  * You should have received a copy of the GNU General Public License version
16  * 2 along with this work; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  */
23 
24 /*
25  * A Simple AttachingConnector with default arguments of all types used by
26  * nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect005 test
27  */
28 
29 package nsk.jdi.PlugConnectors.MultiConnectors.plugMultiConnect005.connectors;
30 
31 import nsk.share.jdi.*;
32 import com.sun.jdi.*;
33 import com.sun.jdi.connect.*;
34 import java.util.*;
35 import java.util.ArrayList;
36 
37 public class PlugAttachConnector005_02 extends PlugConnectors implements AttachingConnector {
38 
39     static String plugAttachConnectorName
40         = "PlugAttachConnector005_02_Name";
41     static String plugAttachConnectorDescription
42         = "PlugAttachConnector005_02_Description";
43     static Transport plugAttachConnectorTransport
44         = new PlugConnectorsTransport("PlugAttachConnector005_02_Transport");
45     static Map<String, Connector.Argument> plugAttachConnectorDefaultArguments
46         = new HashMap<String, Connector.Argument>();
47 
prepareConnectorDefaultArguments()48     static Map<String, Connector.Argument> prepareConnectorDefaultArguments() {
49         String plugAttachConnectorStringArgumentKey = "PlugAttachConnector005_02_StringArgument_Key";
50         Connector.StringArgument testStringArgument = new TestStringArgument(
51             "PlugAttachConnector005_02_StringArgument_Name",
52             "PlugAttachConnector005_02_StringArgument_Label",
53             "PlugAttachConnector005_02_StringArgument_Description",
54             "PlugAttachConnector005_02_StringArgument_Value",
55             true  // mustSpecify
56             );
57         plugAttachConnectorDefaultArguments.put(plugAttachConnectorStringArgumentKey, testStringArgument);
58 
59         String plugAttachConnectorIntegerArgumentKey = "PlugAttachConnector005_02_IntegerArgument_Key";
60         Connector.IntegerArgument testIntegerArgument = new TestIntegerArgument(
61             "PlugAttachConnector005_02_IntegerArgument_Name",
62             "PlugAttachConnector005_02_IntegerArgument_Label",
63             "PlugAttachConnector005_02_IntegerArgument_Description",
64             555555, // IntegerArgument_Value",
65             111111, // IntegerArgument_Min",
66             999999, // IntegerArgument_Max",
67             true    // mustSpecify
68             );
69         plugAttachConnectorDefaultArguments.put(plugAttachConnectorIntegerArgumentKey, testIntegerArgument);
70 
71         String plugAttachConnectorBooleanArgumentKey = "PlugAttachConnector005_02_BooleanArgument_Key";
72         Connector.BooleanArgument testBooleanArgument = new TestBooleanArgument(
73             "PlugAttachConnector005_02_BooleanArgument_Name",
74             "PlugAttachConnector005_02_BooleanArgument_Label",
75             "PlugAttachConnector005_02_BooleanArgument_Description",
76             true, // BooleanArgument_Value",
77             true    // mustSpecify
78             );
79         plugAttachConnectorDefaultArguments.put(plugAttachConnectorBooleanArgumentKey, testBooleanArgument);
80 
81         String plugAttachConnectorSelectedArgumentKey = "PlugAttachConnector005_02_SelectedArgument_Key";
82         List<String> selectedArgumentChoices = new ArrayList<String>();
83         selectedArgumentChoices.add("PlugAttachConnector005_02_SelectedArgument_Value_0");
84         selectedArgumentChoices.add("PlugAttachConnector005_02_SelectedArgument_Value");
85         selectedArgumentChoices.add("PlugAttachConnector005_02_SelectedArgument_Value_1");
86 
87         Connector.SelectedArgument testSelectedArgument = new TestSelectedArgument(
88             "PlugAttachConnector005_02_SelectedArgument_Name",
89             "PlugAttachConnector005_02_SelectedArgument_Label",
90             "PlugAttachConnector005_02_SelectedArgument_Description",
91             "PlugAttachConnector005_02_SelectedArgument_Value",
92             selectedArgumentChoices, // List of choices,
93             true    // mustSpecify
94             );
95         plugAttachConnectorDefaultArguments.put(plugAttachConnectorSelectedArgumentKey, testSelectedArgument);
96 
97         return plugAttachConnectorDefaultArguments;
98     }  // end of prepareConnectorDefaultArguments() method
99 
100 
PlugAttachConnector005_02()101     public PlugAttachConnector005_02() {
102 
103         super(plugAttachConnectorName,
104             plugAttachConnectorDescription,
105             plugAttachConnectorTransport,
106             prepareConnectorDefaultArguments());
107     }
108 
109 } // end of PlugAttachConnector005_02 class
110