Thu, 14 May 2020 22:48:01 +0200
projects can now be added and updated
1
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
1 | /* |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
3 | * |
24 | 4 | * Copyright 2018 Mike Becker. All rights reserved. |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
5 | * |
1
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
6 | * Redistribution and use in source and binary forms, with or without |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
7 | * modification, are permitted provided that the following conditions are met: |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
8 | * |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
9 | * 1. Redistributions of source code must retain the above copyright |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
10 | * notice, this list of conditions and the following disclaimer. |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
11 | * |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
12 | * 2. Redistributions in binary form must reproduce the above copyright |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
13 | * notice, this list of conditions and the following disclaimer in the |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
14 | * documentation and/or other materials provided with the distribution. |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
15 | * |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
26 | * POSSIBILITY OF SUCH DAMAGE. |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
27 | * |
1
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
28 | */ |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
29 | package de.uapcore.lightpit; |
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
30 | |
11
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
31 | import static de.uapcore.lightpit.Functions.fqn; |
10
89e3e6e28b69
implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents:
7
diff
changeset
|
32 | |
6 | 33 | /** |
13
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
34 | * Contains all non-local scope constants used by the this application. |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
35 | * <p> |
13
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
36 | * Constants with (class) local scope are defined in their respective classes. |
6 | 37 | */ |
10
89e3e6e28b69
implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents:
7
diff
changeset
|
38 | public final class Constants { |
11
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
39 | public static final String JSP_PATH_PREFIX = "/WEB-INF/jsp/"; |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
40 | |
13
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
41 | public static final String DYN_FRAGMENT_PATH_PREFIX = "/WEB-INF/dynamic_fragments/"; |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
42 | |
47
57cfb94ab99f
projects can now be added and updated
Mike Becker <universe@uap-core.de>
parents:
45
diff
changeset
|
43 | public static final String DYN_FRAGMENT_COMMIT_SUCCESSFUL = "commit-successful"; |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
44 | |
13
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
45 | /** |
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
46 | * Name for the context parameter specifying the available languages. |
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
47 | */ |
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
48 | public static final String CTX_ATTR_LANGUAGES = "available-languages"; |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
49 | |
11
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
50 | /** |
16 | 51 | * Name for the context parameter optionally specifying the JNDI context; |
52 | */ | |
53 | public static final String CTX_ATTR_JNDI_CONTEXT = "jndi-context"; | |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
54 | |
16 | 55 | /** |
56 | * Name for the context parameter optionally specifying a database schema. | |
57 | */ | |
58 | public static final String CTX_ATTR_DB_SCHEMA = "db-schema"; | |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
59 | |
16 | 60 | /** |
19
1a0ac419f714
removes the privileged data source from the application and the ability to have a web UI for a setup
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
61 | * Name for the context parameter optionally specifying a database dialect. |
1a0ac419f714
removes the privileged data source from the application and the ability to have a web UI for a setup
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
62 | */ |
1a0ac419f714
removes the privileged data source from the application and the ability to have a web UI for a setup
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
63 | public static final String CTX_ATTR_DB_DIALECT = "db-dialect"; |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
64 | |
19
1a0ac419f714
removes the privileged data source from the application and the ability to have a web UI for a setup
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
65 | /** |
11
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
66 | * Key for the request attribute containing the {@link LightPITModule} information of the currently dispatching module. |
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
67 | */ |
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
68 | public static final String REQ_ATTR_MODULE_INFO = fqn(AbstractLightPITServlet.class, "moduleInfo"); |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
69 | |
11
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
70 | /** |
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
71 | * Key for the request attribute containing the menu list. |
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
72 | */ |
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
73 | public static final String REQ_ATTR_MENU = fqn(AbstractLightPITServlet.class, "mainMenu"); |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
74 | |
11
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
75 | /** |
45
cc7f082c5ef3
simplifies menu generation, adds submenus and removes VersionsModule (versions will be part of the ProjectsModule)
Mike Becker <universe@uap-core.de>
parents:
34
diff
changeset
|
76 | * Key for the request attribute containing the sub menu list. |
cc7f082c5ef3
simplifies menu generation, adds submenus and removes VersionsModule (versions will be part of the ProjectsModule)
Mike Becker <universe@uap-core.de>
parents:
34
diff
changeset
|
77 | */ |
cc7f082c5ef3
simplifies menu generation, adds submenus and removes VersionsModule (versions will be part of the ProjectsModule)
Mike Becker <universe@uap-core.de>
parents:
34
diff
changeset
|
78 | public static final String REQ_ATTR_SUB_MENU = fqn(AbstractLightPITServlet.class, "subMenu"); |
cc7f082c5ef3
simplifies menu generation, adds submenus and removes VersionsModule (versions will be part of the ProjectsModule)
Mike Becker <universe@uap-core.de>
parents:
34
diff
changeset
|
79 | |
cc7f082c5ef3
simplifies menu generation, adds submenus and removes VersionsModule (versions will be part of the ProjectsModule)
Mike Becker <universe@uap-core.de>
parents:
34
diff
changeset
|
80 | /** |
47
57cfb94ab99f
projects can now be added and updated
Mike Becker <universe@uap-core.de>
parents:
45
diff
changeset
|
81 | * Key for the request attribute containing the base href. |
57cfb94ab99f
projects can now be added and updated
Mike Becker <universe@uap-core.de>
parents:
45
diff
changeset
|
82 | */ |
57cfb94ab99f
projects can now be added and updated
Mike Becker <universe@uap-core.de>
parents:
45
diff
changeset
|
83 | public static final String REQ_ATTR_BASE_HREF = fqn(AbstractLightPITServlet.class, "base_href"); |
57cfb94ab99f
projects can now be added and updated
Mike Becker <universe@uap-core.de>
parents:
45
diff
changeset
|
84 | |
57cfb94ab99f
projects can now be added and updated
Mike Becker <universe@uap-core.de>
parents:
45
diff
changeset
|
85 | /** |
11
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
86 | * Key for the request attribute containing the full path information (servlet path + path info). |
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
87 | */ |
737ab27e37b3
implements simple request mapper
Mike Becker <universe@uap-core.de>
parents:
10
diff
changeset
|
88 | public static final String REQ_ATTR_PATH = fqn(AbstractLightPITServlet.class, "path"); |
13
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
89 | |
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
90 | /** |
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
91 | * Key for the name of the fragment which should be rendered. |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
92 | */ |
13
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
93 | public static final String REQ_ATTR_FRAGMENT = fqn(AbstractLightPITServlet.class, "fragment"); |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
94 | |
13
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
95 | /** |
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
96 | * Key for the name of the additional stylesheet used by a module. |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
97 | */ |
13
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
98 | public static final String REQ_ATTR_STYLESHEET = fqn(AbstractLightPITServlet.class, "extraCss"); |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
99 | |
47
57cfb94ab99f
projects can now be added and updated
Mike Becker <universe@uap-core.de>
parents:
45
diff
changeset
|
100 | /** |
57cfb94ab99f
projects can now be added and updated
Mike Becker <universe@uap-core.de>
parents:
45
diff
changeset
|
101 | * Key for a location the page shall redirect to. |
57cfb94ab99f
projects can now be added and updated
Mike Becker <universe@uap-core.de>
parents:
45
diff
changeset
|
102 | * Will be used in a meta element. |
57cfb94ab99f
projects can now be added and updated
Mike Becker <universe@uap-core.de>
parents:
45
diff
changeset
|
103 | */ |
57cfb94ab99f
projects can now be added and updated
Mike Becker <universe@uap-core.de>
parents:
45
diff
changeset
|
104 | public static final String REQ_ATTR_REDIRECT_LOCATION = fqn(AbstractLightPITServlet.class, "redirectLocation"); |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
105 | |
13
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
106 | /** |
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
107 | * Key for the current language selection within the session. |
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
108 | */ |
f4608ad6c947
adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
11
diff
changeset
|
109 | public static final String SESSION_ATTR_LANGUAGE = fqn(AbstractLightPITServlet.class, "language"); |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
110 | |
10
89e3e6e28b69
implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents:
7
diff
changeset
|
111 | /** |
89e3e6e28b69
implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents:
7
diff
changeset
|
112 | * This class is not instantiatable. |
89e3e6e28b69
implements automatic menu generation from module information
Mike Becker <universe@uap-core.de>
parents:
7
diff
changeset
|
113 | */ |
34
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
114 | private Constants() { |
824d4042c857
cleanup and simplification of database access layer
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
115 | } |
1
34241be7db73
adds HomeServerlet and Resource Bundle
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
116 | } |