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

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

mercurial