src/main/kotlin/de/uapcore/lightpit/Constants.kt

Mon, 04 Jan 2021 12:45:22 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 04 Jan 2021 12:45:22 +0100
changeset 172
89b3320557e2
parent 158
4f912cd42876
child 180
009700915269
permissions
-rw-r--r--

fixes #120 - thin border rendering for Chrome

158
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 /*
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 * Copyright 2020 Mike Becker. All rights reserved.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 *
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 * Redistribution and use in source and binary forms, with or without
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 * modification, are permitted provided that the following conditions are met:
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 *
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 * 1. Redistributions of source code must retain the above copyright
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 * notice, this list of conditions and the following disclaimer.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 *
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 * 2. Redistributions in binary form must reproduce the above copyright
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 * notice, this list of conditions and the following disclaimer in the
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 * documentation and/or other materials provided with the distribution.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 *
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 package de.uapcore.lightpit
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 object Constants {
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30 * The path where the JSP files reside.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32 const val JSP_PATH_PREFIX = "/WEB-INF/jsp/"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35 * The name of the generic JSP page that is displayed after a successful commit.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37 const val JSP_COMMIT_SUCCESSFUL = "commit-successful"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 * Name for the context parameter specifying the available languages.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42 const val CTX_ATTR_LANGUAGES = "available-languages"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45 * Name for the context parameter optionally specifying a database schema.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 const val CTX_ATTR_DB_SCHEMA = "db-schema"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 * Name for the context parameter optionally specifying a database dialect.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 const val CTX_ATTR_DB_DIALECT = "db-dialect"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 * Key for the request attribute containing the resource bundle name.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57 const val REQ_ATTR_RESOURCE_BUNDLE = "bundleName"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
58
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
60 * Key for the request attribute containing the optional navigation menu jsp.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
61 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
62 const val REQ_ATTR_NAVIGATION = "navMenu"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
65 * Key for the request attribute containing the base href.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 const val REQ_ATTR_BASE_HREF = "base_href"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
68
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
69 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
70 * Key for the request attribute containing the full path information (servlet path + path info).
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
71 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
72 const val REQ_ATTR_PATH = "requestPath"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
74 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75 * Key for the name of the page which should be rendered.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
76 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
77 const val REQ_ATTR_CONTENT_PAGE = "contentPage"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
78
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
79 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
80 * Key for the view model object (the type depends on the rendered site).
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
81 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
82 const val REQ_ATTR_VIEWMODEL = "viewmodel"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 * Key for the name of the additional stylesheet used by a module.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 const val REQ_ATTR_STYLESHEET = "extraCss"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
90 * Key for a location the page shall redirect to.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
91 * Will be used in a meta element.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93 const val REQ_ATTR_REDIRECT_LOCATION = "redirectLocation"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95 /**
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
96 * Key for the current language selection within the session.
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
97 */
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
98 const val SESSION_ATTR_LANGUAGE = "language"
4f912cd42876 migrates constants and removes global functions
Mike Becker <universe@uap-core.de>
parents:
diff changeset
99 }

mercurial