Class ScriptDependencyResolver
java.lang.Object
org.apache.sling.scripting.sightly.impl.utils.ScriptDependencyResolver
- All Implemented Interfaces:
EventListener
,org.apache.sling.api.resource.observation.ExternalResourceChangeListener
,org.apache.sling.api.resource.observation.ResourceChangeListener
,org.osgi.framework.BundleListener
public class ScriptDependencyResolver
extends Object
implements org.apache.sling.api.resource.observation.ResourceChangeListener, org.apache.sling.api.resource.observation.ExternalResourceChangeListener, org.osgi.framework.BundleListener
-
Field Summary
FieldsFields inherited from interface org.apache.sling.api.resource.observation.ResourceChangeListener
CHANGE_ADDED, CHANGE_CHANGED, CHANGE_PROVIDER_ADDED, CHANGE_PROVIDER_REMOVED, CHANGE_REMOVED, CHANGES, PATHS, PROPERTY_NAMES_HINT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bundleChanged
(org.osgi.framework.BundleEvent event) void
org.apache.sling.api.resource.Resource
resolveScript
(org.apache.sling.scripting.sightly.render.RenderContext renderContext, String scriptIdentifier) Resolves a script identifier to a resource
-
Field Details
-
BUNDLED_SCRIPTS_REQUIREMENT
- See Also:
-
-
Constructor Details
-
ScriptDependencyResolver
public ScriptDependencyResolver()
-
-
Method Details
-
resolveScript
public org.apache.sling.api.resource.Resource resolveScript(org.apache.sling.scripting.sightly.render.RenderContext renderContext, String scriptIdentifier) Resolves a script identifier to a resource- Parameters:
renderContext
- the contextscriptIdentifier
- the script identifier- Returns:
- the matching resource or null if the looked up resource does not exist
-
onChange
public void onChange(@NotNull @NotNull List<org.apache.sling.api.resource.observation.ResourceChange> changes) - Specified by:
onChange
in interfaceorg.apache.sling.api.resource.observation.ResourceChangeListener
-
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event) - Specified by:
bundleChanged
in interfaceorg.osgi.framework.BundleListener
-