Package org.ametys.web.cache
Class FOCommHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.cache.FOCommHelper
- All Implemented Interfaces:
DeferredServiceable,LogEnabled,Disposable,Initializable,Component
public final class FOCommHelper
extends AbstractLogEnabled
implements Component, DeferredServiceable, Initializable, Disposable
Helper for dealing with front-office cache.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult of a request to a front-office -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRequest the given URL on each configured front-office.Request the given URL on each configured front-office.voiddeferredService(ServiceManager manager) Pass theServiceManagerused to access other components.voiddispose()String[]Get front office applications urlsvoidvoidinvalidateFOCache(Page page) Invalidates the front-office from the event observed.voidinvalidateFOCache(Page page, boolean recursively) Invalidates the front-office from the event observed.voidinvalidateFOCache(Site site) Invalidates the front-office cache, a delay may be apply to comply with the minimum refresh period configured in the site.voidinvalidateFOCache(Sitemap sitemap) Invalidates the front-office from the event observed.voidinvalidateFOCacheImmediately(String siteName) Invalidate the site caches without delay.voidRequest the given URL on each configured front-office.voidRequest the given URL on each configured front-office.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon Role
-
-
Constructor Details
-
FOCommHelper
public FOCommHelper()
-
-
Method Details
-
deferredService
Description copied from interface:DeferredServiceablePass theServiceManagerused to access other components.- Specified by:
deferredServicein interfaceDeferredServiceable- Parameters:
manager- TheServiceManagerwhich thisDeferredServiceableuses. Must not benull.- Throws:
ServiceException- if an error occurs
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
dispose
- Specified by:
disposein interfaceDisposable
-
testWS
Request the given URL on each configured front-office.- Parameters:
url- the url to be called.- Throws:
Exception- if an error occurred.
-
testWS
Request the given URL on each configured front-office.- Parameters:
url- the url to be called.postParameters- submited values- Throws:
Exception- if an error occurred.
-
callWS
Request the given URL on each configured front-office.- Parameters:
url- the url to be called.- Returns:
- The streams
- Throws:
Exception- if an error occurred.
-
getFrontURLS
Get front office applications urls- Returns:
- The non null list of url configured. Can be empty.
-
callWS
public List<FOCommHelper.FOResult> callWS(String url, List<Pair<String, String>> postParameters) throws ExceptionRequest the given URL on each configured front-office.- Parameters:
url- the url to be called.postParameters- submitted values- Returns:
- The streams
- Throws:
Exception- if an error occurred.
-
invalidateFOCache
Invalidates the front-office cache, a delay may be apply to comply with the minimum refresh period configured in the site.- Parameters:
site- the site.- Throws:
Exception- if an error occurs.
-
invalidateFOCacheImmediately
Invalidate the site caches without delay.- Parameters:
siteName- The site name- Throws:
Exception- if an error occurs
-
invalidateFOCache
Invalidates the front-office from the event observed.- Parameters:
sitemap- the sitemap.- Throws:
Exception- if an error occurs.
-
invalidateFOCache
Invalidates the front-office from the event observed.- Parameters:
page- the page.recursively- true to invalidate the sub-pages- Throws:
Exception- if an error occurs.
-
invalidateFOCache
Invalidates the front-office from the event observed.- Parameters:
page- the page.- Throws:
Exception- if an error occurs.
-