Class DefaultDecorationModelInheritanceAssembler.URLRebaser

  • Enclosing class:
    DefaultDecorationModelInheritanceAssembler

    private static class DefaultDecorationModelInheritanceAssembler.URLRebaser
    extends java.lang.Object
    URL rebaser: based on an old and a new path, can rebase a link based on old path to a value based on the new path.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String newPath  
      private java.lang.String oldPath  
    • Constructor Summary

      Constructors 
      Constructor Description
      URLRebaser​(java.lang.String oldPath, java.lang.String newPath)
      Construct a URL rebaser.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getNewPath()
      Get the new path.
      java.lang.String getOldPath()
      Get the old path.
      java.lang.String rebaseLink​(java.lang.String link)
      Rebase only affects relative links, a relative link wrt an old base gets translated, so it points to the same location as viewed from a new base
      • Methods inherited from class java.lang.Object

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

      • oldPath

        private final java.lang.String oldPath
      • newPath

        private final java.lang.String newPath
    • Constructor Detail

      • URLRebaser

        URLRebaser​(java.lang.String oldPath,
                   java.lang.String newPath)
        Construct a URL rebaser.
        Parameters:
        oldPath - the old path.
        newPath - the new path.
    • Method Detail

      • getNewPath

        public java.lang.String getNewPath()
        Get the new path.
        Returns:
        the new path.
      • getOldPath

        public java.lang.String getOldPath()
        Get the old path.
        Returns:
        the old path.
      • rebaseLink

        public java.lang.String rebaseLink​(java.lang.String link)
        Rebase only affects relative links, a relative link wrt an old base gets translated, so it points to the same location as viewed from a new base