Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
d047382a
Commit
d047382a
authored
6 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-3874: allow configuration of PDF generator in olat.local.properties
parent
fe55fa22
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/core/commons/services/pdf/PdfModule.java
+5
-1
5 additions, 1 deletion
...in/java/org/olat/core/commons/services/pdf/PdfModule.java
with
5 additions
and
1 deletion
src/main/java/org/olat/core/commons/services/pdf/PdfModule.java
+
5
−
1
View file @
d047382a
...
@@ -43,6 +43,8 @@ public class PdfModule extends AbstractSpringModule implements ConfigOnOff {
...
@@ -43,6 +43,8 @@ public class PdfModule extends AbstractSpringModule implements ConfigOnOff {
@Value
(
"${pdf.service.enabled:false}"
)
@Value
(
"${pdf.service.enabled:false}"
)
private
boolean
enabled
;
private
boolean
enabled
;
@Value
(
"${pdf.service.spi:}"
)
private
String
pdfSpiId
;
@Autowired
@Autowired
private
List
<
PdfSPI
>
pdfSpies
;
private
List
<
PdfSPI
>
pdfSpies
;
...
@@ -69,7 +71,7 @@ public class PdfModule extends AbstractSpringModule implements ConfigOnOff {
...
@@ -69,7 +71,7 @@ public class PdfModule extends AbstractSpringModule implements ConfigOnOff {
enabled
=
"true"
.
equals
(
enabledObj
);
enabled
=
"true"
.
equals
(
enabledObj
);
}
}
String
spiObj
=
getStringPropertyValue
(
PDF_SPI
,
true
);
String
spiObj
=
getStringPropertyValue
(
PDF_SPI
,
pdfSpiId
);
if
(
StringHelper
.
containsNonWhitespace
(
spiObj
))
{
if
(
StringHelper
.
containsNonWhitespace
(
spiObj
))
{
for
(
PdfSPI
spi:
pdfSpies
)
{
for
(
PdfSPI
spi:
pdfSpies
)
{
if
(
spiObj
.
equals
(
spi
.
getId
()))
{
if
(
spiObj
.
equals
(
spi
.
getId
()))
{
...
@@ -100,8 +102,10 @@ public class PdfModule extends AbstractSpringModule implements ConfigOnOff {
...
@@ -100,8 +102,10 @@ public class PdfModule extends AbstractSpringModule implements ConfigOnOff {
public
void
setPdfServiceProvider
(
PdfSPI
pdfSpi
)
{
public
void
setPdfServiceProvider
(
PdfSPI
pdfSpi
)
{
this
.
pdfSpi
=
pdfSpi
;
this
.
pdfSpi
=
pdfSpi
;
if
(
pdfSpi
==
null
)
{
if
(
pdfSpi
==
null
)
{
pdfSpiId
=
null
;
removeProperty
(
PDF_SPI
,
true
);
removeProperty
(
PDF_SPI
,
true
);
}
else
{
}
else
{
pdfSpiId
=
pdfSpi
.
getId
();
setStringProperty
(
PDF_SPI
,
pdfSpi
.
getId
(),
true
);
setStringProperty
(
PDF_SPI
,
pdfSpi
.
getId
(),
true
);
}
}
}
}
...
...
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