Class SiteUtils


  • public class SiteUtils
    extends java.lang.Object
    Site model utilities.
    Since:
    1.7
    • Constructor Summary

      Constructors 
      Constructor Description
      SiteUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.codehaus.plexus.util.xml.Xpp3Dom getCustomChild​(org.codehaus.plexus.util.xml.Xpp3Dom custom, java.lang.String path)
      Helper to get site custom DOM element by simply specifying a dotted path.
      static java.lang.String getCustomValue​(org.codehaus.plexus.util.xml.Xpp3Dom custom, java.lang.String path)
      Helper to get site custom DOM element value by simply specifying a dotted path.
      static java.lang.String getCustomValue​(org.codehaus.plexus.util.xml.Xpp3Dom custom, java.lang.String path, java.lang.String defaultValue)
      Helper to get site custom DOM element value by simply specifying a dotted path.
      static boolean isLink​(java.lang.String href)  
      static boolean startsWithAnyIgnoreCase​(java.lang.String string, java.lang.String... searchStrings)  
      • Methods inherited from class java.lang.Object

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

      • SiteUtils

        public SiteUtils()
    • Method Detail

      • isLink

        public static boolean isLink​(java.lang.String href)
      • startsWithAnyIgnoreCase

        public static boolean startsWithAnyIgnoreCase​(java.lang.String string,
                                                      java.lang.String... searchStrings)
      • getCustomChild

        public static org.codehaus.plexus.util.xml.Xpp3Dom getCustomChild​(org.codehaus.plexus.util.xml.Xpp3Dom custom,
                                                                          java.lang.String path)
        Helper to get site custom DOM element by simply specifying a dotted path.
        Parameters:
        custom - the custom DOM element
        path - the dotted path to the child
        Returns:
        null if any element in the path does not exist
        Since:
        1.8
      • getCustomValue

        public static java.lang.String getCustomValue​(org.codehaus.plexus.util.xml.Xpp3Dom custom,
                                                      java.lang.String path)
        Helper to get site custom DOM element value by simply specifying a dotted path.
        Parameters:
        custom - the custom DOM element
        path - the dotted path to the child
        Returns:
        the element value or null if any element in the path does not exist
        Since:
        1.8
      • getCustomValue

        public static java.lang.String getCustomValue​(org.codehaus.plexus.util.xml.Xpp3Dom custom,
                                                      java.lang.String path,
                                                      java.lang.String defaultValue)
        Helper to get site custom DOM element value by simply specifying a dotted path.
        Parameters:
        custom - the custom DOM element
        path - the dotted path to the child
        defaultValue - default value
        Returns:
        the element value or the default value if any element in the path does not exist
        Since:
        1.8