Package de.elo.ix.client.plugin
Interface HostService
public interface HostService
Indexserver provides this interface for OSGi plugins.
This interface provides functionality that can be used in OSGi plugins.
-
Method Summary
Modifier and TypeMethodDescriptionGet connections to other Indexserver instances of this repository.Get connections to other Indexserver instances of other repositories.Get an interface to create helper objects for IXConnection, etc.getServiceImplementations
(Class<T> clazz) Get service implementations for given interface.getServiceImplementations
(String interfaceName) Get service implementations for given interface name.Get the user's data from Indexserver's cache.getUserNoEx
(String userId) Get the user's data from Indexserver's cache.Get Indexserver configuration directory.Get Indexserver data directory.void
onFinishedInitialization
(String tag, Runnable run) Call the given function after initialization has been finished successfully.
-
Method Details
-
getScriptObjectFactory
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
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
Get the user's data from Indexserver's cache. This function works asgetUser(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
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
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
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:
-