Search in sources :

Example 1 with AuthIntegrationStrategy

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);
}
Also used : Integration(com.epam.ta.reportportal.entity.integration.Integration) AuthIntegrationStrategy(com.epam.reportportal.auth.integration.handler.impl.strategy.AuthIntegrationStrategy) AuthIntegrationType(com.epam.reportportal.auth.integration.AuthIntegrationType) IntegrationType(com.epam.ta.reportportal.entity.integration.IntegrationType)

Example 2 with AuthIntegrationStrategy

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);
}
Also used : Integration(com.epam.ta.reportportal.entity.integration.Integration) AuthIntegrationStrategy(com.epam.reportportal.auth.integration.handler.impl.strategy.AuthIntegrationStrategy) AuthIntegrationType(com.epam.reportportal.auth.integration.AuthIntegrationType) IntegrationType(com.epam.ta.reportportal.entity.integration.IntegrationType)

Aggregations

AuthIntegrationType (com.epam.reportportal.auth.integration.AuthIntegrationType)2 AuthIntegrationStrategy (com.epam.reportportal.auth.integration.handler.impl.strategy.AuthIntegrationStrategy)2 Integration (com.epam.ta.reportportal.entity.integration.Integration)2 IntegrationType (com.epam.ta.reportportal.entity.integration.IntegrationType)2