private void fixAddressesForDomainMode(PathAddress parentAddress, Map<PathAddress, ModelNode> migrationOperations) {
    """
	In domain mode, the subsystem are under /profile=XXX.
	This method fixes the address by prepending the addresses (that start with /subsystem) with the current
	operation parent so that is works both in standalone (parent = EMPTY_ADDRESS) and domain mode
	(parent = /profile=XXX)
    """
        // in standalone mode, do nothing
        if (parentAddress.size() == 0) {
            return;
        }

        // use a linked hash map to preserve operations order
        Map<PathAddress, ModelNode> fixedMigrationOperations = new LinkedHashMap<>(migrationOperations);
        migrationOperations.clear();
        for (Map.Entry<PathAddress, ModelNode> entry : fixedMigrationOperations.entrySet()) {
            PathAddress fixedAddress = parentAddress.append(entry.getKey());
            entry.getValue().get(ADDRESS).set(fixedAddress.toModelNode());
            migrationOperations.put(fixedAddress, entry.getValue());
        }
    }
private void fixAddressesForDomainMode(PathAddress parentAddress, Map<PathAddress, ModelNode> migrationOperations) {
        // in standalone mode, do nothing
        if (parentAddress.size() == 0) {
            return;
        }

        // use a linked hash map to preserve operations order
        Map<PathAddress, ModelNode> fixedMigrationOperations = new LinkedHashMap<>(migrationOperations);
        migrationOperations.clear();
        for (Map.Entry<PathAddress, ModelNode> entry : fixedMigrationOperations.entrySet()) {
            PathAddress fixedAddress = parentAddress.append(entry.getKey());
            entry.getValue().get(ADDRESS).set(fixedAddress.toModelNode());
            migrationOperations.put(fixedAddress, entry.getValue());
        }
    }
private void fixAddressesForDomainMode ( PathAddress parentAddress , Map < PathAddress , ModelNode > migrationOperations ) { // in standalone mode, do nothing if ( parentAddress . size ( ) == 0 ) { return ; } // use a linked hash map to preserve operations order Map < PathAddress , ModelNode > fixedMigrationOperations = new LinkedHashMap <> ( migrationOperations ) ; migrationOperations . clear ( ) ; for ( Map . Entry < PathAddress , ModelNode > entry : fixedMigrationOperations . entrySet ( ) ) { PathAddress fixedAddress = parentAddress . append ( entry . getKey ( ) ) ; entry . getValue ( ) . get ( ADDRESS ) . set ( fixedAddress . toModelNode ( ) ) ; migrationOperations . put ( fixedAddress , entry . getValue ( ) ) ; } }
In domain mode, the subsystem are under /profile=XXX.
This method fixes the address by prepending the addresses (that start with /subsystem) with the current
operation parent so that is works both in standalone (parent = EMPTY_ADDRESS) and domain mode
(parent = /profile=XXX)
In domain mode the subsystem are under / profile = XXX . This method fixes the address by prepending the addresses ( that start with / subsystem ) with the current operation parent so that is works both in standalone ( parent = EMPTY_ADDRESS ) and domain mode ( parent = / profile = XXX )