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

org.jboss.as.ee.structure.EjbClientDescriptorPropertyReplacement Maven / Gradle / Ivy

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

package org.jboss.as.ee.structure;

import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.metadata.property.PropertyReplacer;
import org.jboss.metadata.property.PropertyReplacers;

/**
 * @author Tomasz Adamski
 */
public class EjbClientDescriptorPropertyReplacement {

    public static PropertyReplacer propertyReplacer(final DeploymentUnit deploymentUnit) {
        Boolean replacement = deploymentUnit.getAttachment(Attachments.JBOSS_DESCRIPTOR_PROPERTY_REPLACEMENT);
        if (replacement == null || replacement) {
            PropertyReplacer replacer = deploymentUnit
                    .getAttachment(org.jboss.as.ee.metadata.property.Attachments.FINAL_PROPERTY_REPLACER);
            return replacer != null ? replacer : PropertyReplacers.noop();
        } else {
            return PropertyReplacers.noop();
        }
    }

    private EjbClientDescriptorPropertyReplacement() {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy