forked from emigonza/JavaPOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJposEntryConst.java
More file actions
168 lines (136 loc) · 6.56 KB
/
Copy pathJposEntryConst.java
File metadata and controls
168 lines (136 loc) · 6.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
package jpos.config;
///////////////////////////////////////////////////////////////////////////////
//
// This software is provided "AS IS". The JavaPOS working group (including
// each of the Corporate members, contributors and individuals) MAKES NO
// REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE,
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NON-INFRINGEMENT. The JavaPOS working group shall not be liable for
// any damages suffered as a result of using, modifying or distributing this
// software or its derivatives. Permission to use, copy, modify, and distribute
// the software and its documentation for any purpose is hereby granted.
//
// The JavaPOS Config/Loader (aka JCL) is now under the CPL license, which
// is an OSS Apache-like license. The complete license is located at:
// http://oss.software.ibm.com/developerworks/opensource/license-cpl.html
//
///////////////////////////////////////////////////////////////////////////////
import java.io.Serializable;
/**
* Defines constants for standard properties names and values used to create
* JposEntries...
* @since 1.3 (Berlin 2K meeting)
* @author E. Michael Maximilien ([email protected])
*/
public interface JposEntryConst extends RS232Const, Serializable
{
//-------------------------------------------------------------------------
// Required properties array
//
/**
* Array of all required properties
* @since 1.3 (Washington 2001 meeting)
*/
public static final String[] REQUIRED_PROPS =
{
JposEntry.SI_FACTORY_CLASS_PROP_NAME,
JposEntry.LOGICAL_NAME_PROP_NAME,
JposEntry.SERVICE_CLASS_PROP_NAME,
JposEntry.VENDOR_NAME_PROP_NAME,
JposEntry.VENDOR_URL_PROP_NAME,
JposEntry.DEVICE_CATEGORY_PROP_NAME,
JposEntry.JPOS_VERSION_PROP_NAME,
JposEntry.PRODUCT_NAME_PROP_NAME,
JposEntry.PRODUCT_DESCRIPTION_PROP_NAME,
JposEntry.PRODUCT_URL_PROP_NAME
};
//-------------------------------------------------------------------------
// Required properties default values
//
public static final String LOGICAL_NAME_DEFAULT_PROP_VALUE =
"UnknownDevice";
public static final String SI_FACTORY_CLASS_DEFAULT_PROP_VALUE =
"UnknownServiceInstanceFactoryClass";
public static final String SERVICE_CLASS_DEFAULT_PROP_VALUE =
"UnknownServiceClass";
public static final String DEVICE_CATEGORY_DEFAULT_PROP_VALUE =
"CashDrawer";
public static final String JPOS_VERSION_DEFAULT_PROP_VALUE = "1.5";
public static final String VENDOR_NAME_DEFAULT_PROP_VALUE =
"Unknown Vendor Name";
public static final String VENDOR_URL_DEFAULT_PROP_VALUE =
"http://www.UnknownVerdorURL.com";
public static final String PRODUCT_NAME_DEFAULT_PROP_VALUE =
"Unknown Product Name";
public static final String PRODUCT_URL_DEFAULT_PROP_VALUE =
"http://www.UnknownProductURL.com";
public static final String PRODUCT_DESCRIPTION_DEFAULT_PROP_VALUE =
"Unknown Product Description";
/** @return an array of all compatible JavaPOS version values */
public static final String[] JPOS_VERSION_PROPS =
{ "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8" };
//-------------------------------------------------------------------------
// Standard properties name and values
//
//Property names
/** Required property indicating the BUS used for this JposEntry */
public static final String DEVICE_BUS_PROP_NAME = "deviceBus";
//Property values
/** Property value for deviceBus for RS232 */
public static final String RS232_DEVICE_BUS = "RS232";
/** Property value for deviceBus for standard Parallel ports */
public static final String PARALLEL_DEVICE_BUS = "Parallel";
/** Property value for deviceBus for USB */
public static final String USB_DEVICE_BUS = "USB";
/** Property value for deviceBus for RS485 (or SIO) */
public static final String RS485_DEVICE_BUS = "RS485";
/** Property value for deviceBus for HID (or Human Inferface Device) */
public static final String HID_DEVICE_BUS = "HID";
/** Property value for deviceBus for proprietary buses */
public static final String PROPRIETARY_DEVICE_BUS = "Proprietary";
/** Property value for deviceBus for other "Unknown" buses */
public static final String UNKNOWN_DEVICE_BUS = "Unknown";
/** Array of all the deviceBus property values */
public static final String[] DEVICE_BUS_VALUES =
{
RS232_DEVICE_BUS,
PARALLEL_DEVICE_BUS,
USB_DEVICE_BUS,
RS485_DEVICE_BUS,
HID_DEVICE_BUS,
PROPRIETARY_DEVICE_BUS,
UNKNOWN_DEVICE_BUS
};
//-------------------------------------------------------------------------
// Property types allowed
//
/** The default JposEntry property type */
public static final Class DEFAULT_PROP_TYPE = String.class;
/** Array of all the property types allowed for a JposEntry property */
public static final Class[] PROP_TYPES =
{
String.class,
Boolean.class,
Byte.class,
Character.class,
Double.class,
Float.class,
Integer.class,
Long.class,
Short.class
};
/** Array of all the property types allowed for a JposEntry property */
public static final String[] PROP_TYPES_SHORT_NAMES =
{
"String",
"Boolean",
"Byte",
"Character",
"Double",
"Float",
"Integer",
"Long",
"Short"
};
}