Examples of asBoolean()


Examples of org.jboss.dmr.ModelNode.asBoolean()

    @Override
    protected void revertUpdateToRuntime(final OperationContext context, final String handlerName, final ModelNode model, final ModelNode originalModel, final FileHandler handler) throws OperationFailedException {
        final ModelNode autoflush = AUTOFLUSH.resolveModelAttribute(context, originalModel);
        if (autoflush.isDefined()) {
            handler.setAutoFlush(autoflush.asBoolean());
        }
        final ModelNode append = APPEND.resolveModelAttribute(context, originalModel);
        if (append.isDefined()) {
            handler.setAppend(append.asBoolean());
        }
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

        if (autoflush.isDefined()) {
            handler.setAutoFlush(autoflush.asBoolean());
        }
        final ModelNode append = APPEND.resolveModelAttribute(context, originalModel);
        if (append.isDefined()) {
            handler.setAppend(append.asBoolean());
        }
    }
}
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

    @Override
    protected void updateRuntime(final OperationContext context, final ServiceBuilder<Handler> serviceBuilder, final String name, final T service, final ModelNode model) throws OperationFailedException {
        final ModelNode autoflush = AUTOFLUSH.resolveModelAttribute(context, model);
        if (autoflush.isDefined()) {
            service.setAutoflush(autoflush.asBoolean());
        }
    }

    private static List<AttributeDefinition> join(final AttributeDefinition[] supplied, final AttributeDefinition... added) {
        final List<AttributeDefinition> result = new ArrayList<AttributeDefinition>();
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

    @Override
    protected void updateRuntime(final OperationContext context, final ServiceBuilder<Handler> serviceBuilder, final String name, final SizeRotatingFileHandlerService service, final ModelNode model) throws OperationFailedException {
        super.updateRuntime(context, serviceBuilder, name, service, model);
        final ModelNode append = APPEND.resolveModelAttribute(context, model);
        if (append.isDefined()) {
            service.setAppend(append.asBoolean());
        }
        final ModelNode file = FILE.resolveModelAttribute(context, model);
        if (file.isDefined()) {
            final HandlerFileService fileService = new HandlerFileService(PATH.resolveModelAttribute(context, file).asString());
            final ServiceBuilder<?> fileBuilder = context.getServiceTarget().addService(LogServices.handlerFileName(name), fileService);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

    @Override
    protected void updateRuntime(final OperationContext context, final ServiceBuilder<Handler> serviceBuilder, final String name, final FileHandlerService service, final ModelNode model) throws OperationFailedException {
        super.updateRuntime(context, serviceBuilder, name, service, model);
        final ModelNode append = APPEND.resolveModelAttribute(context, model);
        if (append.isDefined()) {
            service.setAppend(append.asBoolean());
        }
        final ServiceTarget serviceTarget = context.getServiceTarget();
        final ModelNode file = FILE.resolveModelAttribute(context, model);
        if (file.isDefined()) {
            final HandlerFileService fileService = new HandlerFileService(PATH.validateOperation(file).asString());
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

            resource.setNames(value);
        } else if (IgnoredDomainTypeResourceDefinition.WILDCARD.getName().equals(attribute)) {

            IgnoredDomainTypeResourceDefinition.WILDCARD.validateOperation(mockOp);
            ModelNode wildcardNode =  IgnoredDomainTypeResourceDefinition.WILDCARD.resolveModelAttribute(context, mockOp);
            Boolean wildcard = wildcardNode.isDefined() ? wildcardNode.asBoolean() : null;
            resource.setWildcard(wildcard);
        }

        boolean booting = context.isBooting();
        if (!booting) {
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

            throw HostControllerMessages.MESSAGES.cannotIgnoreTypeHost(ModelDescriptionConstants.HOST);
        }

        ModelNode names = IgnoredDomainTypeResourceDefinition.NAMES.validateOperation(operation);
        ModelNode wildcardNode = IgnoredDomainTypeResourceDefinition.WILDCARD.validateOperation(operation);
        Boolean wildcard = wildcardNode.isDefined() ? wildcardNode.asBoolean() : null;
        IgnoreDomainResourceTypeResource resource = new IgnoreDomainResourceTypeResource(type, names, wildcard);
        context.addResource(PathAddress.EMPTY_ADDRESS, resource);

        boolean booting = context.isBooting();
        if (!booting) {
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

                    ManagementLookup stats = null;
                    boolean oldSetting = false;
                    {
                        final ModelNode value = operation.get(ModelDescriptionConstants.VALUE).resolve();
                        validator.validateResolvedParameter(ModelDescriptionConstants.VALUE, value);
                        final boolean setting = value.asBoolean();


                        final PathAddress address = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR));
                        final String puName = address.getLastElement().getValue();
                        stats = ManagementLookup.create(persistenceUnitRegistry, puName);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

                .setInitialMode(ServiceController.Mode.ACTIVE).install());

            // add security management service
            ModelNode modelNode = model.get(Constants.DEEP_COPY_SUBJECT_MODE);
            final SecurityManagementService securityManagementService = new SecurityManagementService(
                AUTHENTICATION_MANAGER, modelNode.isDefined() && modelNode.asBoolean(), CALLBACK_HANDLER,
                AUTHORIZATION_MANAGER, AUDIT_MANAGER, IDENTITY_TRUST_MANAGER, MAPPING_MANAGER);
            newControllers.add(target.addService(SecurityManagementService.SERVICE_NAME, securityManagementService)
                 .addDependency(Services.JBOSS_SERVICE_MODULE_LOADER, ServiceModuleLoader.class, securityManagementService.getServiceModuleLoaderInjectedValue())
                .addListener(verificationHandler)
                .setInitialMode(ServiceController.Mode.ACTIVE).install());
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asBoolean()

        ModelNode op = ModelUtil.createOpNode(null, ValidateAddressOperationHandler.OPERATION_NAME);
        op.get(VALUE).setEmptyList();
        final ModelNode result = executeOperation(op);
        assertTrue(result.hasDefined(VALID));
        final ModelNode value = result.get(VALID);
        assertTrue(value.asBoolean());
        assertFalse(result.hasDefined(PROBLEM));
    }

    @Test
    public void testValidPath() throws IOException, MgmtOperationException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.