Class TagRegistry

java.lang.Object
com.webfirmframework.wffweb.tag.html.core.TagRegistry

public class TagRegistry extends Object
  • Constructor Details

    • TagRegistry

      public TagRegistry()
  • Method Details

    • getTagNames

      public static List<String> getTagNames()
      Returns:
      the list of tag names sorted in the ascending order of its length
      Since:
      1.1.3
    • getIndexByTagName

      public static Integer getIndexByTagName(String tagName)
      Parameters:
      tagName -
      Returns:
      the index of tag name
      Since:
      3.0.3
    • register

      public static void register(String... tagNamesToRegister)
      Parameters:
      tagNamesToRegister - the tag names to register , eg:- register("new-tag1", "new-tag2")
      Since:
      1.1.3
    • getTagClassNameByTagName

      public static Map<String,String> getTagClassNameByTagName()
      Returns:
      a map containing tag name as key and value as tag class name without package name
      Since:
      1.1.3
    • getTagClassByTagName

      public static Map<String,Class<?>> getTagClassByTagName()
      Returns:
      Since:
      3.0.2
    • loadAllTagClasses

      public static void loadAllTagClasses()
      Loads all tag classes.
      Since:
      2.1.13
    • getNewTagInstance

      public static AbstractHtml getNewTagInstance(String tagName)
      Parameters:
      tagName - name of tag in lower case
      Returns:
      the new instance of given tag name without any parent tag and attributes
      Throws:
      InvalidValueException
      Since:
      3.0.2
    • getNewTagInstance

      public static AbstractHtml getNewTagInstance(String tagName, AbstractHtml parent, AbstractAttribute... attributes)
      Parameters:
      tagName - name of tag in lower case
      parent -
      attributes -
      Returns:
      Throws:
      InvalidValueException
      Since:
      3.0.2
    • getNewTagInstanceOrNullIfFailed

      public static AbstractHtml getNewTagInstanceOrNullIfFailed(String tagName, AbstractHtml parent, AbstractAttribute... attributes)
      Parameters:
      tagName - name of tag in lower case
      parent -
      attributes -
      Returns:
      new instance or null if failed
      Since:
      3.0.2
    • getNewTagInstanceOrNullIfFailed

      public static AbstractHtml getNewTagInstanceOrNullIfFailed(int tagNameIndex, AbstractHtml parent, AbstractAttribute... attributes)
      Parameters:
      tagNameIndex - index of tag name
      parent -
      attributes -
      Returns:
      new instance or null if failed
      Since:
      3.0.3