Search in sources :

Example 1 with EntityProviderService

use of org.wildfly.extension.picketlink.federation.service.EntityProviderService in project wildfly by wildfly.

the class HandlerAddHandler method performRuntime.

@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
    PathAddress pathAddress = PathAddress.pathAddress(operation.get(ADDRESS));
    String providerAlias = pathAddress.subAddress(0, pathAddress.size() - 1).getLastElement().getValue();
    EntityProviderService providerService = EntityProviderService.getService(context, providerAlias);
    Handler handler = toHandlerConfig(context, model);
    providerService.addHandler(handler);
}
Also used : PathAddress(org.jboss.as.controller.PathAddress) Handler(org.picketlink.config.federation.handler.Handler) AbstractAddStepHandler(org.jboss.as.controller.AbstractAddStepHandler) UniqueTypeValidationStepHandler(org.wildfly.extension.picketlink.common.model.validator.UniqueTypeValidationStepHandler) AlternativeAttributeValidationStepHandler(org.wildfly.extension.picketlink.common.model.validator.AlternativeAttributeValidationStepHandler) ServiceVerificationHandler(org.jboss.as.controller.ServiceVerificationHandler) EntityProviderService(org.wildfly.extension.picketlink.federation.service.EntityProviderService)

Example 2 with EntityProviderService

use of org.wildfly.extension.picketlink.federation.service.EntityProviderService in project wildfly by wildfly.

the class HandlerParameterAddHandler method performRuntime.

@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
    PathAddress pathAddress = PathAddress.pathAddress(operation.get(ADDRESS));
    String providerAlias = pathAddress.subAddress(0, pathAddress.size() - 2).getLastElement().getValue();
    String handlerType = pathAddress.subAddress(0, pathAddress.size() - 1).getLastElement().getValue();
    EntityProviderService providerService = EntityProviderService.getService(context, providerAlias);
    String handlerParameterName = pathAddress.getLastElement().getValue();
    KeyValueType keyValueType = toHandlerParameterConfig(context, handlerParameterName, model);
    providerService.addHandlerParameter(handlerType, keyValueType);
}
Also used : PathAddress(org.jboss.as.controller.PathAddress) KeyValueType(org.picketlink.config.federation.KeyValueType) EntityProviderService(org.wildfly.extension.picketlink.federation.service.EntityProviderService)

Example 3 with EntityProviderService

use of org.wildfly.extension.picketlink.federation.service.EntityProviderService in project wildfly by wildfly.

the class HandlerRemoveHandler method performRuntime.

@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
    PathAddress pathAddress = PathAddress.pathAddress(operation.get(ADDRESS));
    String providerAlias = pathAddress.subAddress(0, pathAddress.size() - 1).getLastElement().getValue();
    EntityProviderService providerService = EntityProviderService.getService(context, providerAlias);
    String handlerType = HandlerResourceDefinition.getHandlerType(context, model);
    providerService.removeHandler(handlerType);
}
Also used : PathAddress(org.jboss.as.controller.PathAddress) EntityProviderService(org.wildfly.extension.picketlink.federation.service.EntityProviderService)

Example 4 with EntityProviderService

use of org.wildfly.extension.picketlink.federation.service.EntityProviderService in project wildfly by wildfly.

the class HandlerParameterRemoveHandler method performRuntime.

@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
    PathAddress pathAddress = PathAddress.pathAddress(operation.get(ADDRESS));
    String providerAlias = pathAddress.subAddress(0, pathAddress.size() - 2).getLastElement().getValue();
    String handlerType = pathAddress.subAddress(0, pathAddress.size() - 1).getLastElement().getValue();
    EntityProviderService providerService = EntityProviderService.getService(context, providerAlias);
    String handlerParameterName = pathAddress.getLastElement().getValue();
    providerService.removeHandlerParameter(handlerType, handlerParameterName);
}
Also used : PathAddress(org.jboss.as.controller.PathAddress) EntityProviderService(org.wildfly.extension.picketlink.federation.service.EntityProviderService)

Aggregations

PathAddress (org.jboss.as.controller.PathAddress)4 EntityProviderService (org.wildfly.extension.picketlink.federation.service.EntityProviderService)4 AbstractAddStepHandler (org.jboss.as.controller.AbstractAddStepHandler)1 ServiceVerificationHandler (org.jboss.as.controller.ServiceVerificationHandler)1 KeyValueType (org.picketlink.config.federation.KeyValueType)1 Handler (org.picketlink.config.federation.handler.Handler)1 AlternativeAttributeValidationStepHandler (org.wildfly.extension.picketlink.common.model.validator.AlternativeAttributeValidationStepHandler)1 UniqueTypeValidationStepHandler (org.wildfly.extension.picketlink.common.model.validator.UniqueTypeValidationStepHandler)1