All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.extension.picketlink.idm.model.DefaultRemoveStepHandler Maven / Gradle / Ivy

There is a newer version: 34.0.1.Final
Show newest version
/*
 * Copyright The WildFly Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.wildfly.extension.picketlink.idm.model;

import java.util.function.Function;

import org.jboss.as.controller.ModelOnlyRemoveStepHandler;
import org.jboss.as.controller.OperationContext;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.PathElement;
import org.jboss.dmr.ModelNode;

/**
 * 

This remove handler is used during the removal of all partition-manager resources.

* * @author Pedro Silva */ public class DefaultRemoveStepHandler extends ModelOnlyRemoveStepHandler { private final Function partitionAddressProvider; DefaultRemoveStepHandler(final Function partitionAddressProvider) { this.partitionAddressProvider = partitionAddressProvider; } @Override protected void performRemove(OperationContext context, ModelNode operation, final ModelNode model) throws OperationFailedException { context.addStep(((context1, operation1) -> PartitionManagerResourceDefinition.validateModel(context1, partitionAddressProvider.apply(context1.getCurrentAddress()))), OperationContext.Stage.MODEL); super.performRemove(context, operation, model); } @Override protected boolean removeChildRecursively(PathElement child) { // children only represent configuration details of the parent, and are not independent entities return false; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy