All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.keycloak.subsystem.adapter.extension.RedirecRewritetRuleDefinition Maven / Gradle / Ivy

There is a newer version: 33.0.2.Final
Show newest version
/*
 * Copyright The WildFly Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.keycloak.subsystem.adapter.extension;

import org.jboss.as.controller.AttributeDefinition;
import org.jboss.as.controller.ModelOnlyAddStepHandler;
import org.jboss.as.controller.ModelOnlyResourceDefinition;
import org.jboss.as.controller.PathElement;
import org.jboss.as.controller.SimpleAttributeDefinitionBuilder;
import org.jboss.as.controller.operations.validation.StringLengthValidator;
import org.jboss.dmr.ModelType;

/**
 *
 * @author sblanc
 */
public class RedirecRewritetRuleDefinition extends ModelOnlyResourceDefinition {

    public static final String TAG_NAME = "redirect-rewrite-rule";

    protected static final AttributeDefinition VALUE =
            new SimpleAttributeDefinitionBuilder("value", ModelType.STRING, false)
            .setAllowExpression(true)
            .setValidator(new StringLengthValidator(1, Integer.MAX_VALUE, false, true))
            .build();

    public RedirecRewritetRuleDefinition() {
        super(PathElement.pathElement(TAG_NAME),
                KeycloakExtension.getResourceDescriptionResolver(TAG_NAME),
                new ModelOnlyAddStepHandler(VALUE),
                VALUE);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy