Wed, 18 Aug 2021 12:47:32 +0200
#158 adds total number of comments
1 /*
2 * Copyright 2021 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 */
26 package de.uapcore.lightpit
28 object Constants {
29 /**
30 * The path where the JSP files reside.
31 */
32 const val JSP_PATH_PREFIX = "/WEB-INF/jsp/"
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"
39 /**
40 * Name for the context parameter specifying the available languages.
41 */
42 const val CTX_ATTR_LANGUAGES = "available-languages"
44 /**
45 * Name for the context parameter optionally specifying a database schema.
46 */
47 const val CTX_ATTR_DB_SCHEMA = "db-schema"
49 /**
50 * Name for the context parameter optionally specifying a database dialect.
51 */
52 const val CTX_ATTR_DB_DIALECT = "db-dialect"
54 /**
55 * Key for the request attribute containing the optional navigation menu.
56 */
57 const val REQ_ATTR_NAVIGATION = "navMenu"
59 /**
60 * Key for the request attribute containing the base href.
61 */
62 const val REQ_ATTR_BASE_HREF = "base_href"
64 /**
65 * Key for the request attribute containing the RSS feed href.
66 */
67 const val REQ_ATTR_FEED_HREF = "feed_href"
69 /**
70 * Key for the request attribute containing the full path information (servlet path + path info).
71 */
72 const val REQ_ATTR_PATH = "requestPath"
74 /**
75 * Key for the optional custom page title.
76 */
77 const val REQ_ATTR_PAGE_TITLE = "pageTitle"
79 /**
80 * Key for the name of the page which should be rendered.
81 */
82 const val REQ_ATTR_CONTENT_PAGE = "contentPage"
84 /**
85 * Key for the view model object (the type depends on the rendered site).
86 */
87 const val REQ_ATTR_VIEWMODEL = "viewmodel"
89 /**
90 * Key for the name of the additional stylesheet used by a module.
91 */
92 const val REQ_ATTR_STYLESHEET = "extraCss"
94 /**
95 * Key for the name of the optional java script file.
96 */
97 const val REQ_ATTR_JAVASCRIPT = "javascriptFile"
99 /**
100 * Key for a location the page shall redirect to.
101 * Will be used in a meta element.
102 */
103 const val REQ_ATTR_REDIRECT_LOCATION = "redirectLocation"
105 /**
106 * Key for the optional return link based on the referer header.
107 */
108 const val REQ_ATTR_REFERER = "returnLink"
110 /**
111 * Key for the current language selection within the session.
112 */
113 const val SESSION_ATTR_LANGUAGE = "language"
114 }