forked from piranhacloud/piranha
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'current' into issue-4212
- Loading branch information
Showing
3 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,10 +30,10 @@ | |
import cloud.piranha.core.api.WebApplication; | ||
import cloud.piranha.core.api.WebApplicationExtension; | ||
import java.lang.System.Logger; | ||
import static java.lang.System.Logger.Level.DEBUG; | ||
import static java.lang.System.Logger.Level.TRACE; | ||
|
||
/** | ||
* The WebApplicationExtension that adds the TempDirServletContainerInitializer. | ||
* The WebApplicationExtension that configures the TEMPDIR functionality. | ||
* | ||
* @author Manfred Riem ([email protected]) | ||
*/ | ||
|
@@ -44,9 +44,18 @@ public class TempDirExtension implements WebApplicationExtension { | |
*/ | ||
private static final Logger LOGGER = System.getLogger(TempDirExtension.class.getName()); | ||
|
||
/** | ||
* Constructor. | ||
*/ | ||
public TempDirExtension() { | ||
} | ||
|
||
@Override | ||
public void configure(WebApplication webApplication) { | ||
LOGGER.log(DEBUG, "Adding the TempDirServletContainerInitializer"); | ||
webApplication.addInitializer(new TempDirServletContainerInitializer()); | ||
LOGGER.log(TRACE, "Configuring the TEMPDIR extension"); | ||
|
||
if (Boolean.parseBoolean(System.getProperty("cloud.piranha.extension.tempdir.TempDirExtension.enabled", "true"))) { | ||
webApplication.addInitializer(new TempDirServletContainerInitializer()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,21 @@ | |
/** | ||
* This module delivers the TEMPDIR extension. | ||
* | ||
* <p> | ||
* The following property can be used to influence the workings of this module. | ||
* </p> | ||
* <table> | ||
* <tr> | ||
* <th>Property</th> | ||
* <th>Notes</th> | ||
* </tr> | ||
* <tr> | ||
* <td>cloud.piranha.extension.tempdir.TempDirExtension.enabled</td> | ||
* <td>true to enable (default), false to disable</td> | ||
* </tr> | ||
* <caption>Configurable properties</caption> | ||
* </table> | ||
* | ||
* @author Manfred Riem ([email protected]) | ||
*/ | ||
module cloud.piranha.extension.tempdir { | ||
|