Class DataHubServerContextServiceImpl
java.lang.Object
de.hybris.platform.datahubbackoffice.service.datahub.impl.DataHubServerContextServiceImpl
- All Implemented Interfaces:
DataHubServerAware,DataHubServerContextService
public class DataHubServerContextServiceImpl
extends Object
implements DataHubServerAware, DataHubServerContextService
A factory for creating REST clients based on the DataHub instance selected by the user.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves all DataHub Servers available.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.
-
Constructor Details
-
DataHubServerContextServiceImpl
public DataHubServerContextServiceImpl()
-
-
Method Details
-
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
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:
-
setDataHubServer
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:
IllegalArgumentException- if provided server isnull- See Also:
-
setNameService
Injects DataHub server name service to be used.- Parameters:
service- a service implementation to use.
-