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.voidreset()Resets all servers and current context DataHub server in the context of this service.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.
-
reset
public void reset()
Description copied from interface:DataHubServerContextServiceResets all servers and current context DataHub server in the context of this service. Implementations must provide this functionality. Default implementation in this interface does nothing.- Specified by:
resetin interfaceDataHubServerContextService- See Also:
DataHubServerContextService.getContextDataHubServer(),DataHubServerContextService.getAllServers()
-
setDataHubServer
public void setDataHubServer(DataHubServer server)
Sets DataHub server the user will operate with.- Specified by:
setDataHubServerin interfaceDataHubServerAware- Parameters:
server- a DataHub server to be used as the context server.- Throws:
java.lang.IllegalArgumentException- if provided server isnull- See Also:
getContextDataHubServer()
-
setNameService
public void setNameService(DataHubNameService service)
Injects DataHub server name service to be used.- Parameters:
service- a service implementation to use.
-
-