/** * Registers a factory for a node name. * * @param name the name of the node * @param factory the factory to return the values */ public void registerFactory(String name, Factory factory) { registerFactory(name, registrationGroupName, factory); }
/** * Registers a factory for a JavaBean.<br> * The JavaBean class should have a no-args constructor. * * @param theName name of the node * @param groupName thr group to register this node in * @param beanClass the factory to handle the name */ public void registerBeanFactory(String theName, String groupName, final Class beanClass) { getProxyBuilder().registerFactory(theName, new AbstractFactory() { public Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map properties) throws InstantiationException, IllegalAccessException { if (checkValueIsTypeNotString(value, name, beanClass)) { return value; } else { return beanClass.newInstance(); } } }); getRegistrationGroup(groupName).add(theName); }
@Override public void registerFactory(final String name, final String groupName, final Factory factory) { if (log.isDebugEnabled()) { log.debug("Registering factory: " + name + ", factory: " + factory); if (factoryNames.contains(name)) { log.warn("Duplicate factory: " + name); } } factoryNames.add(name); super.registerFactory(name, groupName, factory); }
/** * Registers a factory for a node name. * * @param name the name of the node * @param factory the factory to return the values */ public void registerFactory(String name, Factory factory) { registerFactory(name, registringGroupName, factory); }
/** * Registers a factory for a node name. * * @param name the name of the node * @param factory the factory to return the values */ public void registerFactory(String name, Factory factory) { registerFactory(name, registrationGroupName, factory); }
/** * Registers a factory for a node name. * * @param name the name of the node * @param factory the factory to return the values */ public void registerFactory(String name, Factory factory) { registerFactory(name, registrationGroupName, factory); }
/** * Registers a factory for a JavaBean.<br> * The JavaBean clas should have a no-args constructor. */ public void registerBeanFactory( String theName, final Class beanClass ) { proxyBuilder.registerFactory( theName, new AbstractFactory(){ public Object newInstance( FactoryBuilderSupport builder, Object name, Object value, Map properties ) throws InstantiationException, IllegalAccessException { if( checkValueIsTypeNotString( value, name, beanClass ) ){ return value; }else{ return beanClass.newInstance(); } } } ); }
@Override public void registerFactory(final String name, final String groupName, final Factory factory) { if (log.isDebugEnabled()) { log.debug("Registering factory: " + name + ", factory: " + factory); if (factoryNames.contains(name)) { log.warn("Duplicate factory: " + name); } } factoryNames.add(name); super.registerFactory(name, groupName, factory); }
/** * Registers a factory for a JavaBean.<br> * The JavaBean clas should have a no-args constructor. * * @param theName name of the node * @param groupName thr group to register this node in * @param beanClass the factory to handle the name */ public void registerBeanFactory(String theName, String groupName, final Class beanClass) { getProxyBuilder().registerFactory(theName, new AbstractFactory() { public Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map properties) throws InstantiationException, IllegalAccessException { if (checkValueIsTypeNotString(value, name, beanClass)) { return value; } else { return beanClass.newInstance(); } } }); registrationGroup.get(groupName).add(theName); }
/** * Registers a factory for a JavaBean.<br> * The JavaBean class should have a no-args constructor. * * @param theName name of the node * @param groupName thr group to register this node in * @param beanClass the factory to handle the name */ public void registerBeanFactory(String theName, String groupName, final Class beanClass) { getProxyBuilder().registerFactory(theName, new AbstractFactory() { public Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map properties) throws InstantiationException, IllegalAccessException { if (checkValueIsTypeNotString(value, name, beanClass)) { return value; } else { return beanClass.newInstance(); } } }); getRegistrationGroup(groupName).add(theName); }
/** * Registers a factory for a JavaBean.<br> * The JavaBean class should have a no-args constructor. * * @param theName name of the node * @param groupName thr group to register this node in * @param beanClass the factory to handle the name */ public void registerBeanFactory(String theName, String groupName, final Class beanClass) { getProxyBuilder().registerFactory(theName, new AbstractFactory() { public Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map properties) throws InstantiationException, IllegalAccessException { if (checkValueIsTypeNotString(value, name, beanClass)) { return value; } else { return beanClass.newInstance(); } } }); getRegistrationGroup(groupName).add(theName); }