resourceEnvRef.setResourceEnvRefType(member.getType().getName());
}
}
reference = resourceEnvRef;
} else if (!knownEnvironmentEntries.contains(type)) {
ResourceRef resourceRef = consumer.getResourceRefMap().get(refName);
if (resourceRef == null) {
resourceRef = new ResourceRef();
resourceRef.setName(refName);
consumer.getResourceRef().add(resourceRef);
}
if (resourceRef.getResAuth() == null) {
if (resource.authenticationType() == Resource.AuthenticationType.APPLICATION) {
resourceRef.setResAuth(ResAuth.APPLICATION);
} else {
resourceRef.setResAuth(ResAuth.CONTAINER);
}
}
if (resourceRef.getResType() == null || ("").equals(resourceRef.getResType())) {
if (resource.type() != java.lang.Object.class) {
resourceRef.setResType(resource.type().getName());
} else {
resourceRef.setResType(member.getType().getName());
}
}
if (resourceRef.getResSharingScope() == null) {
if (resource.shareable()) {
resourceRef.setResSharingScope(ResSharingScope.SHAREABLE);
} else {
resourceRef.setResSharingScope(ResSharingScope.UNSHAREABLE);
}
}
reference = resourceRef;
}
}