Interface OnmsServiceManager

    • Method Detail

      • registerAsService

        <T> void registerAsService​(Class<T> serviceClass,
                                   T serviceBean,
                                   VaadinApplicationContext applicationContext)
        Register a service with session scope.
        Parameters:
        serviceBean - The service to be registered. Must not be null.
        applicationContext - The session scope. Must not be null.
      • registerAsService

        <T> void registerAsService​(Class<T> serviceClass,
                                   T serviceBean,
                                   VaadinApplicationContext applicationContext,
                                   Dictionary<String,​Object> additionalProperties)
        Registers a service with session scope but allows to set additional Properties.
        Parameters:
        serviceBean - The service to be registered. Must not be null.
        applicationContext - the session scope. Must not be null.
        additionalProperties - Additional Properties. Must not be null.
      • getService

        <T> T getService​(Class<T> clazz,
                         VaadinApplicationContext applicationContext)
        Returns a service in session-scope. Be aware that if there are multiple services registered for the given class, only the first one is returned.
        Parameters:
        clazz - The type of the service. Must not be null.
        applicationContext - The session-scope. Must not be null.
      • getServices

        <T> List<T> getServices​(Class<T> clazz,
                                VaadinApplicationContext applicationContext,
                                Hashtable<String,​Object> additionalProperties)
        Returns all registered services within session-scope and may be consider additional Properties.
        Parameters:
        clazz - the type of the service. Must not be null.
        applicationContext - The session scope. Must not be null.
        additionalProperties - optional additional propeties. Must not be null.