Package org.apache.struts2.conversion
Class StrutsTypeConverterHolder
java.lang.Object
org.apache.struts2.conversion.StrutsTypeConverterHolder
- All Implemented Interfaces:
TypeConverterHolder
Default implementation of
TypeConverterHolder-
Field Summary
FieldsModifier and TypeFieldDescriptionRecord classes that doesn't have conversion mapping defined. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefaultMapping(String className, TypeConverter typeConverter) Adds mapping for default type converters - application scopedvoidaddMapping(Class clazz, Map<String, Object> mapping) Assign mapping of converters for given classvoidaddNoMapping(Class clazz) Adds no mapping flag for give classvoidaddUnknownMapping(String className) Adds no converter flag for given class name FIXME lukaszlenart: maybe it should be merged with NoMappingbooleancontainsDefaultMapping(String className) Checks if converter was already defined for given classbooleancontainsNoMapping(Class clazz) Check if there is no mapping for given class to convertbooleancontainsUnknownMapping(String className) Checks if no mapping was defined for given class name FIXME lukaszlenart: maybe it should be merged with NoMappinggetDefaultMapping(String className) Returns instance ofTypeConverterassociated with given classgetMapping(Class clazz) Target class conversion Mappings.
-
Field Details
-
unknownMappings
Record classes that doesn't have conversion mapping defined.- String -> classname as String
-
-
Constructor Details
-
StrutsTypeConverterHolder
public StrutsTypeConverterHolder()
-
-
Method Details
-
addDefaultMapping
Description copied from interface:TypeConverterHolderAdds mapping for default type converters - application scoped- Specified by:
addDefaultMappingin interfaceTypeConverterHolder- Parameters:
className- name of the class with associated convertertypeConverter-TypeConverterinstance for associated class
-
containsDefaultMapping
Description copied from interface:TypeConverterHolderChecks if converter was already defined for given class- Specified by:
containsDefaultMappingin interfaceTypeConverterHolder- Parameters:
className- name of the class to check for- Returns:
- true if default mapping was already specified
-
getDefaultMapping
Description copied from interface:TypeConverterHolderReturns instance ofTypeConverterassociated with given class- Specified by:
getDefaultMappingin interfaceTypeConverterHolder- Parameters:
className- name of the class to return converter for- Returns:
- instance of
TypeConverterto be used to convert class
-
getMapping
Description copied from interface:TypeConverterHolderTarget class conversion Mappings.- Specified by:
getMappingin interfaceTypeConverterHolder- Parameters:
clazz- class to convert to/from- Returns:
TypeConverterfor given class
-
addMapping
Description copied from interface:TypeConverterHolderAssign mapping of converters for given class- Specified by:
addMappingin interfaceTypeConverterHolder- Parameters:
clazz- class to convert to/frommapping- property converters
-
containsNoMapping
Description copied from interface:TypeConverterHolderCheck if there is no mapping for given class to convert- Specified by:
containsNoMappingin interfaceTypeConverterHolder- Parameters:
clazz- class to convert to/from- Returns:
- true if mapping couldn't be found
-
addNoMapping
Description copied from interface:TypeConverterHolderAdds no mapping flag for give class- Specified by:
addNoMappingin interfaceTypeConverterHolder- Parameters:
clazz- class to register missing converter
-
containsUnknownMapping
Description copied from interface:TypeConverterHolderChecks if no mapping was defined for given class name FIXME lukaszlenart: maybe it should be merged with NoMapping- Specified by:
containsUnknownMappingin interfaceTypeConverterHolder- Parameters:
className- name of the class to check for- Returns:
- true if converter was defined for given class name
-
addUnknownMapping
Description copied from interface:TypeConverterHolderAdds no converter flag for given class name FIXME lukaszlenart: maybe it should be merged with NoMapping- Specified by:
addUnknownMappingin interfaceTypeConverterHolder- Parameters:
className- name of the class to mark there is no converter for it
-