@XmlTransient public String getType() { return getEnvEntryType(); }
@XmlTransient public String getType() { return getEnvEntryType(); }
@XmlTransient public String getType() { return getEnvEntryType(); }
private List<EnvEntryInfo> buildEnvEntryInfos(JndiConsumer item) { List<EnvEntryInfo> infos = new ArrayList<EnvEntryInfo>(); for (EnvEntry env : item.getEnvEntry()) { // ignore env entries without a value if (env.getEnvEntryValue() == null) { continue; } if (env.getEnvEntryType() == null){ // TODO: Maybe Move this into the EnvEntry class env.setEnvEntryType("java.lang.String"); } EnvEntryInfo info = new EnvEntryInfo(); info.name = env.getEnvEntryName(); info.type = env.getEnvEntryType(); info.value = env.getEnvEntryValue(); info.location = buildLocationInfo(env); info.targets.addAll(buildInjectionInfos(env)); infos.add(info); } return infos; }
@Override public String toString() { return "EnvEntry{" + "name='" + getEnvEntryName() + '\'' + ", type='" + getEnvEntryType() + '\'' + ", value='" + getEnvEntryValue() + '\'' + ", mappedName='" + getMappedName() + '\'' + ", lookupName='" + getLookupName() + '\'' + '}'; } }
@Override public String toString() { return "EnvEntry{" + "name='" + getEnvEntryName() + '\'' + ", type='" + getEnvEntryType() + '\'' + ", value='" + getEnvEntryValue() + '\'' + ", mappedName='" + getMappedName() + '\'' + ", lookupName='" + getLookupName() + '\'' + '}'; } }
private <R extends JndiReference> void copy(final Map<String, R> from, final Map<String, R> to) { for (final R a : from.values()) { if (isPrivateReference(a)) { continue; } final R b = to.get(a.getKey()); // New entry if (b == null) { if (!isExtendedPersistenceContext(a)) { to.put(a.getKey(), a); } continue; } // Update existing entry // merge injection points b.getInjectionTarget().addAll(a.getInjectionTarget()); // merge env-entry values if (b instanceof EnvEntry && a instanceof EnvEntry) { final EnvEntry eb = (EnvEntry) b; final EnvEntry ea = (EnvEntry) a; if (eb.getEnvEntryValue() == null) { eb.setEnvEntryValue(ea.getEnvEntryValue()); } if (eb.getEnvEntryType() == null) { eb.setEnvEntryType(ea.getEnvEntryType()); } } } }
private <R extends JndiReference> void copy(final Map<String, R> from, final Map<String, R> to) { for (final R a : from.values()) { if (isPrivateReference(a)) { continue; } final R b = to.get(a.getKey()); // New entry if (b == null) { if (!isExtendedPersistenceContext(a)) { to.put(a.getKey(), a); } continue; } // Update existing entry // merge injection points b.getInjectionTarget().addAll(a.getInjectionTarget()); // merge env-entry values if (b instanceof EnvEntry && a instanceof EnvEntry) { final EnvEntry eb = (EnvEntry) b; final EnvEntry ea = (EnvEntry) a; if (eb.getEnvEntryValue() == null) { eb.setEnvEntryValue(ea.getEnvEntryValue()); } if (eb.getEnvEntryType() == null) { eb.setEnvEntryType(ea.getEnvEntryType()); } } } }
String type = getStringValue(envEntry.getEnvEntryType());
private void buildEnvEntryInfos(final JndiConsumer item, final JndiEncInfo moduleJndiEnc, final JndiEncInfo compJndiEnc) { for (final EnvEntry env : item.getEnvEntry()) { // ignore env entries without a value and lookup name //If the the reference name of the environment entry is belong to those shareable JNDI name space, it somewhat is a valid one if (env.getEnvEntryValue() == null && env.getLookupName() == null && !isShareableJNDINamespace(env.getEnvEntryName()) && !CompManagedBean.class.isInstance(item) /* in this case we can desire to contextually lookup webapp value from an ear lib */) { continue; } final EnvEntryInfo info = new EnvEntryInfo(); info.referenceName = env.getEnvEntryName(); info.type = env.getEnvEntryType(); info.value = env.getEnvEntryValue(); info.location = buildLocationInfo(env); info.targets.addAll(buildInjectionInfos(env)); insert( info, appInfo.globalJndiEnc.envEntries, appInfo.appJndiEnc.envEntries, moduleJndiEnc.envEntries, compJndiEnc.envEntries ); } }
private void buildEnvEntryInfos(final JndiConsumer item, final JndiEncInfo moduleJndiEnc, final JndiEncInfo compJndiEnc) { for (final EnvEntry env : item.getEnvEntry()) { // ignore env entries without a value and lookup name //If the the reference name of the environment entry is belong to those shareable JNDI name space, it somewhat is a valid one if (env.getEnvEntryValue() == null && env.getLookupName() == null && !isShareableJNDINamespace(env.getEnvEntryName())) { continue; } final EnvEntryInfo info = new EnvEntryInfo(); info.referenceName = env.getEnvEntryName(); info.type = env.getEnvEntryType(); info.value = env.getEnvEntryValue(); info.location = buildLocationInfo(env); info.targets.addAll(buildInjectionInfos(env)); insert( info, appInfo.globalJndiEnc.envEntries, appInfo.appJndiEnc.envEntries, moduleJndiEnc.envEntries, compJndiEnc.envEntries ); } }