Class ThreadlocalWebResourceDependenciesRecorder
- java.lang.Object
-
- com.atlassian.confluence.api.impl.service.content.ThreadlocalWebResourceDependenciesRecorder
-
- All Implemented Interfaces:
WebResourceDependenciesRecorder
public class ThreadlocalWebResourceDependenciesRecorder extends Object implements WebResourceDependenciesRecorder
Implements recording of webresource dependencies via a thread local mechanism. Internally will use thePageBuilderService
to do the webresource resolution.- Since:
- 5.9
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.confluence.plugin.webresource.WebResourceDependenciesRecorder
WebResourceDependenciesRecorder.RecordedResources
-
-
Constructor Summary
Constructors Constructor Description ThreadlocalWebResourceDependenciesRecorder(com.atlassian.webresource.api.assembler.WebResourceAssemblerFactory webResourceAssemblerFactory, com.atlassian.plugin.webresource.assembler.LegacyPageBuilderService pageBuilderService)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T> com.atlassian.fugue.Pair<T,WebResourceDependenciesRecorder.RecordedResources>
record(Iterable<String> additionalContexts, Iterable<String> additionalResources, boolean includeSuperbatch, Callable<T> callback)
Deprecated.since 7.0.1.<T> com.atlassian.fugue.Pair<T,WebResourceDependenciesRecorder.RecordedResources>
record(Iterable<String> additionalContexts, Iterable<String> additionalResources, Iterable<String> excludeContexts, Iterable<String> excludeResources, boolean includeSuperbatch, Callable<T> callback)
Deprecated.since 7.0.1.<T> com.atlassian.fugue.Pair<T,WebResourceDependenciesRecorder.RecordedResources>
record(Iterable<String> additionalContexts, Iterable<String> additionalResources, Callable<T> callback)
Deprecated.since 7.0.1.<T> com.atlassian.fugue.Pair<T,WebResourceDependenciesRecorder.RecordedResources>
record(Callable<T> callback)
Deprecated.since 7.0.1.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.plugin.webresource.WebResourceDependenciesRecorder
recordResources, recordResources, recordResources, recordResources
-
-
-
-
Method Detail
-
record
@Deprecated public <T> com.atlassian.fugue.Pair<T,WebResourceDependenciesRecorder.RecordedResources> record(Iterable<String> additionalContexts, Iterable<String> additionalResources, Callable<T> callback) throws Exception
Deprecated.Description copied from interface:WebResourceDependenciesRecorder
Same as callingWebResourceDependenciesRecorder.recordResources(Iterable, Iterable, boolean, Callable)
, but with superbatch set to false.- Specified by:
record
in interfaceWebResourceDependenciesRecorder
- Type Parameters:
T
- the return value of the callback.- Parameters:
additionalContexts
- the context that should be added to the set of webresources (which may not be in the callback)additionalResources
- the additional resources that should be added to the set of webresources (which may not be in the callback)callback
- the code to execute during recording- Returns:
- a pair of objects. Left is the value returned by the callback, right is the set of webresources that is assembled during the execution of the given callback.
- Throws:
Exception
- if the callback threw an exception.
-
record
@Deprecated public <T> com.atlassian.fugue.Pair<T,WebResourceDependenciesRecorder.RecordedResources> record(Iterable<String> additionalContexts, Iterable<String> additionalResources, boolean includeSuperbatch, Callable<T> callback) throws Exception
Deprecated.Description copied from interface:WebResourceDependenciesRecorder
Records the webresources used during the execution of the given callback.- Specified by:
record
in interfaceWebResourceDependenciesRecorder
- Type Parameters:
T
- the return value of the callback.- Parameters:
additionalContexts
- the context that should be added to the set of webresources (which may not be in the callback)additionalResources
- the additional resources that should be added to the set of webresources (which may not be in the callback)includeSuperbatch
- true if the record should include the superbatch.callback
- the code to execute during recording- Returns:
- a pair of objects. Left is the value returned by the callback, right is the set of webresources that is assembled during the execution of the given callback.
- Throws:
Exception
- if the callback threw an exception.
-
record
@Deprecated public <T> com.atlassian.fugue.Pair<T,WebResourceDependenciesRecorder.RecordedResources> record(Iterable<String> additionalContexts, Iterable<String> additionalResources, Iterable<String> excludeContexts, Iterable<String> excludeResources, boolean includeSuperbatch, Callable<T> callback) throws Exception
Deprecated.- Specified by:
record
in interfaceWebResourceDependenciesRecorder
- Throws:
Exception
-
record
@Deprecated public <T> com.atlassian.fugue.Pair<T,WebResourceDependenciesRecorder.RecordedResources> record(Callable<T> callback) throws Exception
Deprecated.since 7.0.1. UseWebResourceDependenciesRecorder.recordResources(Callable)
Description copied from interface:WebResourceDependenciesRecorder
Records the webresources used during the execution of the given callback. Same as callingWebResourceDependenciesRecorder.recordResources(Iterable, Iterable, Callable)
without any overrides.- Specified by:
record
in interfaceWebResourceDependenciesRecorder
- Type Parameters:
T
- the return value of the callback- Parameters:
callback
- the code to execute during recording- Returns:
- a pair of objects. Left is the value returned by the callback, right is the set of webresources that is assembled during the execution of the given callback.
- Throws:
Exception
- if the callback threw an exception.
-
-