Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default connectorUserId with serverUserId #7567

Merged
merged 2 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,17 @@ private void refreshRegisteredIntegrationConnector(RegisteredIntegrationConnecto
{
IntegrationServiceHandler integrationServiceHandler = integrationServiceHandlerMap.get(serviceURLMarker);

String userId = serverUserId;

if (registeredIntegrationConnectorElement.getRegistrationProperties().getConnectorUserId() != null)
{
userId = registeredIntegrationConnectorElement.getRegistrationProperties().getConnectorUserId();
}

connectorHandler = new IntegrationConnectorHandler(registeredIntegrationConnectorElement.getConnectorId(),
registeredIntegrationConnectorElement.getElementHeader().getGUID(),
registeredIntegrationConnectorElement.getRegistrationProperties().getConnectorName(),
registeredIntegrationConnectorElement.getRegistrationProperties().getConnectorUserId(),
userId,
registeredIntegrationConnectorElement.getRegistrationProperties().getStartDate(),
registeredIntegrationConnectorElement.getRegistrationProperties().getStopDate(),
registeredIntegrationConnectorElement.getRegistrationProperties().getRefreshTimeInterval(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
public class IntegrationServiceHandler
{
private final String localServerName; /* Initialized in constructor */
private final String localServerUserId; /* Initialized in constructor */
private final IntegrationServiceConfig serviceConfig; /* Initialized in constructor */
private final IntegrationContextManager contextManager; /* Initialized in constructor */
private final AuditLog auditLog; /* Initialized in constructor */
Expand All @@ -45,11 +46,13 @@ public class IntegrationServiceHandler
* @param auditLog logging destination
*/
public IntegrationServiceHandler(String localServerName,
String localServerUserId,
IntegrationServiceConfig serviceConfig,
IntegrationContextManager contextManager,
AuditLog auditLog)
{
this.localServerName = localServerName;
this.localServerUserId = localServerUserId;
this.serviceConfig = serviceConfig;
this.contextManager = contextManager;
this.auditLog = auditLog;
Expand Down Expand Up @@ -101,10 +104,16 @@ public List<IntegrationConnectorHandler> initialize()
connectorConfig.setPermittedSynchronization(serviceConfig.getDefaultPermittedSynchronization());
}

String userId = localServerUserId;

if (connectorConfig.getConnectorUserId() != null)
{
userId = connectorConfig.getConnectorUserId();
}
IntegrationConnectorHandler connectorHandler = new IntegrationConnectorHandler(connectorConfig.getConnectorId(),
null,
connectorConfig.getConnectorName(),
connectorConfig.getConnectorUserId(),
userId,
null,
null,
connectorConfig.getRefreshTimeInterval(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

/**
* IntegrationDaemonOperationalServices is responsible for controlling the startup and shutdown of
* of the integration daemon services.
* the integration daemon services.
*/
public class IntegrationDaemonOperationalServices
{
Expand Down Expand Up @@ -155,6 +155,7 @@ else if (staticConfiguration.isEmpty())
contextManager.createClients();

IntegrationServiceHandler integrationServiceHandler = new IntegrationServiceHandler(localServerName,
localServerUserId,
integrationServiceConfig,
contextManager,
auditLog);
Expand Down