Class DefaultStaticTransformers
java.lang.Object
com.atlassian.plugin.webresource.transformer.DefaultStaticTransformers
- All Implemented Interfaces:
StaticTransformers,TwoPhaseResourceTransformer
StaticTransformers implementation.- Since:
- v3.1.0
-
Field Summary
Fields inherited from interface com.atlassian.plugin.webresource.transformer.StaticTransformers
PARAMETERS_USED -
Constructor Summary
ConstructorsConstructorDescriptionDefaultStaticTransformers(StaticTransformersSupplier staticTransformersSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToUrl(String locationType, TransformerParameters transformerParameters, UrlBuilder urlBuilder, UrlBuildingStrategy urlBuildingStrategy) Contributes to the URL for all static transformers matching the given typeGet list of param keys used by this transformers.booleanvoidloadTwoPhaseProperties(com.atlassian.plugin.elements.ResourceLocation resourceLocation, Function<String, InputStream> loadFromFile) transform(Content content, TransformerParameters transformerParameters, com.atlassian.plugin.elements.ResourceLocation resourceLocation, QueryParams queryParams, String sourceUrl) Performs transformation for all static transformers for the given type.
-
Constructor Details
-
DefaultStaticTransformers
-
-
Method Details
-
addToUrl
public void addToUrl(String locationType, TransformerParameters transformerParameters, UrlBuilder urlBuilder, UrlBuildingStrategy urlBuildingStrategy) Description copied from interface:StaticTransformersContributes to the URL for all static transformers matching the given type- Specified by:
addToUrlin interfaceStaticTransformers- Parameters:
locationType- type of resource (eg js, css, less)transformerParameters- parameters to pass to transformersurlBuilder- url building to contribute to
-
loadTwoPhaseProperties
public void loadTwoPhaseProperties(com.atlassian.plugin.elements.ResourceLocation resourceLocation, Function<String, InputStream> loadFromFile) - Specified by:
loadTwoPhasePropertiesin interfaceTwoPhaseResourceTransformer
-
hasTwoPhaseProperties
public boolean hasTwoPhaseProperties()- Specified by:
hasTwoPhasePropertiesin interfaceTwoPhaseResourceTransformer
-
transform
public Content transform(Content content, TransformerParameters transformerParameters, com.atlassian.plugin.elements.ResourceLocation resourceLocation, QueryParams queryParams, String sourceUrl) Description copied from interface:StaticTransformersPerforms transformation for all static transformers for the given type.- Specified by:
transformin interfaceStaticTransformers- Parameters:
content- content to transformtransformerParameters- theTransformerParametersobjectresourceLocation- resource locationqueryParams- url querystring containing information for transformerssourceUrl- url of original source file- Returns:
- a DownloadableResource representing the completed transformation
-
getParamKeys
Description copied from interface:StaticTransformersGet list of param keys used by this transformers.- Specified by:
getParamKeysin interfaceStaticTransformers
-