Search in sources :

Example 1 with EnvironmentEntry

use of com.sun.enterprise.deployment.web.EnvironmentEntry in project Payara by payara.

the class WebBundleDescriptorImpl method combineEnvironmentEntries.

@Override
protected void combineEnvironmentEntries(JndiNameEnvironment env) {
    for (Object oenve : env.getEnvironmentProperties()) {
        EnvironmentEntry enve = (EnvironmentEntry) oenve;
        EnvironmentProperty envProp = _getEnvironmentPropertyByName(enve.getName());
        if (envProp != null) {
            combineInjectionTargets(envProp, (EnvironmentProperty) enve);
            EnvironmentProperty envP = (EnvironmentProperty) enve;
            if (!envProp.hasInjectionTargetFromXml() && (!envProp.isSetValueCalled()) && envP.isSetValueCalled()) {
                envProp.setValue(enve.getValue());
            }
        } else {
            if (env instanceof WebBundleDescriptor && ((WebBundleDescriptor) env).isConflictEnvironmentEntry()) {
                throw new IllegalArgumentException(localStrings.getLocalString("web.deployment.exceptionconflictenventry", "There are more than one environment entries defined in web fragments with the same name, but not overrided in web.xml"));
            } else {
                addEnvironmentEntry(enve);
            }
        }
    }
}
Also used : EnvironmentEntry(com.sun.enterprise.deployment.web.EnvironmentEntry) EnvironmentProperty(com.sun.enterprise.deployment.EnvironmentProperty) WebBundleDescriptor(com.sun.enterprise.deployment.WebBundleDescriptor)

Example 2 with EnvironmentEntry

use of com.sun.enterprise.deployment.web.EnvironmentEntry in project Payara by payara.

the class EnvEntriesValidator method validateSimpleEnvEntries.

private void validateSimpleEnvEntries(JndiNameEnvironment env, Enumeration<EnvironmentEntry> envEntries) {
    while (envEntries.hasMoreElements()) {
        EnvironmentEntry envEntry = envEntries.nextElement();
        SimpleEnvEntry simpleEnvEntry = new SimpleEnvEntry(envEntry);
        validateEnvEntry(env, simpleEnvEntry, simpleEnvEntry.getName());
    }
}
Also used : EnvironmentEntry(com.sun.enterprise.deployment.web.EnvironmentEntry)

Example 3 with EnvironmentEntry

use of com.sun.enterprise.deployment.web.EnvironmentEntry in project Payara by payara.

the class EnvEntriesValidator method validateSimpleEnvEntries.

private void validateSimpleEnvEntries(JndiNameEnvironment env, Set<? extends EnvironmentEntry> envEntries) {
    for (EnvironmentEntry environmentProperty : envEntries) {
        SimpleEnvEntry simpleEnvEntry = new SimpleEnvEntry(environmentProperty);
        validateEnvEntry(env, simpleEnvEntry, simpleEnvEntry.getName());
    }
}
Also used : EnvironmentEntry(com.sun.enterprise.deployment.web.EnvironmentEntry)

Example 4 with EnvironmentEntry

use of com.sun.enterprise.deployment.web.EnvironmentEntry in project Payara by payara.

the class WebFragmentDescriptor method combineEnvironmentEntries.

@Override
protected void combineEnvironmentEntries(JndiNameEnvironment env) {
    for (Object oenve : env.getEnvironmentProperties()) {
        EnvironmentEntry enve = (EnvironmentEntry) oenve;
        EnvironmentProperty envProp = _getEnvironmentPropertyByName(enve.getName());
        if (envProp != null) {
            if (envProp.isConflict((EnvironmentProperty) enve)) {
                conflictEnvironmentEntry = true;
            }
            combineInjectionTargets(envProp, (EnvironmentProperty) enve);
        } else {
            addEnvironmentEntry(enve);
        }
    }
}
Also used : EnvironmentEntry(com.sun.enterprise.deployment.web.EnvironmentEntry)

Aggregations

EnvironmentEntry (com.sun.enterprise.deployment.web.EnvironmentEntry)4 EnvironmentProperty (com.sun.enterprise.deployment.EnvironmentProperty)1 WebBundleDescriptor (com.sun.enterprise.deployment.WebBundleDescriptor)1