Class ResourceContentAnnotator
java.lang.Object
com.atlassian.plugin.webresource.impl.annotators.ResourceContentAnnotator
- Direct Known Subclasses:
ListOfAnnotators,LocationContentAnnotator,SemicolonResourceContentAnnotator,TryCatchJsResourceContentAnnotator
Implemented by classes that want to annotate the write of a plugin resource.
-
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.abstract inthashCode()Produce a hash for this instance.
-
Constructor Details
-
ResourceContentAnnotator
public ResourceContentAnnotator()
-
-
Method Details
-
beforeResourceInBatch
public int beforeResourceInBatch(LinkedHashSet<String> requiredResources, Resource resource, Map<String, String> params, OutputStream stream) throws IOExceptionCalled before the resource content is written in batch.- 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 IOExceptionCalled after the resource content is written in batch.- 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 IOExceptionCalled before all content is written in batch.- 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 IOExceptionCalled after all content is written in batch.- Throws:
IOException
-
beforeResource
public int beforeResource(LinkedHashSet<String> requiredResources, String url, Resource resource, Map<String, String> params, OutputStream stream) throws IOExceptionCalled before the resource content is written.- Throws:
IOException
-
afterResource
public void afterResource(LinkedHashSet<String> requiredResources, String url, Resource resource, Map<String, String> params, OutputStream stream) throws IOExceptionCalled after the resource content is written.- Throws:
IOException
-
hashCode
public abstract int hashCode()Produce a hash for this instance. Should be stable across jvms.
-