Class WebAppPath


  • public class WebAppPath
    extends java.lang.Object
    Created by tommackenzie on 4/3/16.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.slf4j.Logger LOGGER  
    • Constructor Summary

      Constructors 
      Constructor Description
      WebAppPath()  
    • Method Summary

      Modifier and Type Method Description
      java.net.URI fromClassURI​(java.net.URI classURI)  
      java.net.URI fromClassURI​(java.net.URI classURI, java.lang.String customWebAppLocation)  
      protected java.lang.String makeProjectPath​(java.lang.String classURI, java.lang.String splitter)
      Given a classURI Then return it's project path.
      • Methods inherited from class java.lang.Object

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

      • LOGGER

        protected static org.slf4j.Logger LOGGER
    • Constructor Detail

      • WebAppPath

        public WebAppPath()
    • Method Detail

      • fromClassURI

        public java.net.URI fromClassURI​(java.net.URI classURI)
                                  throws java.net.URISyntaxException
        Parameters:
        classURI - location of a project's classes
        Returns:
        an absolute file path to a project's webapp directory
        Throws:
        java.net.URISyntaxException - if an issue occurred constructing the URI
      • fromClassURI

        public java.net.URI fromClassURI​(java.net.URI classURI,
                                         java.lang.String customWebAppLocation)
                                  throws java.net.URISyntaxException
        Parameters:
        classURI - location of a project's classes
        customWebAppLocation - the webapp location to append to the project's path, /src/main/webapp
        Returns:
        an absolute file path to a project's webapp directory
        Throws:
        java.net.URISyntaxException - if the webApp URI cannot be constructed.
      • makeProjectPath

        protected java.lang.String makeProjectPath​(java.lang.String classURI,
                                                   java.lang.String splitter)
        Given a classURI Then return it's project path.
        Parameters:
        classURI - location of a project's classes
        splitter - /build or /target
        Returns:
        an absolute file path to a project