Skip to content
Snippets Groups Projects
Commit b416d3ab authored by jakubs's avatar jakubs
Browse files

BIS-21 SP-107 refactor wrapping a transaction to a separate method

SVN: 25771
parent 02227b94
No related branches found
No related tags found
No related merge requests found
...@@ -248,7 +248,7 @@ public class JythonTopLevelDataSetHandlerV2<T extends DataSetInformation> extend ...@@ -248,7 +248,7 @@ public class JythonTopLevelDataSetHandlerV2<T extends DataSetInformation> extend
{ {
throw new IllegalStateException("Undefined process() function"); throw new IllegalStateException("Undefined process() function");
} }
IDataSetRegistrationTransactionV2 v2transaction = new DataSetRegistrationTransactionV2Delegate(transaction); IDataSetRegistrationTransactionV2 v2transaction = wrapTransaction(transaction);
invokeFunction(function, v2transaction); invokeFunction(function, v2transaction);
} catch (Exception e) } catch (Exception e)
{ {
...@@ -256,6 +256,16 @@ public class JythonTopLevelDataSetHandlerV2<T extends DataSetInformation> extend ...@@ -256,6 +256,16 @@ public class JythonTopLevelDataSetHandlerV2<T extends DataSetInformation> extend
} }
} }
/**
* Wraps the transaction - to hide methods which we don't want to expose in the api.
*/
protected IDataSetRegistrationTransactionV2 wrapTransaction(
IDataSetRegistrationTransaction transaction)
{
IDataSetRegistrationTransactionV2 v2transaction = new DataSetRegistrationTransactionV2Delegate(transaction);
return v2transaction;
}
@Override @Override
protected boolean shouldUseOldJythonHookFunctions() protected boolean shouldUseOldJythonHookFunctions()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment