Class ApplicationServiceProvider


  • @Provider
    @Singleton
    public class ApplicationServiceProvider
    extends Object
    A provider of objets implementing the ApplicationService interface. The provider looks for an implementation of the ApplicationService interface by the identifier of the application instance. In order the discovery of such a service succeeds, it is required that each implementation are annotated by the @Named annotation with as value the name of the component with the first character in lowercase following by the term Service; for example an application Toto should provide an implementation of the ApplicationService interface named (with the Named annotation) totoService.
    Author:
    mmoquillon
    • Constructor Detail

      • ApplicationServiceProvider

        public ApplicationServiceProvider()
    • Method Detail

      • getApplicationServiceById

        public Optional<ApplicationService> getApplicationServiceById​(String appId)
        Gets the application service that is defined for the given application instance. If no such application service exists, then nothing is returned.
        Parameters:
        appId - the unique identifier of an application instance in Silverpeas.
        Returns:
        optionally the transverse service that is defined for the type of applications the given component instance is of. If no such application service exists, then nothing is returned.