Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xnat-web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dhcp
xnat-web
Commits
b03f3b2b
Commit
b03f3b2b
authored
8 years ago
by
Mike McKay
Browse files
Options
Downloads
Patches
Plain Diff
Moved XnatAppInfo to use new way of accessing site config preferences.
parent
87f20105
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/nrg/xnat/initialization/RootConfig.java
+2
-2
2 additions, 2 deletions
src/main/java/org/nrg/xnat/initialization/RootConfig.java
src/main/java/org/nrg/xnat/services/XnatAppInfo.java
+5
-4
5 additions, 4 deletions
src/main/java/org/nrg/xnat/services/XnatAppInfo.java
with
7 additions
and
6 deletions
src/main/java/org/nrg/xnat/initialization/RootConfig.java
+
2
−
2
View file @
b03f3b2b
...
...
@@ -51,8 +51,8 @@ import java.util.Properties;
@Import
({
PropertiesConfig
.
class
,
DatabaseConfig
.
class
,
SecurityConfig
.
class
,
ApplicationConfig
.
class
})
public
class
RootConfig
{
@Bean
public
XnatAppInfo
appInfo
(
final
ServletContext
context
,
final
SerializerService
serializerService
,
final
JdbcTemplate
template
)
throws
IOException
{
return
new
XnatAppInfo
(
context
,
serializerService
,
template
);
public
XnatAppInfo
appInfo
(
final
SiteConfigPreferences
preferences
,
final
ServletContext
context
,
final
SerializerService
serializerService
,
final
JdbcTemplate
template
)
throws
IOException
{
return
new
XnatAppInfo
(
preferences
,
context
,
serializerService
,
template
);
}
@Bean
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/nrg/xnat/services/XnatAppInfo.java
+
5
−
4
View file @
b03f3b2b
...
...
@@ -4,7 +4,7 @@ import com.fasterxml.jackson.databind.JsonNode;
import
com.fasterxml.jackson.databind.node.ArrayNode
;
import
org.nrg.framework.services.SerializerService
;
import
org.nrg.prefs.exceptions.InvalidPreferenceName
;
import
org.nrg.xdat.
XDAT
;
import
org.nrg.xdat.
preferences.SiteConfigPreferences
;
import
org.python.google.common.collect.ImmutableMap
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -47,7 +47,8 @@ public class XnatAppInfo {
private
static
final
String
SECONDS
=
"seconds"
;
@Inject
public
XnatAppInfo
(
final
ServletContext
context
,
final
SerializerService
serializerService
,
final
JdbcTemplate
template
)
throws
IOException
{
public
XnatAppInfo
(
final
SiteConfigPreferences
preferences
,
final
ServletContext
context
,
final
SerializerService
serializerService
,
final
JdbcTemplate
template
)
throws
IOException
{
_preferences
=
preferences
;
_template
=
template
;
final
Resource
configuredUrls
=
RESOURCE_LOADER
.
getResource
(
"classpath:META-INF/xnat/security/configured-urls.yaml"
);
...
...
@@ -175,7 +176,7 @@ public class XnatAppInfo {
new
Object
[]{
_foundPreferences
.
get
(
pref
),
pref
},
new
int
[]{
Types
.
VARCHAR
,
Types
.
VARCHAR
}
);
try
{
XDAT
.
getSiteConfigP
references
()
.
set
(
_foundPreferences
.
get
(
pref
),
pref
);
_p
references
.
set
(
_foundPreferences
.
get
(
pref
),
pref
);
}
catch
(
InvalidPreferenceName
e
)
{
_log
.
error
(
""
,
e
);
}
catch
(
NullPointerException
e
)
{
...
...
@@ -452,7 +453,7 @@ public class XnatAppInfo {
private
final
String
_nonAdminErrorPath
;
private
final
Pattern
_nonAdminErrorPathPattern
;
private
final
AntPathRequestMatcher
_nonAdminErrorPathMatcher
;
private
final
SiteConfigPreferences
_preferences
;
private
final
Map
<
String
,
AntPathRequestMatcher
>
_openUrls
=
new
HashMap
<>();
private
final
Map
<
String
,
AntPathRequestMatcher
>
_adminUrls
=
new
HashMap
<>();
private
final
Map
<
String
,
AntPathRequestMatcher
>
_initPaths
=
new
HashMap
<>();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment