LanEventPropertyKey.java
3.41 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
/*
* Copyright Codecrew Ry
*
* All rights reserved.
*
* This license applies to any software containing a notice placed by the
* copyright holder. Such software is herein referred to as the Software.
* This license covers modification, distribution and use of the Software.
*
* Any distribution and use in source and binary forms, with or without
* modification is not permitted without explicit written permission from the
* copyright owner.
*
* A non-exclusive royalty-free right is granted to the copyright owner of the
* Software to use, modify and distribute all modifications to the Software in
* future versions of the Software.
*
*/
package fi.codecrew.moya.model;
public enum LanEventPropertyKey {
EVENT_LOGO(Type.DATA),
INVITEMAIL_SUBJECT(Type.TEXT, "Invitation to Moya Online Youth Accumulator"),
INVITEMAIL_CONTENT(Type.TEXT, "You have been invited to an event by {1}.\n\nYou can register to intranet at: {0}."),
BILL_PAID_MAIL_SUBJECT(Type.TEXT, "[{0}] Lasku merkitty maksetuksi"),
BILL_PAID_MAIL_CONTENT(Type.TEXT, "Laskusi numero {0} on merkitty maksetuksi. Voit nyt siirtyä lippukauppaan varamaan haluamasi paikat. Tervetuloa tapahtumaan!"),
PORTAL_EMAIL_ADDRESS(Type.TEXT, "moya@codecrew.fi"),
PORTAL_EMAIL_NAME(Type.TEXT, "Moya Online Youth Accumulator"),
ADMIN_MAIL(Type.TEXT, "moya@codecrew.fi"),
EVENT_LAYOUT(Type.TEXT, "primelayout"),
SHOP_DEFAULT_CASH(Type.BOOL),
PLACECODE_FROM_USER(Type.BOOL, "1"),
PLACECODE_PRINT_ONLY_OWN(Type.BOOL),
CHECK_BILL_STATS_PERMISSION(Type.BOOL),
GATHER_OTHER_BILL_INFO(Type.BOOL),
GATHER_SHIRT_SIZE(Type.BOOL),
ALLOW_BILLING(Type.BOOL),
BILL_EXPIRE_HOURS(Type.LONG, 1l),
TEMPLATE_PROPERTY1(Type.TEXT),
TEMPLATE_PROPERTY2(Type.TEXT),
TEMPLATE_PROPERTY3(Type.TEXT),
TEMPLATE_PROPERTY4(Type.TEXT),
TEMPLATE_PROPERTY5(Type.TEXT),
INVITE_ONLY_EVENT(Type.BOOL),
USE_ETICKET(Type.BOOL, "1"),
ETICKETMAIL_SUBJECT(Type.TEXT, "Your etickets to Moya Online Youth Accumulator"),
ETICKETMAIL_CONTENT(Type.TEXT, "Hello {1},\n\nYou can find your etickets to an event from: {0}"),
/**
* Should users be put to queue when reserving places from map, ie. only a
* limited number of people can reserve places at once.
*/
MAP_QUEUE(Type.BOOL),
DISABLE_PHOTO_ON_KIOSK(Type.BOOL),
/**
* How many percent of the available places can be locked by one unpaid and
* unexpired bill
*/
RESERVE_UNPAID_SLOT_PERCENT(Type.LONG, 10l),
/**
* ISO 4217 code of currency.
*/
EVENT_CURRENCY_CODE(Type.TEXT, "EUR");
;
private enum Type {
TEXT, DATE, DATA, BOOL, LONG
};
private final String defaultvalue;
private final Type type;
private final long defaultLong;
public boolean isText() {
return Type.TEXT.equals(type);
}
public boolean isDate() {
return Type.DATE.equals(type);
}
public boolean isData() {
return Type.DATA.equals(type);
}
public boolean isBoolean() {
return Type.BOOL.equals(type);
}
public boolean isLong() {
return Type.LONG.equals(type);
}
private LanEventPropertyKey(Type t)
{
this.type = t;
defaultvalue = null;
defaultLong = 0;
}
private LanEventPropertyKey(Type t, String def)
{
this.type = t;
defaultvalue = def;
defaultLong = 0;
}
private LanEventPropertyKey(Type t, Long def)
{
this.type = t;
defaultvalue = null;
defaultLong = def;
}
public String getDefaultvalue() {
return defaultvalue;
}
public Type getType() {
return type;
}
public Long getDefaultLong() {
return defaultLong;
}
}