All Downloads are FREE. Search and download functionalities are using the official Maven repository.

angularBeans.boot.BeanRegistry Maven / Gradle / Ivy

There is a newer version: 1.0.2-RELEASE
Show newest version
package angularBeans.boot;

import java.util.HashSet;
import java.util.Set;

import angularBeans.ngservices.NGService;
import angularBeans.util.NGBean;

/**
 * used by:
 * 

-AngularBeansServletContextListenerAnnotated *

-ModuleGenerator *

-AngularBeansCDIExtention *

* The BeanRegistry is used to store CDI beans info detected at deployment * time to boost javascript generation performances later on the ModuleGenerator * (pre generated and compressed js) *

*it will store specific CDI beans definitions: *@AngularBeans (as wrapped NGBean) *, angularBeans built-in angularJs services (NGService) *, the @NGApp definition *

*combined with specific beans dependent javascript part's (related to RPC methods call) *will produce the final "angular-beans.js" script. * @author bessem hmidi * */ public class BeanRegistry { private static BeanRegistry instance = new BeanRegistry(); private Set angularBeans = new HashSet<>(); private Set extentions = new HashSet<>(); private Class appClass; /** * AngularBeansCDIExtention wi * @param appClass */ public void registerApp(Class appClass) { this.appClass = appClass; } public void registerBean(Class targetClass) { angularBeans.add(new NGBean(targetClass)); } public void registerExtention(NGService extention) { extentions.add(extention); } public Set getAngularBeans() { return angularBeans; } public static synchronized BeanRegistry getInstance() { return instance; } public Set getExtentions() { return extentions; } public Class getAppClass() { return appClass; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy