protected void updateModel(final OperationContext context, final ModelNode operation) throws OperationFailedException { // verify that the resource exist before removing it context.readResource(PathAddress.EMPTY_ADDRESS, false); context.removeResource(PathAddress.EMPTY_ADDRESS); } }
@Override public void execute(OperationContext context, ModelNode operation) { operationDeprecated(context, operation); context.removeResource(PathAddress.EMPTY_ADDRESS); String name = context.getCurrentAddressValue(); PathAddress protocolAddress = context.getCurrentAddress().getParent(); ModelNode putOperation = Operations.createMapRemoveOperation(protocolAddress, AbstractProtocolResourceDefinition.Attribute.PROPERTIES, name); context.addStep(putOperation, MapOperations.MAP_REMOVE_HANDLER, context.getCurrentStage()); } };
@Override public void execute(OperationContext context, ModelNode operation) { operationDeprecated(context, operation); context.removeResource(PathAddress.EMPTY_ADDRESS); String name = context.getCurrentAddressValue(); PathAddress storeAddress = context.getCurrentAddress().getParent(); ModelNode putOperation = Operations.createMapRemoveOperation(storeAddress, StoreResourceDefinition.Attribute.PROPERTIES, name); context.addStep(putOperation, MapOperations.MAP_REMOVE_HANDLER, context.getCurrentStage()); } };
@Override public void unregister(OperationContext context) { for (String name : context.readResource(PathAddress.EMPTY_ADDRESS).getChildrenNames(ProtocolResourceDefinition.WILDCARD_PATH.getKey())) { context.removeResource(PathAddress.pathAddress(ProtocolResourceDefinition.pathElement(name))); } context.getResourceRegistrationForUpdate().unregisterOverrideModel(context.getCurrentAddressValue()); }
context.removeResource(PathAddress.EMPTY_ADDRESS);
/** * Performs the update to the persistent configuration model. This default implementation simply removes * the targeted resource. * * @param context the operation context * @param operation the operation * @throws OperationFailedException if there is a problem updating the model */ protected void updateModel(final OperationContext context, final ModelNode operation) throws OperationFailedException { context.removeResource(PathAddress.EMPTY_ADDRESS); } }
@Override public void performRemove(final OperationContext context, final ModelNode operation, final LogContextConfiguration logContextConfiguration, final String name, final ModelNode model) throws OperationFailedException { context.removeResource(PathAddress.EMPTY_ADDRESS); }
@Override public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException { context.removeResource(PathAddress.EMPTY_ADDRESS); } }, OperationContext.Stage.MODEL, true);
@Override public Resource removeResource(PathAddress address) throws UnsupportedOperationException { PathAddress fullAddress = activeStep.address.append(address); return primaryContext.removeResource(fullAddress); }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { context.removeResource(PathAddress.EMPTY_ADDRESS); ModelNode validateOp = createOperation(operation); context.addStep(validateOp, VALIDATION_INSTANCE, Stage.MODEL); } }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { context.removeResource(PathAddress.EMPTY_ADDRESS); ModelNode validateOp = createOperation(operation); context.addStep(validateOp, VALIDATION_INSTANCE, Stage.MODEL); } }
@Override public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException { context.removeResource(PathAddress.EMPTY_ADDRESS); reloadRequiredStep(context); context.stepCompleted(); }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { context.removeResource(PathAddress.EMPTY_ADDRESS); PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); final String roleName = address.getLastElement().getValue(); RbacSanityCheckOperation.addOperation(context); registerRuntimeRemove(context, roleName.toUpperCase(Locale.ENGLISH)); }
protected void performRemove(OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { final Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS); if (!requireNoChildResources() || resource.getChildTypes().isEmpty()) { context.removeResource(PathAddress.EMPTY_ADDRESS); } else { List<PathElement> children = getChildren(resource); throw ControllerMessages.MESSAGES.cannotRemoveResourceWithChildren(children); } }
protected void performRemove(OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { final Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS); if (!requireNoChildResources() || resource.getChildTypes().isEmpty()) { context.removeResource(PathAddress.EMPTY_ADDRESS); } else { List<PathElement> children = getChildren(resource); throw ControllerMessages.MESSAGES.cannotRemoveResourceWithChildren(children); } }
@Override protected void updateModel(OperationContext context, ModelNode operation) throws OperationFailedException { // verify that the resource exist before removing it context.readResource(PathAddress.EMPTY_ADDRESS, false); Resource resource = context.removeResource(PathAddress.EMPTY_ADDRESS); recordCapabilitiesAndRequirements(context, operation, resource); if (validateAuthentication && !context.isBooting()) { ModelNode validationOp = AuthenticationValidatingHandler.createOperation(operation); context.addStep(validationOp, AuthenticationValidatingHandler.INSTANCE, OperationContext.Stage.MODEL); } // else we know the SecurityRealmAddHandler is part of this overall set of ops and it added AuthenticationValidatingHandler }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ModelNode model = context.readResource(PathAddress.EMPTY_ADDRESS).getModel(); final String roleName = RoleMappingResourceDefinition.getRoleName(operation); final AuthorizerConfiguration.PrincipalType principalType = PrincipalResourceDefinition.getPrincipalType(context, model); final String realm = PrincipalResourceDefinition.getRealm(context, model); final String name = PrincipalResourceDefinition.getName(context, model); context.removeResource(PathAddress.EMPTY_ADDRESS); if (matchType == WritableAuthorizerConfiguration.MatchType.INCLUDE) { RbacSanityCheckOperation.addOperation(context); } registerRuntimeRemove(context, roleName.toUpperCase(Locale.ENGLISH), principalType, name, realm); }
@Override public void execute(OperationContext context, ModelNode operation) { operationDeprecated(context, operation); context.removeResource(PathAddress.EMPTY_ADDRESS); String name = context.getCurrentAddressValue(); PathAddress protocolAddress = context.getCurrentAddress().getParent(); ModelNode putOperation = Operations.createMapRemoveOperation(protocolAddress, AbstractProtocolResourceDefinition.Attribute.PROPERTIES, name); context.addStep(putOperation, MapOperations.MAP_REMOVE_HANDLER, context.getCurrentStage()); } };
@Override protected void performRemove(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { String name = context.getCurrentAddressValue(); if (this.allowRuntimeOnlyRegistration && (context.getRunningMode() == RunningMode.NORMAL)) { Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS); for (ResourceEntry entry: resource.getChildren(ProtocolResourceDefinition.WILDCARD_PATH.getKey())) { context.removeResource(PathAddress.pathAddress(entry.getPathElement())); } context.getResourceRegistrationForUpdate().unregisterOverrideModel(name); } super.performRemove(context, operation, model); }
@Override protected void performRemove(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { String channelName = context.getCurrentAddressValue(); if (this.allowRuntimeOnlyRegistration && (context.getRunningMode() == RunningMode.NORMAL)) { Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS); for (ResourceEntry entry: resource.getChildren(ProtocolResourceDefinition.WILDCARD_PATH.getKey())) { context.removeResource(PathAddress.pathAddress(entry.getPathElement())); } context.getResourceRegistrationForUpdate().unregisterOverrideModel(channelName); } super.performRemove(context, operation, model); }