Class DependencyResolver

java.lang.Object
org.nustaq.kontraktor.webapp.javascript.DependencyResolver
All Implemented Interfaces:
HtmlImportShim.ResourceLocator

public class DependencyResolver
extends java.lang.Object
implements HtmlImportShim.ResourceLocator
Created by ruedi on 06.04.2015. Algorithm: starting from the root component (searched via resource path), resolve all dependencies resulting in a list of (ordered according to dependencies) directories. The resulting list is then searched in order when doing lookup/merge
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.lang.String baseDir  
    protected java.io.File[] resourcePath  
  • Constructor Summary

    Constructors 
    Constructor Description
    DependencyResolver​(java.lang.String baseDir, java.lang.String[] resourcePath, HtmlImportShim.ResourceLocator rl)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getBaseDir()  
    java.io.File locateResource​(java.lang.String name)
    iterate component directories in order and return full path of first file matching
    java.lang.String resolveUniquePath​(java.io.File fi)  
    byte[] retrieveBytes​(java.io.File impFi)
    this part of locator interface is only implemented if another resourcelocator is set.
    protected DependencyResolver setBaseDir​(java.lang.String baseDir)  
    protected DependencyResolver setResourcePath​(java.lang.String... path)  

    Methods inherited from class java.lang.Object

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