Class GenericListCatalogConfig<T>

  • All Implemented Interfaces:
    Serializable, ConfigurableObject, LogObject
    Direct Known Subclasses:
    CustomListCatalogConfig, DataListCatalogConfig

    public class GenericListCatalogConfig<T>
    extends AbstractConfigurableObject
    Class for loading an xml configuration in the form of :
            
     		<!-- 
     			key/value attributes in this list
     			are accessed through the method getGeneralProps()
     		-->
    		<data-catalog-config key1="value1" key2="value">
    			
    			<!--
    				Some additional configurations could be loaded through configuration files.
    				All modules will be loaded before the main configuration file.
    			-->
    			<module-list>
    				<module id="module-01" mode="cl" src="class/load/path/to/module"/>
    			</module-list>
    
    	 		<!-- 
    	 			data list ids are accessed
    	 			through the method getIdSet() [ex. 1, 2, 3]
    	 			while specific entry list 
    	 			through the method getDataList() [ex. 1A, 1B]
    	 		-->
    			
    			<data-list id="1">
    				<data id="1A"/>
    				<data id="1B"/>
    			</data-list>
    			
    			<data-list id="2">
    				<data id="2A"/>
    			</data-list>
    			
    			<data-list id="3">
    				<data id="3A"/>
    				<data id="3B"/>
    				<data id="3C"/>
    			</data-list>
    			
    		</data-catalog-config>
    	
            
    It is possibile to provided custom data-list and data element name.
    Author:
    fugerit
    See Also:
    Serialized Form
    • Field Detail

      • CONFIG_CHECK_DUPLICATE_ID

        public static final String CONFIG_CHECK_DUPLICATE_ID
        General configurazion property for checking duplicate catalog id
        See Also:
        Constant Field Values
      • CONFIG_CHECK_ENTRY_DUPLICATE_ID

        public static final String CONFIG_CHECK_ENTRY_DUPLICATE_ID
        General configurazion property for checking duplicate entry id
        See Also:
        Constant Field Values
      • CONFIG_CHECK_DUPLICATE_ID_FAIL

        public static final String CONFIG_CHECK_DUPLICATE_ID_FAIL
        If 'check-duplicate-id' is se to fail, the duplicate will cause the configuration to fail
        See Also:
        Constant Field Values
      • CONFIG_CHECK_DUPLICATE_ID_FAIL_ON_SET

        public static final String CONFIG_CHECK_DUPLICATE_ID_FAIL_ON_SET
        If 'check-duplicate-entry-id' is se to fail, the duplicate will cause the configuration to fail
        See Also:
        Constant Field Values
      • CONFIG_CHECK_DUPLICATE_ID_WARN

        public static final String CONFIG_CHECK_DUPLICATE_ID_WARN
        If 'check-duplicate-id' is se to warn, the duplicate will only be logged
        See Also:
        Constant Field Values
      • CONFIG_CHECK_DUPLICATE_ID_DEFAULT

        public static final String CONFIG_CHECK_DUPLICATE_ID_DEFAULT
        Default vaule for 'check-duplicate-id' property. ('warn' for compatibility reason, strongly recommended setting to 'fail' )
        See Also:
        Constant Field Values
      • ATT_DATA_CATALOG_CONFIG

        public static final String ATT_DATA_CATALOG_CONFIG
        Default configuration element for a a data catalog config element
        See Also:
        Constant Field Values
      • ATT_TRY_XSD_VALIDATION

        public static final String ATT_TRY_XSD_VALIDATION
        True if the catalog should try xsd validation (will be used only if a schema catalog is set)
        See Also:
        Constant Field Values
      • ATT_TAG_DATA_LIST

        public static final String ATT_TAG_DATA_LIST
        Default configuration element for a data list
        See Also:
        Constant Field Values
      • ATT_CONFIG_PROVIDER_NAME

        public static final String ATT_CONFIG_PROVIDER_NAME
        Name of the config provider to use
        See Also:
        Constant Field Values
      • ATT_BEAN_MODE_DEFAULT

        public static final String ATT_BEAN_MODE_DEFAULT
        Default, bean population mode (by default read only attributes)
        See Also:
        Constant Field Values
      • ATT_LIST_TYPE

        public static final String ATT_LIST_TYPE
        Type to use for the config containers (data-list)
        See Also:
        Constant Field Values
      • ATT_TAG_MODULE_CONF_ID

        public static final String ATT_TAG_MODULE_CONF_ID
        Configuration attribute for module 'id'
        See Also:
        Constant Field Values
      • ATT_TAG_MODULE_CONF_MODE

        public static final String ATT_TAG_MODULE_CONF_MODE
        Configuration attribute for module load 'mode'
        See Also:
        Constant Field Values
      • ATT_TAG_MODULE_CONF_MODE_CL

        public static final String ATT_TAG_MODULE_CONF_MODE_CL
        Value for module load mode by class loader
        See Also:
        Constant Field Values
      • ATT_TAG_MODULE_CONF_MODE_FILE

        public static final String ATT_TAG_MODULE_CONF_MODE_FILE
        Value for module load mode by file
        See Also:
        Constant Field Values
      • ATT_TAG_MODULE_CONF_PATH

        public static final String ATT_TAG_MODULE_CONF_PATH
        Configuration attribute for module src path
        See Also:
        Constant Field Values
      • ATT_TAG_MODULE_CONF_UNSAFE

        public static final String ATT_TAG_MODULE_CONF_UNSAFE
        Configuration attribute for module unsafe module (if unsafe='true' load exception would be ignored and main configuration will proceed )
        See Also:
        Constant Field Values
      • attTagDataList

        protected String attTagDataList
      • attTagData

        protected String attTagData
    • Constructor Detail

      • GenericListCatalogConfig

        public GenericListCatalogConfig()
        Creates a new DataListCatalogConfig wth default configuration.
      • GenericListCatalogConfig

        public GenericListCatalogConfig​(String attTagDataList,
                                        String attTagData)
        Creates a new DataListCatalogConfig
        Parameters:
        attTagDataList - attribute name to use for data list
        attTagData - attribute name to use for data entry