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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bundleChanged(org.osgi.framework.BundleEvent event)
     
    void
    onChange(@NotNull List<org.apache.sling.api.resource.observation.ResourceChange> changes)
     
    org.apache.sling.api.resource.Resource
    resolveScript(org.apache.sling.scripting.sightly.render.RenderContext renderContext, String scriptIdentifier)
    Resolves a script identifier to a resource

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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 context
      scriptIdentifier - 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 interface org.apache.sling.api.resource.observation.ResourceChangeListener
    • bundleChanged

      public void bundleChanged(org.osgi.framework.BundleEvent event)
      Specified by:
      bundleChanged in interface org.osgi.framework.BundleListener