TestHelper.java (a740f2aa) TestHelper.java (a893be29)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1027 unchanged lines hidden (view full) ---

1036 Error( "Can't create temp storage, exception: " + e );
1037 }
1038
1039 return xResult;
1040 }
1041
1042 public XStorage cloneStorage( XMultiServiceFactory xMSF, XSingleServiceFactory xFactory, XStorage xStorage )
1043 {
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1027 unchanged lines hidden (view full) ---

1036 Error( "Can't create temp storage, exception: " + e );
1037 }
1038
1039 return xResult;
1040 }
1041
1042 public XStorage cloneStorage( XMultiServiceFactory xMSF, XSingleServiceFactory xFactory, XStorage xStorage )
1043 {
1044 // create a copy of a last commited version of specified storage
1044 // create a copy of a last committed version of specified storage
1045 XStorage xResult = null;
1046 try
1047 {
1048 xResult = createTempStorage( xMSF, xFactory );
1049 if ( xResult != null )
1050 xStorage.copyLastCommitTo( xResult );
1051 }
1052 catch( Exception e )
1053 {
1054 Error( "Can't clone storage, exception: " + e );
1055 return null;
1056 }
1057
1058 return xResult;
1059 }
1060
1061 public XStorage cloneSubStorage( XMultiServiceFactory xMSF, XSingleServiceFactory xFactory, XStorage xStorage, String sName )
1062 {
1045 XStorage xResult = null;
1046 try
1047 {
1048 xResult = createTempStorage( xMSF, xFactory );
1049 if ( xResult != null )
1050 xStorage.copyLastCommitTo( xResult );
1051 }
1052 catch( Exception e )
1053 {
1054 Error( "Can't clone storage, exception: " + e );
1055 return null;
1056 }
1057
1058 return xResult;
1059 }
1060
1061 public XStorage cloneSubStorage( XMultiServiceFactory xMSF, XSingleServiceFactory xFactory, XStorage xStorage, String sName )
1062 {
1063 // create a copy of a last commited version of specified substorage
1063 // create a copy of a last committed version of specified substorage
1064 XStorage xResult = null;
1065 try
1066 {
1067 xResult = createTempStorage( xMSF, xFactory );
1068 if ( xResult != null )
1069 xStorage.copyStorageElementLastCommitTo( sName, xResult );
1070 }
1071 catch( Exception e )

--- 48 unchanged lines hidden ---
1064 XStorage xResult = null;
1065 try
1066 {
1067 xResult = createTempStorage( xMSF, xFactory );
1068 if ( xResult != null )
1069 xStorage.copyStorageElementLastCommitTo( sName, xResult );
1070 }
1071 catch( Exception e )

--- 48 unchanged lines hidden ---