Annotation Type Provider


  • @Target(TYPE)
    @Retention(RUNTIME)
    @Documented
    @Singleton
    @Stereotype
    public @interface Provider
    This annotation is to tag a managed bean as being a provider of business objects. The way the objects are provided is abstracted by such beans; they can be built by a factory or a builder or by the provider itself or they can come from the IoC container. Beans annotated with this annotation are marked to be managed by the underlying IoC container and to be singleton (there is only one single instance at a given time). If the bean declare another life-cycle scope, then the new scope overrides the default one. Any providers of business objects that don't have to be managed by the IoC container shouldn't be annotated with this annotation. The annotation is an abstraction above the IoC container used by Silverpeas so that it is can possible to change the IoC container (Spring or CDI for example) by changing the wrapped annotation to those specific at this IoC implementation without impacting the annotated IoC managed beans.