Search in sources :

Example 1 with IColumnValidator

use of com.servoy.j2db.dataprocessing.IColumnValidator in project servoy-client by Servoy.

the class PluginManager method checkPluginForConvertersAndValidators.

protected void checkPluginForConvertersAndValidators(IClientPlugin plugin) {
    try {
        long now = System.currentTimeMillis();
        if (plugin instanceof IColumnConverterProvider && columnConverterManager != null) {
            IColumnConverter[] cons = ((IColumnConverterProvider) plugin).getColumnConverters();
            if (cons != null) {
                for (IColumnConverter element2 : cons) {
                    if (element2 != null) {
                        columnConverterManager.registerConvertor(element2);
                    }
                }
            }
        }
        if (plugin instanceof IUIConverterProvider && uiConverterManager != null) {
            IUIConverter[] cons = ((IUIConverterProvider) plugin).getUIConverters();
            if (cons != null) {
                for (IUIConverter element2 : cons) {
                    if (element2 != null) {
                        uiConverterManager.registerConvertor(element2);
                    }
                }
            }
        }
        if (plugin instanceof IColumnValidatorProvider && columnValidatorManager != null) {
            IColumnValidator[] vals = ((IColumnValidatorProvider) plugin).getColumnValidators();
            if (vals != null) {
                for (IColumnValidator element2 : vals) {
                    if (element2 != null) {
                        columnValidatorManager.registerValidator(element2);
                    }
                }
            }
        }
        // $NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
        Debug.trace("Plugin " + plugin.getName() + " checked for converter/validator in " + (System.currentTimeMillis() - now) + " ms.");
    } catch (Throwable th) {
        // $NON-NLS-1$
        Debug.error("Error ocured checking plugin: " + plugin.getName(), th);
    }
}
Also used : IUIConverter(com.servoy.j2db.dataprocessing.IUIConverter) IColumnValidator(com.servoy.j2db.dataprocessing.IColumnValidator) IColumnConverter(com.servoy.j2db.dataprocessing.IColumnConverter)

Aggregations

IColumnConverter (com.servoy.j2db.dataprocessing.IColumnConverter)1 IColumnValidator (com.servoy.j2db.dataprocessing.IColumnValidator)1 IUIConverter (com.servoy.j2db.dataprocessing.IUIConverter)1