@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Add a Stage.MODEL handler to validate that when this step and all other steps that may be part of // a containing composite operation are done, the model doesn't violate the requirement that "interface" // is an alternative to "socket-binding" context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode model = context.readResource(PathAddress.EMPTY_ADDRESS).getModel(); if (model.hasDefined(NativeManagementResourceDefinition.INTERFACE.getName()) && (model.hasDefined(NativeManagementResourceDefinition.SOCKET_BINDING.getName()))) { throw ServerMessages.MESSAGES.conflictingConfigs(NativeManagementResourceDefinition.INTERFACE.getName(), NativeManagementResourceDefinition.SOCKET_BINDING.getName()); } context.stepCompleted(); } }, OperationContext.Stage.MODEL); super.execute(context, operation); }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Add a Stage.MODEL handler to validate that when this step and all other steps that may be part of // a containing composite operation are done, the model doesn't violate the requirement that "interface" // is an alternative to "socket-binding" context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode model = context.readResource(PathAddress.EMPTY_ADDRESS).getModel(); if (model.hasDefined(NativeManagementResourceDefinition.INTERFACE.getName()) && (model.hasDefined(NativeManagementResourceDefinition.SOCKET_BINDING.getName()))) { throw ServerMessages.MESSAGES.conflictingConfigs(NativeManagementResourceDefinition.INTERFACE.getName(), NativeManagementResourceDefinition.SOCKET_BINDING.getName()); } context.stepCompleted(); } }, OperationContext.Stage.MODEL); super.execute(context, operation); }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Add a Stage.MODEL handler to validate that when this step and all other steps that may be part of // a containing composite operation are done, the model doesn't violate the requirement that "interface" // is an alternative to "socket-binding" context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode model = context.readResource(PathAddress.EMPTY_ADDRESS).getModel(); if (model.hasDefined(INTERFACE.getName()) && (model.hasDefined(HttpManagementResourceDefinition.SOCKET_BINDING.getName()) || model.hasDefined(HttpManagementResourceDefinition.SECURE_SOCKET_BINDING.getName()) )) { throw ServerMessages.MESSAGES.illegalCombinationOfHttpManagementInterfaceConfigurations( INTERFACE.getName(), HttpManagementResourceDefinition.SOCKET_BINDING.getName(), HttpManagementResourceDefinition.SECURE_SOCKET_BINDING.getName()); } context.stepCompleted(); } }, OperationContext.Stage.MODEL); super.execute(context, operation); }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { if (!alternativeAttributes.isEmpty()) { context.addStep(new AlternativeAttributeValidationStepHandler(alternativeAttributes .toArray(new AttributeDefinition[alternativeAttributes.size()])), OperationContext.Stage.MODEL); } doRegisterModelWriteAttributeHandler(context, operation); super.execute(context, operation); } };
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { if (!alternativeAttributes.isEmpty()) { context.addStep(new AlternativeAttributeValidationStepHandler(alternativeAttributes .toArray(new AttributeDefinition[alternativeAttributes.size()])), OperationContext.Stage.MODEL); } doRegisterModelWriteAttributeHandler(context, operation); super.execute(context, operation); } };
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { super.execute(context, operation); final ModelNode model = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel(); ModelNode dc = model.get(DOMAIN_CONTROLLER); if (operation.hasDefined(VALUE, LOCAL)) { dc.get(LOCAL).setEmptyObject(); if (dc.has(REMOTE)) { dc.remove(REMOTE); } if (context.isBooting()) { initializeLocalDomain(null); } } else if (operation.hasDefined(VALUE, REMOTE)) { if (dc.has(LOCAL)) { dc.remove(LOCAL); } final ModelNode remoteDC = dc.get(REMOTE); secureRemoteDomain(context, operation, remoteDC); if (context.isBooting()) { initializeRemoteDomain(context, remoteDC); } } }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { super.execute(context, operation); final ModelNode model = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel(); ModelNode dc = model.get(DOMAIN_CONTROLLER); if (operation.hasDefined(VALUE, LOCAL)) { dc.get(LOCAL).setEmptyObject(); if (dc.has(REMOTE)) { dc.remove(REMOTE); } if (context.isBooting()) { initializeLocalDomain(null); } } else if (operation.hasDefined(VALUE, REMOTE)) { if (dc.has(LOCAL)) { dc.remove(LOCAL); } final ModelNode remoteDC = dc.get(REMOTE); secureRemoteDomain(context, operation, remoteDC); if (context.isBooting()) { initializeRemoteDomain(context, remoteDC); } } }