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);
}
}
}
}
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());
}
}
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());
}
}
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);
}
}
}
Aggregations