Interface HostService


public interface HostService
Indexserver provides this interface for OSGi plugins. This interface provides functionality that can be used in OSGi plugins.
  • Method Details

    • getScriptObjectFactory

      ScriptObjectFactory getScriptObjectFactory(IXServerEventsContext ec)
      Get an interface to create helper objects for IXConnection, etc.
      Parameters:
      ec - Execution context. IXServerEventsContext.ADMIN_CONTEXT can be passed to obtain an object for the Indexserver session.
    • getWebappConfigDir

      String getWebappConfigDir()
      Get Indexserver configuration directory. This configuration directory stores e.g. config.xml and log4j.properties.
      Returns:
      Configuration directory, e.g. /ELO10/config/ix-archive/servername
    • getWebappDataDir

      String getWebappDataDir()
      Get Indexserver data directory. This configuration directory stores temporary files, e.g. scripts to be compiled.
      Returns:
      Configuration directory, e.g. /ELO10/data/ix-archive/servername
    • getUser

      UserInfo getUser(String userId) throws byps.RemoteException
      Get the user's data from Indexserver's cache. This function is a replacement for IXServicePortIF.checkoutUser with CheckoutUsersC.BY_IDS_RAW. It does not write logging entries on INFO level.
      Parameters:
      userId - User ID, GUID or NAME
      Returns:
      UserInfo
      Throws:
      byps.RemoteException - If the user do not exist, this function throws an exception with code "[ELOIX:" + IXExceptionC.NOT_FOUND
    • getUserNoEx

      UserInfo getUserNoEx(String userId)
      Get the user's data from Indexserver's cache. This function works as getUser(String) but returns null if the user is not found instead of throwing and exception.
      Parameters:
      userId - User ID, GUID or NAME
      Returns:
      UserInfo
    • getOtherIXs

      List<IXConnectionIF> getOtherIXs()
      Get connections to other Indexserver instances of this repository. Requests should be send asynchronously, because it is not guaranteed that the connections are alive. The provided connections use the service account of this Indexserver and should not be stored permanently. EIX-2386
      Returns:
      List of connections
      See Also:
    • getOtherRepositoriesIXs

      Map<String,IXConnectionIF> getOtherRepositoriesIXs()
      Get connections to other Indexserver instances of other repositories. Only Indexserver instances registered with the Access Manager (amoptions table) are returned. Other instances for the repositories are ignored. Requests should be send asynchronously, because it is not guaranteed that the connections are alive. The provided connections use the service account of this Indexserver and should not be stored permanently. EIX-2386
      Returns:
      Map of connections. Repository name is used as key. The value is never null.
    • onFinishedInitialization

      void onFinishedInitialization(String tag, Runnable run)
      Call the given function after initialization has been finished successfully. EIX-3133
      Parameters:
      tag - A short and unique string to tag logging information.
      run - Function to call
    • getServiceImplementations

      Map<String,Object> getServiceImplementations(String interfaceName)
      Get service implementations for given interface name. EIX-3641
      Parameters:
      interfaceName - Interface name
      Returns:
      Map of bundle ID (as key) and service (as value).
      See Also:
    • getServiceImplementations

      <T> Map<String,T> getServiceImplementations(Class<T> clazz)
      Get service implementations for given interface. EIX-3641
      Type Parameters:
      T - Interface type
      Parameters:
      clazz - Interface class
      Returns:
      Map of bundle ID (as key) and service (as value).
      See Also: