Search in sources :

Example 6 with KeyValueType

use of org.picketlink.config.federation.KeyValueType in project wildfly by wildfly.

the class AbstractEntityProviderAddHandler method configureHandler.

protected static void configureHandler(OperationContext context, ModelNode model, EntityProviderService service) throws OperationFailedException {
    if (model.hasDefined(ModelElement.COMMON_HANDLER.getName())) {
        for (Property handlerProperty : model.get(ModelElement.COMMON_HANDLER.getName()).asPropertyList()) {
            ModelNode handler = handlerProperty.getValue();
            Handler newHandler = toHandlerConfig(context, handler);
            if (handler.hasDefined(COMMON_HANDLER_PARAMETER.getName())) {
                for (Property handlerParameter : handler.get(COMMON_HANDLER_PARAMETER.getName()).asPropertyList()) {
                    String paramName = handlerParameter.getName();
                    ModelNode parameterNode = handlerParameter.getValue();
                    KeyValueType kv = toHandlerParameterConfig(context, paramName, parameterNode);
                    newHandler.add(kv);
                }
            }
            service.addHandler(newHandler);
        }
    }
}
Also used : KeyValueType(org.picketlink.config.federation.KeyValueType) AbstractAddStepHandler(org.jboss.as.controller.AbstractAddStepHandler) Handler(org.picketlink.config.federation.handler.Handler) ModelNode(org.jboss.dmr.ModelNode) Property(org.jboss.dmr.Property)

Aggregations

KeyValueType (org.picketlink.config.federation.KeyValueType)6 AbstractAddStepHandler (org.jboss.as.controller.AbstractAddStepHandler)1 PathAddress (org.jboss.as.controller.PathAddress)1 ModelNode (org.jboss.dmr.ModelNode)1 Property (org.jboss.dmr.Property)1 STSType (org.picketlink.config.federation.STSType)1 TokenProviderType (org.picketlink.config.federation.TokenProviderType)1 Handler (org.picketlink.config.federation.handler.Handler)1 EntityProviderService (org.wildfly.extension.picketlink.federation.service.EntityProviderService)1