final boolean doSourceStructure = shouldJtrBeSentToServer(sourceStructure);
final boolean doTargetStructure = shouldJtrBeSentToServer(targetStructure);
if (!doSourceStructure && !doTargetStructure)
return;
CJtrFile jtrFile = new CJtrFile();
jtrFile.setTransformationGuid(tran.getID().toString());
jtrFile.setSourceJtrZippedBase64(null);
jtrFile.setTargetJtrZippedBase64(null);
if (doSourceStructure) {
MappingTreeStructure input = m_transformationStructureCache.getInputStructure(tran.getID());
if (input != null) {
jtrFile.setSourceJtrZippedBase64(JitterbitServerEncoding.deflateAndBase64EncodeString(input
.getString()));
} else {
jtrFile.setSourceJtrZippedBase64(GENERATE_JTR_TAG);
}
}
if (doTargetStructure) {
MappingTreeStructure output = m_transformationStructureCache.getOutputStructure(tran.getID());
if (output != null) {
jtrFile.setTargetJtrZippedBase64(JitterbitServerEncoding.deflateAndBase64EncodeString(output
.getString()));
} else {
jtrFile.setTargetJtrZippedBase64(GENERATE_JTR_TAG);
}
}
m_transformationJtrs.add(jtrFile);
} catch (DataCacheException e) {
throw new DeployException("Failed to get the jtr files for the \"" + tran.getName()