Class AttributeRegistry

java.lang.Object
com.webfirmframework.wffweb.tag.html.attribute.core.AttributeRegistry

public class AttributeRegistry extends Object
  • Constructor Details

    • AttributeRegistry

      public AttributeRegistry()
  • Method Details

    • register

      public static void register(String... attrNames)
      Parameters:
      attrNames - the attribute names to register, eg:- AttributeRegistry.register("attri-name1", "attri-name2")
      Since:
      1.1.3
    • getAttributeNames

      public static List<String> getAttributeNames()
      Returns:
      the list of attribute names sorted in the ascending order of its length
      Since:
      1.1.3
    • getBooleanAttributeNames

      public static List<String> getBooleanAttributeNames()
      Returns:
      the list of boolean attribute names sorted in the ascending order of its length
      Since:
      3.0.10
    • getEventAttributeNames

      public static List<String> getEventAttributeNames()
      Returns:
      only the list of event attribute names sorted in the ascending order of its length
      Since:
      3.0.15
    • getAttrNameByEventAttrIndex

      public static String getAttrNameByEventAttrIndex(int index)
      Parameters:
      index - the index got by PreIndexedAttributeName.eventAttrIndex()
      Returns:
      the attribute name of event attribute at event attribute index
      Since:
      3.0.15
    • getIndexByAttributeName

      public static Integer getIndexByAttributeName(String attributeName)
      Parameters:
      attributeName -
      Returns:
      the index of attribute name
      Since:
      3.0.3
    • getAttributeClassNameByAttributeName

      public static Map<String,String> getAttributeClassNameByAttributeName()
      Returns:
      a map containing attribute name as key and value as tag class name without package name
      Since:
      1.0.0
    • loadAllAttributeClasses

      public static void loadAllAttributeClasses()
      Loads all attribute classes.
      Since:
      2.1.13
    • getNewAttributeInstance

      public static AbstractAttribute getNewAttributeInstance(String attributeName)
      Parameters:
      attributeName -
      Returns:
      Throws:
      InvalidValueException
      Since:
      3.0.2
    • getNewAttributeInstance

      public static AbstractAttribute getNewAttributeInstance(String attributeName, String attributeValue)
      Parameters:
      attributeName -
      attributeValue -
      Returns:
      Throws:
      InvalidValueException
      Since:
      3.0.2
    • getNewAttributeInstanceOrNullIfFailed

      public static AbstractAttribute getNewAttributeInstanceOrNullIfFailed(String attributeName, String attributeValue)
      Parameters:
      attributeName -
      attributeValue -
      Returns:
      new instance or null if failed
      Since:
      3.0.2
    • getNewAttributeInstanceOrNullIfFailed

      public static AbstractAttribute getNewAttributeInstanceOrNullIfFailed(int attributeNameIndex, String attributeValue)
      Parameters:
      attributeNameIndex - index
      attributeValue -
      Returns:
      new instance or null if failed
      Since:
      3.0.3