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

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


        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


     * Create the ServerAddHandler
     */
    private ServerAddHandler() {
        validator.registerValidator(GROUP, new StringLengthValidator(1, Integer.MAX_VALUE, false, true));
        validator.registerValidator(SOCKET_BINDING_GROUP, new StringLengthValidator(1, Integer.MAX_VALUE, true, true));
        validator.registerValidator(SOCKET_BINDING_PORT_OFFSET, new IntRangeValidator(0, 65535, true, true));
        validator.registerValidator(AUTO_START, new ModelTypeValidator(ModelType.BOOLEAN, true, true));
    }
View Full Code Here

        final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(WSSubsystemProviders.SUBSYSTEM);
        registration.registerOperationHandler(ADD, WSSubsystemAdd.INSTANCE, WSSubsystemProviders.SUBSYSTEM_ADD, false);
        registration.registerOperationHandler(DESCRIBE, WSSubsystemDescribe.INSTANCE, WSSubsystemProviders.SUBSYSTEM_DESCRIBE, false, PRIVATE);
        registration.registerOperationHandler(REMOVE, WSSubsystemRemove.INSTANCE, WSSubsystemProviders.SUBSYSTEM_REMOVE, false);
        registration.registerReadWriteAttribute(WSDL_HOST, null, new WSSubsystemAttributeChangeHandler(new StringLengthValidator(1, Integer.MAX_VALUE, true, true)), Storage.CONFIGURATION);
        registration.registerReadWriteAttribute(WSDL_PORT, null, new WSSubsystemAttributeChangeHandler(new IntRangeValidator(1, Integer.MAX_VALUE, true, true)), Storage.CONFIGURATION);
        registration.registerReadWriteAttribute(WSDL_SECURE_PORT, null, new WSSubsystemAttributeChangeHandler(new IntRangeValidator(1, Integer.MAX_VALUE, true, true)), Storage.CONFIGURATION);
        registration.registerReadWriteAttribute(MODIFY_WSDL_ADDRESS, null, new WSSubsystemAttributeChangeHandler(new ModelTypeValidator(ModelType.BOOLEAN, true)), Storage.CONFIGURATION);
        // endpoint configuration
        final ManagementResourceRegistration endpointConfig = registration.registerSubModel(endpointConfigPath, WSSubsystemProviders.ENDPOINT_CONFIG_DESCRIPTION);
        endpointConfig.registerOperationHandler(ADD, EndpointConfigAdd.INSTANCE, WSSubsystemProviders.ENDPOINT_CONFIG_ADD_DESCRIPTION, false);
        endpointConfig.registerOperationHandler(REMOVE, EndpointConfigRemove.INSTANCE, WSSubsystemProviders.ENDPOINT_CONFIG_REMOVE_DESCRIPTION, false);
View Full Code Here

        //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 void registerReadWriteIntAttribute(ManagementResourceRegistration resourceRegistration, AttributeDefinition attr) {
        resourceRegistration.registerReadWriteAttribute(attr, null, new ThreadWriteAttributeHandler(attr, processType));
    }

    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)).build();
    }
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

        //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

        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

        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

    private final ParametersValidator idsValidator = new ParametersValidator();
    private final ParametersValidator depthValidator = new ParametersValidator();
    private final ParametersValidator lockedValidator = new ParametersValidator();
    private ThreadMXBeanThreadInfosHandler() {
        idsValidator.registerValidator(PlatformMBeanConstants.IDS, new ListValidator(new LongRangeValidator(1)));
        depthValidator.registerValidator(PlatformMBeanConstants.MAX_DEPTH, new IntRangeValidator(1, Integer.MAX_VALUE, false, false));
        lockedValidator.registerValidator(PlatformMBeanConstants.LOCKED_MONITORS, new ModelTypeValidator(ModelType.BOOLEAN));
        lockedValidator.registerValidator(PlatformMBeanConstants.LOCKED_SYNCHRONIZERS, new ModelTypeValidator(ModelType.BOOLEAN));
    }
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.