Package org.apache.sling.scripting.sightly.impl.engine.extension.use

# Class ScriptUseProvider

java.lang.Object
org.apache.sling.scripting.sightly.impl.engine.extension.use.ScriptUseProvider

All Implemented Interfaces:
  `org.apache.sling.scripting.sightly.use.UseProvider`

public class ScriptUseProvider extends Object implements org.apache.sling.scripting.sightly.use.UseProvider
Use provider that interprets the identifier as a script path, and runs the respective script using a script engine that matches the script extension.

This provider returns a non-failure outcome only if the evaluated script actually returns something. For more details check the implementation of the `SlingScript.eval(SlingBindings)` method for the available script engines from your platform.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final ScriptDependencyResolver`
`scriptDependencyResolver`

## Constructor Summary

Constructors
Constructor
Description
`ScriptUseProvider(org.osgi.framework.BundleContext bundleContext, BundledUnitManagerImpl bundledUnitManager, ScriptDependencyResolver scriptDependencyResolver)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`deactivate()`
`org.apache.sling.scripting.sightly.use.ProviderOutcome`
`provide(String scriptName, org.apache.sling.scripting.sightly.render.RenderContext renderContext, Bindings arguments)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### scriptDependencyResolver

protected final ScriptDependencyResolver scriptDependencyResolver

## Constructor Details

### ScriptUseProvider

public ScriptUseProvider(org.osgi.framework.BundleContext bundleContext, BundledUnitManagerImpl bundledUnitManager, ScriptDependencyResolver scriptDependencyResolver)

## Method Details

### deactivate

protected void deactivate()

### provide

public org.apache.sling.scripting.sightly.use.ProviderOutcome provide(String scriptName, org.apache.sling.scripting.sightly.render.RenderContext renderContext, Bindings arguments)

Specified by:
  `provide` in interface `org.apache.sling.scripting.sightly.use.UseProvider`