use of com.epam.reportportal.auth.integration.handler.impl.strategy.AuthIntegrationStrategy in project service-authorization by reportportal.
the class CreateAuthIntegrationHandlerImpl method createAuthIntegration.
@Override
public AbstractAuthResource createAuthIntegration(AuthIntegrationType type, UpdateAuthRQ request, ReportPortalUser user) {
final IntegrationType integrationType = getIntegrationType(type);
final AuthIntegrationStrategy authIntegrationStrategy = getAuthStragegy(type);
final Integration integration = authIntegrationStrategy.createIntegration(integrationType, request, user.getUsername());
return type.getToResourceMapper().apply(integration);
}
use of com.epam.reportportal.auth.integration.handler.impl.strategy.AuthIntegrationStrategy in project service-authorization by reportportal.
the class CreateAuthIntegrationHandlerImpl method updateAuthIntegration.
@Override
public AbstractAuthResource updateAuthIntegration(AuthIntegrationType type, Long integrationId, UpdateAuthRQ request, ReportPortalUser user) {
final IntegrationType integrationType = getIntegrationType(type);
final AuthIntegrationStrategy authIntegrationStrategy = getAuthStragegy(type);
final Integration integration = authIntegrationStrategy.updateIntegration(integrationType, integrationId, request);
return type.getToResourceMapper().apply(integration);
}
Aggregations