Interface OnmsServiceManager

    • Method Detail

      • registerAsService

        <T> void registerAsService​(java.lang.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​(java.lang.Class<T> serviceClass,
                                   T serviceBean,
                                   VaadinApplicationContext applicationContext,
                                   java.util.Dictionary<java.lang.String,​java.lang.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​(java.lang.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> java.util.List<T> getServices​(java.lang.Class<T> clazz,
                                          VaadinApplicationContext applicationContext,
                                          java.util.Hashtable<java.lang.String,​java.lang.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.