ejbRefs[i] = new EjbRef();
}
webApp.setEjbRefs(ejbRefs);
for (int i = 0; i < numEjbRefs; i++) {
EjbRef ejbRef = ejbRefs[i];
ReferenceData referenceData = (ReferenceData) data.getEjbRefs().get(i);
ejbRef.setRefName(referenceData.getRefName());
ejbRef.setPattern(createPattern(referenceData.getRefLink()));
}
}
int numEjbLocalRefs = data.getEjbLocalRefs().size();
if (numEjbLocalRefs > 0) {
EjbLocalRef[] ejbLocalRefs = new EjbLocalRef[numEjbLocalRefs];
for (int i = 0; i < numEjbLocalRefs; i++) {
ejbLocalRefs[i] = new EjbLocalRef();
}
webApp.setEjbLocalRefs(ejbLocalRefs);
for (int i = 0; i < numEjbLocalRefs; i++) {
EjbLocalRef ejbLocalRef = ejbLocalRefs[i];
ReferenceData referenceData = (ReferenceData) data.getEjbLocalRefs().get(i);
ejbLocalRef.setRefName(referenceData.getRefName());
ejbLocalRef.setPattern(createPattern(referenceData.getRefLink()));
}
}
int numResourceRefs = data.getJdbcPoolRefs().size() + data.getJmsConnectionFactoryRefs().size()
+ data.getJavaMailSessionRefs().size();
if (numResourceRefs > 0) {
ResourceRef[] resourceRefs = new ResourceRef[numResourceRefs];
for (int i = 0; i < numResourceRefs; i++) {
resourceRefs[i] = new ResourceRef();
}
webApp.setResourceRefs(resourceRefs);
int i = 0;
for (int l = 0; l < data.getJdbcPoolRefs().size(); l++, i++) {
ResourceRef resourceRef = resourceRefs[i];
ReferenceData referenceData = (ReferenceData) data.getJdbcPoolRefs().get(l);
resourceRef.setRefName(referenceData.getRefName());
resourceRef.setPattern(createPattern(referenceData.getRefLink()));
}
for (int m = 0; m < data.getJmsConnectionFactoryRefs().size(); m++, i++) {
ResourceRef resourceRef = resourceRefs[i];
ReferenceData referenceData = (ReferenceData) data.getJmsConnectionFactoryRefs().get(m);
resourceRef.setRefName(referenceData.getRefName());
resourceRef.setPattern(createPattern(referenceData.getRefLink()));
}
for (int n = 0; n < data.getJavaMailSessionRefs().size(); n++, i++) {
ResourceRef resourceRef = resourceRefs[i];
ReferenceData referenceData = (ReferenceData) data.getJavaMailSessionRefs().get(n);
resourceRef.setRefName(referenceData.getRefName());
resourceRef.setPattern(createPattern(referenceData.getRefLink()));
}
}
int numMessageDestinations = data.getMessageDestinations().size();
if (numMessageDestinations > 0) {
MessageDestination[] messageDestinations = new MessageDestination[numMessageDestinations];
for (int i = 0; i < numMessageDestinations; i++) {
messageDestinations[i] = new MessageDestination();
}
webApp.setMessageDestinations(messageDestinations);
for (int i = 0; i < numMessageDestinations; i++) {
MessageDestination messageDestination = messageDestinations[i];
ReferenceData referenceData = (ReferenceData) data.getMessageDestinations().get(i);
messageDestination.setMessageDestinationName(referenceData.getRefName());
// messageDestination.setPattern(createPattern(referenceData.getRefLink()));
messageDestination.setAdminObjectLink(createPattern(referenceData.getRefLink()).getName());
}
}
int numResourceEnvRefs = data.getJmsDestinationRefs().size();
if (numResourceEnvRefs > 0) {
ResourceEnvRef[] resourceEnvRefs = new ResourceEnvRef[numResourceEnvRefs];
for (int i = 0; i < numResourceEnvRefs; i++) {
resourceEnvRefs[i] = new ResourceEnvRef();
}
webApp.setResourceEnvRefs(resourceEnvRefs);
for (int i = 0; i < numResourceEnvRefs; i++) {
ResourceEnvRef resourceEnvRef = resourceEnvRefs[i];
ReferenceData referenceData = (ReferenceData) data.getJmsDestinationRefs().get(i);
resourceEnvRef.setRefName(referenceData.getRefName());
resourceEnvRef.setPattern(createPattern(referenceData.getRefLink()));
// resourceEnvRef.setAdminObjectLink(createPattern(referenceData.getRefLink()).getName());
}
}
int numWebServiceRefs = data.getWebServiceRefs().size();