@Test public void getVariousStrings() { Operation testTO1 = new Operation() .put("propagation", TransactionDefinition.PROPAGATION_REQUIRED) .put("isolation", TransactionDefinition.ISOLATION_READ_COMMITTED); finalize(testTO1); assertEquals("REQUIRED", testTO1.get("propagation")); assertEquals("READ_COMMITTED", testTO1.get("isolation")); Operation testTO2 = new Operation() .put("propagation", TransactionDefinition.PROPAGATION_REQUIRES_NEW) .put("isolation", TransactionDefinition.ISOLATION_DEFAULT); finalize(testTO2); assertEquals("REQUIRES_NEW", testTO2.get("propagation")); assertEquals("DEFAULT", testTO2.get("isolation")); }
public void finalize(Operation operation, Map<String, Object> richObjects) { String level = normalizeIsolation(operation); if (level != null) { operation.put("isolation", level); } String propagation = normalizePropagation(operation); if (propagation != null) { operation.put("propagation", propagation); } operation.label(buildLabel(operation)); }
TransactionOperationFinalizer implements OperationFinalizer { public void finalize(Operation operation, Map<String, Object> richObjects) { String level = normalizeIsolation(operation); if (level != null) { operation.put("isolation", level); } String propagation = normalizePropagation(operation); if (propagation != null) { operation.put("propagation", propagation); } operation.label(buildLabel(operation)); } }
TransactionOperationFinalizer implements OperationFinalizer { public void finalize(Operation operation, Map<String, Object> richObjects) { String level = normalizeIsolation(operation); if (level != null) { operation.put("isolation", level); } String propagation = normalizePropagation(operation); if (propagation != null) { operation.put("propagation", propagation); } operation.label(buildLabel(operation)); }  }
TransactionOperationFinalizer implements OperationFinalizer { public void finalize(Operation operation, Map<String, Object> richObjects) { String level = normalizeIsolation(operation); if (level != null) { operation.put("isolation", level); } String propagation = normalizePropagation(operation); if (propagation != null) { operation.put("propagation", propagation); } operation.label(buildLabel(operation)); }  static void register(Operation operation); void finalize(Operation operation, Map<String, Object> richObjects); }
TransactionOperationFinalizer implements OperationFinalizer { public void finalize(Operation operation, Map<String, Object> richObjects) { String level = normalizeIsolation(operation); if (level != null) { operation.put("isolation", level); } String propagation = normalizePropagation(operation); if (propagation != null) { operation.put("propagation", propagation); } operation.label(buildLabel(operation)); }  static void register(Operation operation); void finalize(Operation operation, Map<String, Object> richObjects);  }