Class DataHubServerContextServiceImpl
- java.lang.Object
-
- de.hybris.platform.datahubbackoffice.service.datahub.impl.DataHubServerContextServiceImpl
-
- All Implemented Interfaces:
DataHubServerAware,DataHubServerContextService
public class DataHubServerContextServiceImpl extends java.lang.Object implements DataHubServerAware, DataHubServerContextService
A factory for creating REST clients based on the DataHub instance selected by the user.
-
-
Constructor Summary
Constructors Constructor Description DataHubServerContextServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<DataHubServer>getAllServers()Retrieves all DataHub Servers available.DataHubServergetContextDataHubServer()Returns the DataHub server the user is working with.voidsetDataHubServer(DataHubServer server)Sets DataHub server the user will operate with.voidsetNameService(DataHubNameService service)Injects DataHub server name service to be used.
-
-
-
Method Detail
-
getContextDataHubServer
public DataHubServer getContextDataHubServer()
Description copied from interface:DataHubServerContextServiceReturns the DataHub server the user is working with.- Specified by:
getContextDataHubServerin interfaceDataHubServerContextService- Returns:
- DataHub server currently being in the context of the user operations.
-
getAllServers
public java.util.Collection<DataHubServer> getAllServers()
Description copied from interface:DataHubServerContextServiceRetrieves all DataHub Servers available.- Specified by:
getAllServersin interfaceDataHubServerContextService- Returns:
- a collection of all servers available for the user to choose or an empty collection, if no servers configured.
-
setDataHubServer
public void setDataHubServer(DataHubServer server)
Sets DataHub server the user will operate with.- Specified by:
setDataHubServerin interfaceDataHubServerAware- Parameters:
server- - instance ofDataHubServerInfo- Throws:
java.lang.IllegalArgumentException- - whenDataHubServerInfois null orDataHubServerInfo.getLocation()method returns null.
-
setNameService
public void setNameService(DataHubNameService service)
Injects DataHub server name service to be used.- Parameters:
service- a service implementation to use.
-
-