private static ValidationConfiguration createWithGlobalOperations() { ValidationConfiguration config = new ValidationConfiguration(); //TODO should be possible to validate the operations executed... final ModelNode ROOT_ADDR = new ModelNode().setEmptyList(); //Exclude the operations where one of the reply properties is known to have {type=OBJECT,value-type=UNDEFINED} config.allowNullValueTypeForOperationParameter(ROOT_ADDR, VALIDATE_OPERATION, VALUE); config.allowNullValueTypeForOperationParameter(ROOT_ADDR, ValidateAddressOperationHandler.OPERATION_NAME, VALUE); //Exclude the operations where reply-properties is known to have {type=OBJECT,value-type=UNDEFINED} config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_OPERATION_DESCRIPTION_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_RESOURCE_DESCRIPTION_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_ATTRIBUTE_OPERATION); return config; }
private static ValidationConfiguration createWithGlobalOperations() { ValidationConfiguration config = new ValidationConfiguration(); //TODO should be possible to validate the operations executed... final ModelNode ROOT_ADDR = new ModelNode().setEmptyList(); //Exclude the operations where one of the reply properties is known to have {type=OBJECT,value-type=UNDEFINED} config.allowNullValueTypeForOperationParameter(ROOT_ADDR, VALIDATE_OPERATION, VALUE); config.allowNullValueTypeForOperationParameter(ROOT_ADDR, ValidateAddressOperationHandler.OPERATION_NAME, VALUE); //Exclude the operations where reply-properties is known to have {type=OBJECT,value-type=UNDEFINED} config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_OPERATION_DESCRIPTION_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_RESOURCE_DESCRIPTION_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(ROOT_ADDR, READ_ATTRIBUTE_OPERATION); return config; }
private static ValidationConfiguration createForHost() { ValidationConfiguration config = createWithGlobalOperations(); config.allowNullValueTypeForOperationReplyProperties(createInterfaceMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createInterfaceMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createPathMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createPathMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createServerConfigInterfaceMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createServerConfigPathMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createServerConfigInterfaceMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createServerConfigPathMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForAttribute(new ModelNode(), DOMAIN_CONTROLLER); config.allowNullValueTypeForOperationReplyProperties(createHostPlatformMBeanAddress(PlatformMBeanConstants.COMPILATION), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createHostPlatformMBeanAddress(PlatformMBeanConstants.THREADING), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createHostPlatformMBeanAddress(PlatformMBeanConstants.OPERATING_SYSTEM), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createHostPlatformMBeanAddress(PlatformMBeanConstants.MEMORY_POOL), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createHostPlatformMBeanAddress(PlatformMBeanConstants.RUNTIME), READ_RESOURCE_OPERATION); final ModelNode MEMORY_POOL_CHILDREN_ADDR = createHostPlatformMBeanAddress(PlatformMBeanConstants.MEMORY_POOL); MEMORY_POOL_CHILDREN_ADDR.add(NAME, "*"); config.allowNullValueTypeForOperationReplyProperties(MEMORY_POOL_CHILDREN_ADDR, READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationParameter(new ModelNode().add(HOST, "master"), ValidateAddressOperationHandler.OPERATION_NAME, VALUE); return config; }
private static ValidationConfiguration createForHost() { ValidationConfiguration config = createWithGlobalOperations(); config.allowNullValueTypeForOperationReplyProperties(createInterfaceMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createInterfaceMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createPathMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createPathMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createServerConfigInterfaceMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createServerConfigPathMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createServerConfigInterfaceMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createServerConfigPathMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForAttribute(new ModelNode(), DOMAIN_CONTROLLER); config.allowNullValueTypeForOperationReplyProperties(createHostPlatformMBeanAddress(PlatformMBeanConstants.COMPILATION), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createHostPlatformMBeanAddress(PlatformMBeanConstants.THREADING), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createHostPlatformMBeanAddress(PlatformMBeanConstants.OPERATING_SYSTEM), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createHostPlatformMBeanAddress(PlatformMBeanConstants.MEMORY_POOL), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createHostPlatformMBeanAddress(PlatformMBeanConstants.RUNTIME), READ_RESOURCE_OPERATION); final ModelNode MEMORY_POOL_CHILDREN_ADDR = createHostPlatformMBeanAddress(PlatformMBeanConstants.MEMORY_POOL); MEMORY_POOL_CHILDREN_ADDR.add(NAME, "*"); config.allowNullValueTypeForOperationReplyProperties(MEMORY_POOL_CHILDREN_ADDR, READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationParameter(new ModelNode().add(HOST, "master"), ValidateAddressOperationHandler.OPERATION_NAME, VALUE); return config; }
private static ValidationConfiguration createForStandalone() { ValidationConfiguration config = createWithGlobalOperations(); config.allowNullValueTypeForOperationReplyProperties(createInterfaceMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createInterfaceMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createPathMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createPathMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createStandlonePlatformMBeanAddress(PlatformMBeanConstants.COMPILATION), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createStandlonePlatformMBeanAddress(PlatformMBeanConstants.THREADING), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createStandlonePlatformMBeanAddress(PlatformMBeanConstants.OPERATING_SYSTEM), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createStandlonePlatformMBeanAddress(PlatformMBeanConstants.MEMORY_POOL), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createStandlonePlatformMBeanAddress(PlatformMBeanConstants.RUNTIME), READ_RESOURCE_OPERATION); final ModelNode MEMORY_POOL_CHILDREN_ADDR = createStandlonePlatformMBeanAddress(PlatformMBeanConstants.MEMORY_POOL); MEMORY_POOL_CHILDREN_ADDR.add(NAME, "*"); config.allowNullValueTypeForOperationReplyProperties(MEMORY_POOL_CHILDREN_ADDR, READ_RESOURCE_OPERATION); return config; }
private static ValidationConfiguration createForStandalone() { ValidationConfiguration config = createWithGlobalOperations(); config.allowNullValueTypeForOperationReplyProperties(createInterfaceMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createInterfaceMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createPathMBeanAddress(), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createPathMBeanAddress(), READ_ATTRIBUTE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createStandlonePlatformMBeanAddress(PlatformMBeanConstants.COMPILATION), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createStandlonePlatformMBeanAddress(PlatformMBeanConstants.THREADING), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createStandlonePlatformMBeanAddress(PlatformMBeanConstants.OPERATING_SYSTEM), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createStandlonePlatformMBeanAddress(PlatformMBeanConstants.MEMORY_POOL), READ_RESOURCE_OPERATION); config.allowNullValueTypeForOperationReplyProperties(createStandlonePlatformMBeanAddress(PlatformMBeanConstants.RUNTIME), READ_RESOURCE_OPERATION); final ModelNode MEMORY_POOL_CHILDREN_ADDR = createStandlonePlatformMBeanAddress(PlatformMBeanConstants.MEMORY_POOL); MEMORY_POOL_CHILDREN_ADDR.add(NAME, "*"); config.allowNullValueTypeForOperationReplyProperties(MEMORY_POOL_CHILDREN_ADDR, READ_RESOURCE_OPERATION); return config; }