Class ListOfAnnotators
java.lang.Object
com.atlassian.plugin.webresource.impl.annotators.ResourceContentAnnotator
com.atlassian.plugin.webresource.impl.annotators.ListOfAnnotators
Helper to simplify working with multiple annotators.
- Since:
- v 3.4.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterAllResourcesInBatch(LinkedHashSet<String> requiredResources, String url, Map<String, String> params, OutputStream stream) Called after all content is written in batch.voidafterResource(LinkedHashSet<String> requiredResources, String url, Resource resource, Map<String, String> params, OutputStream stream) Called after the resource content is written.voidafterResourceInBatch(LinkedHashSet<String> requiredResources, Resource resource, Map<String, String> params, OutputStream stream) Called after the resource content is written in batch.intbeforeAllResourcesInBatch(LinkedHashSet<String> requiredResources, String url, Map<String, String> params, OutputStream stream) Called before all content is written in batch.intbeforeResource(LinkedHashSet<String> requiredResources, String url, Resource resource, Map<String, String> params, OutputStream stream) Called before the resource content is written.intbeforeResourceInBatch(LinkedHashSet<String> requiredResources, Resource resource, Map<String, String> params, OutputStream stream) Called before the resource content is written in batch.inthashCode()Produce a hash for this instance.
-
Constructor Details
-
ListOfAnnotators
-
-
Method Details
-
beforeResourceInBatch
public int beforeResourceInBatch(LinkedHashSet<String> requiredResources, Resource resource, Map<String, String> params, OutputStream stream) throws IOExceptionDescription copied from class:ResourceContentAnnotatorCalled before the resource content is written in batch.- Overrides:
beforeResourceInBatchin classResourceContentAnnotator- Returns:
- amount of lines the annotator adds to the source, used for source map generation.
- Throws:
IOException- if there is a problem writing the annotation.
-
afterResourceInBatch
public void afterResourceInBatch(LinkedHashSet<String> requiredResources, Resource resource, Map<String, String> params, OutputStream stream) throws IOExceptionDescription copied from class:ResourceContentAnnotatorCalled after the resource content is written in batch.- Overrides:
afterResourceInBatchin classResourceContentAnnotator- Throws:
IOException- if there is a problem writing the annotation.
-
beforeAllResourcesInBatch
public int beforeAllResourcesInBatch(LinkedHashSet<String> requiredResources, String url, Map<String, String> params, OutputStream stream) throws IOExceptionDescription copied from class:ResourceContentAnnotatorCalled before all content is written in batch.- Overrides:
beforeAllResourcesInBatchin classResourceContentAnnotator- Returns:
- amount of lines the annotator adds to the source, used for source map generation.
- Throws:
IOException
-
afterAllResourcesInBatch
public void afterAllResourcesInBatch(LinkedHashSet<String> requiredResources, String url, Map<String, String> params, OutputStream stream) throws IOExceptionDescription copied from class:ResourceContentAnnotatorCalled after all content is written in batch.- Overrides:
afterAllResourcesInBatchin classResourceContentAnnotator- Throws:
IOException
-
beforeResource
public int beforeResource(LinkedHashSet<String> requiredResources, String url, Resource resource, Map<String, String> params, OutputStream stream) throws IOExceptionDescription copied from class:ResourceContentAnnotatorCalled before the resource content is written.- Overrides:
beforeResourcein classResourceContentAnnotator- Throws:
IOException
-
afterResource
public void afterResource(LinkedHashSet<String> requiredResources, String url, Resource resource, Map<String, String> params, OutputStream stream) throws IOExceptionDescription copied from class:ResourceContentAnnotatorCalled after the resource content is written.- Overrides:
afterResourcein classResourceContentAnnotator- Throws:
IOException
-
hashCode
public int hashCode()Description copied from class:ResourceContentAnnotatorProduce a hash for this instance. Should be stable across jvms.- Specified by:
hashCodein classResourceContentAnnotator
-