Class AttributeRegistry
java.lang.Object
com.webfirmframework.wffweb.tag.html.attribute.core.AttributeRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getAttrNameByEventAttrIndex
(int index) static Integer
getIndexByAttributeName
(String attributeName) static AbstractAttribute
getNewAttributeInstance
(String attributeName) static AbstractAttribute
getNewAttributeInstance
(String attributeName, String attributeValue) static AbstractAttribute
getNewAttributeInstanceOrNullIfFailed
(int attributeNameIndex, String attributeValue) static AbstractAttribute
getNewAttributeInstanceOrNullIfFailed
(String attributeName, String attributeValue) static void
Loads all attribute classes.static void
-
Constructor Details
-
AttributeRegistry
public AttributeRegistry()
-
-
Method Details
-
register
- Parameters:
attrNames
- the attribute names to register, eg:- AttributeRegistry.register("attri-name1", "attri-name2")- Since:
- 1.1.3
-
getAttributeNames
- Returns:
- the list of attribute names sorted in the ascending order of its length
- Since:
- 1.1.3
-
getBooleanAttributeNames
- Returns:
- the list of boolean attribute names sorted in the ascending order of its length
- Since:
- 3.0.10
-
getEventAttributeNames
- Returns:
- only the list of event attribute names sorted in the ascending order of its length
- Since:
- 3.0.15
-
getAttrNameByEventAttrIndex
- Parameters:
index
- the index got byPreIndexedAttributeName.eventAttrIndex()
- Returns:
- the attribute name of event attribute at event attribute index
- Since:
- 3.0.15
-
getIndexByAttributeName
- Parameters:
attributeName
-- Returns:
- the index of attribute name
- Since:
- 3.0.3
-
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
- 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
- indexattributeValue
-- Returns:
- new instance or null if failed
- Since:
- 3.0.3
-