-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36ea4b3
commit 42e4e06
Showing
14 changed files
with
168 additions
and
100 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 |
---|---|---|
@@ -1 +1 @@ | ||
javax.portlet.title.EXT_CONFIGURATION=Configuration Cache | ||
com.dotcms.repackage.javax.portlet.title.EXT_CONFIGURATION=Configuration Cache |
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
Binary file not shown.
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
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
44 changes: 0 additions & 44 deletions
44
Configuration/src/nl/isaac/dotcms/plugin/configuration/filter/RequestStoringFilter.java
This file was deleted.
Oops, something went wrong.
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
44 changes: 44 additions & 0 deletions
44
Configuration/src/nl/isaac/dotcms/plugin/configuration/listener/RequestStoringListener.java
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package nl.isaac.dotcms.plugin.configuration.listener; | ||
/** | ||
* dotCMS Configuration plugin by ISAAC - The Full Service Internet Agency is licensed | ||
* under a Creative Commons Attribution 3.0 Unported License | ||
* - http://creativecommons.org/licenses/by/3.0/ | ||
* - http://www.geekyplugins.com/ | ||
* | ||
* @copyright Copyright (c) 2011 ISAAC Software Solutions B.V. (http://www.isaac.nl) | ||
*/ | ||
|
||
import javax.servlet.ServletRequestEvent; | ||
import javax.servlet.ServletRequestListener; | ||
import javax.servlet.http.HttpServletRequest; | ||
|
||
import nl.isaac.dotcms.plugin.configuration.ConfigurationService; | ||
import nl.isaac.dotcms.plugin.configuration.ConfigurationService.ConfigurationParameters; | ||
|
||
/** | ||
* The only purpose of this class is to set and clear the default parameters for {@link ConfigurationService} while the request is active. | ||
* @author maarten | ||
* | ||
*/ | ||
public class RequestStoringListener implements ServletRequestListener { | ||
|
||
@Override | ||
public void requestInitialized(ServletRequestEvent sre) { | ||
if (sre.getServletRequest() instanceof HttpServletRequest) { | ||
final ConfigurationParameters previousParams = ConfigurationService.getDefaultParameters(); | ||
ConfigurationService.storeDefaultParameters(new RequestBasedConfigurationParameters((HttpServletRequest) sre.getServletRequest(), previousParams)); | ||
} | ||
} | ||
|
||
@Override | ||
public void requestDestroyed(ServletRequestEvent sre) { | ||
final ConfigurationParameters current = ConfigurationService.getDefaultParameters(); | ||
if (current instanceof RequestBasedConfigurationParameters | ||
&& ((RequestBasedConfigurationParameters) current).getPrevious() != null) { | ||
ConfigurationService.storeDefaultParameters(((RequestBasedConfigurationParameters) current).getPrevious()); | ||
} else { | ||
ConfigurationService.clearDefaultParameters(); | ||
} | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...configuration/filter/SessionListener.java → ...nfiguration/listener/SessionListener.java
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
Oops, something went wrong.