Package org.jboss.as.controller.operations.validation

Examples of org.jboss.as.controller.operations.validation.IntRangeValidator


        //populate validators

        final ParameterValidator filterValidator = new ModelTypeValidator(ModelType.STRING, true, false);
        final ParameterValidator queueNameValidator = new StringLengthValidator(1);
        final ParameterValidator rejectDuplicatesValidator = new ModelTypeValidator(ModelType.BOOLEAN, true);
        final ParameterValidator priorityValidator = new IntRangeValidator(0, 9, false, false);

        singleOptionalFilterValidator.registerValidator(FILTER.getName(), filterValidator);
        singleMessageIdValidator.registerValidator(MESSAGE_ID, messageIdValidator);
        changeMessagePriorityValidator.registerValidator(MESSAGE_ID, messageIdValidator);
        changeMessagePriorityValidator.registerValidator(NEW_PRIORITY, priorityValidator);
View Full Code Here


    private static SimpleAttributeDefinition createIntAttribute(String name, Attribute attribute, int defaultValue) {
        return SimpleAttributeDefinitionBuilder.create(name, ModelType.INT, true)
                .setDefaultValue(new ModelNode().set(defaultValue))
                .setXmlName(attribute.getLocalName())
                .setValidator(new IntRangeValidator(1, true))
                .setAllowExpression(true)
                .build();
    }
View Full Code Here

        this.rootRegistration = rootRegistration;
        this.overallConfigPersister = overallConfigPersister;
        this.fileRepository = fileRepository;
        this.hostControllerInfo = hostControllerInfo;

        this.parametersValidator.registerValidator(PORT, new IntRangeValidator(1, 65535, false, true));
        this.parametersValidator.registerValidator(HOST, new StringLengthValidator(1, Integer.MAX_VALUE, false, true));
    }
View Full Code Here

public class BindingMulticastPortHandler extends AbstractBindingWriteHandler {

    public static final BindingMulticastPortHandler INSTANCE = new BindingMulticastPortHandler();

    private BindingMulticastPortHandler() {
        super(new IntRangeValidator(1, 65535, true, true), new IntRangeValidator(1, 65535, true, false));
    }
View Full Code Here

public class BindingGroupPortOffsetHandler extends ReloadRequiredWriteAttributeHandler {

    public static final BindingGroupPortOffsetHandler INSTANCE = new BindingGroupPortOffsetHandler();

    private BindingGroupPortOffsetHandler() {
        super(new IntRangeValidator(0, 65535, true, true));
    }
View Full Code Here

    @Override
    public void registerAttributes(ManagementResourceRegistration resourceRegistration) {

        resourceRegistration.registerReadWriteAttribute(SOURCE_PORT, null, new OutboundSocketBindingWriteHandler(SOURCE_PORT.getValidator(),
                new IntRangeValidator(0, 65535, true, false), remoteDestination));
        resourceRegistration.registerReadWriteAttribute(SOURCE_INTERFACE, null, new OutboundSocketBindingWriteHandler(SOURCE_INTERFACE.getValidator(),
                new StringLengthValidator(1, Integer.MAX_VALUE, true, false), remoteDestination));
        resourceRegistration.registerReadWriteAttribute(FIXED_SOURCE_PORT, null, new OutboundSocketBindingWriteHandler(new ModelTypeValidator(ModelType.BOOLEAN, true, true),
                new ModelTypeValidator(ModelType.BOOLEAN, true, false), remoteDestination));
    }
View Full Code Here

public class BindingPortHandler extends AbstractBindingWriteHandler {

    public static final BindingPortHandler INSTANCE = new BindingPortHandler();

    private BindingPortHandler() {
        super(new IntRangeValidator(0, 65535, false, true), new IntRangeValidator(0, 65535, false, false));
    }
View Full Code Here

        super.registerAttributes(resourceRegistration);
        resourceRegistration.registerReadWriteAttribute(HOST, null, new OutboundSocketBindingWriteHandler(HOST.getValidator(),
                new StringLengthValidator(1, Integer.MAX_VALUE, false, true), true));
        resourceRegistration.registerReadWriteAttribute(PORT, null, new OutboundSocketBindingWriteHandler(PORT.getValidator(),
                new IntRangeValidator(0, 65535, false, false), true));
    }
View Full Code Here

    private final ParametersValidator streamValidator = new ParametersValidator();

    public DeploymentUploadStreamAttachmentHandler(final ContentRepository repository) {
        super(repository);
        this.streamValidator.registerValidator(INPUT_STREAM_INDEX, new IntRangeValidator(0));
    }
View Full Code Here

        public IntRangeValidatingHandler(final int min, final boolean nullable) {
            this(min, Integer.MAX_VALUE, nullable, true);
        }

        public IntRangeValidatingHandler(final int min, final int max, final boolean nullable, final boolean allowExpressions) {
            super(new IntRangeValidator(min, max, nullable, allowExpressions));
        }
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.operations.validation.IntRangeValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.