Skip to content

Commit 79f01d2

Browse files
committed
Remove gxClassR dependency from CloudStorage
1 parent f66f4f6 commit 79f01d2

File tree

10 files changed

+50
-32
lines changed

10 files changed

+50
-32
lines changed

gxcloudstorage-awss3/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
<name>GeneXus AWS S3 Cloud Storage</name>
1515

1616
<dependencies>
17+
<dependency>
18+
<groupId>com.genexus</groupId>
19+
<artifactId>gxclassR</artifactId>
20+
<version>${project.version}</version>
21+
<scope>test</scope>
22+
</dependency>
1723
<dependency>
1824
<groupId>com.genexus</groupId>
1925
<artifactId>gxcloudstorage-common</artifactId>

gxcloudstorage-awss3/src/main/java/com/genexus/db/driver/ExternalProviderS3.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import org.apache.logging.log4j.Logger;
99
import org.apache.logging.log4j.LogManager;
1010
import com.amazonaws.HttpMethod;
11-
import com.genexus.Application;
1211
import com.genexus.util.GXService;
1312
import com.genexus.util.StorageUtils;
1413
import com.genexus.StructSdtMessages_Message;
@@ -75,10 +74,6 @@ public String getName(){
7574
return NAME;
7675
}
7776

78-
public ExternalProviderS3(String service) throws Exception{
79-
this(Application.getGXServices().get(service));
80-
}
81-
8277
public ExternalProviderS3() throws Exception{
8378
super();
8479
initialize();

gxcloudstorage-azureblob/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
<name>GeneXus Azure Blob Cloud Storage</name>
1515

1616
<dependencies>
17+
<dependency>
18+
<groupId>com.genexus</groupId>
19+
<artifactId>gxclassR</artifactId>
20+
<version>${project.version}</version>
21+
<scope>test</scope>
22+
</dependency>
1723
<dependency>
1824
<groupId>com.genexus</groupId>
1925
<artifactId>gxcloudstorage-common</artifactId>

gxcloudstorage-azureblob/src/main/java/com/genexus/db/driver/ExternalProviderAzureStorage.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.genexus.db.driver;
22

3-
import com.genexus.Application;
43
import com.genexus.StructSdtMessages_Message;
54
import com.genexus.util.GXService;
65
import com.genexus.util.StorageUtils;
@@ -47,10 +46,6 @@ public class ExternalProviderAzureStorage extends ExternalProviderBase implement
4746
private String privateContainerName;
4847
private String publicContainerName;
4948

50-
public ExternalProviderAzureStorage(String service) throws Exception {
51-
this(Application.getGXServices().get(service));
52-
}
53-
5449
private void init() throws Exception {
5550
try {
5651
account = getEncryptedPropertyValue(ACCOUNT, ACCOUNT_DEPRECATED);

gxcloudstorage-common/pom.xml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,27 @@
1313
<artifactId>gxcloudstorage-common</artifactId>
1414
<name>GeneXus Cloud Storage Common</name>
1515

16-
<dependencies>
17-
<dependency>
18-
<groupId>${project.groupId}</groupId>
19-
<artifactId>gxcommon</artifactId>
20-
<version>${project.version}</version>
21-
</dependency>
16+
<dependencies>
17+
<dependency>
18+
<groupId>${project.groupId}</groupId>
19+
<artifactId>gxcommon</artifactId>
20+
<version>${project.version}</version>
21+
</dependency>
22+
<dependency>
23+
<groupId>org.apache.logging.log4j</groupId>
24+
<artifactId>log4j-core</artifactId>
25+
<version>${log4j.version}</version>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.apache.logging.log4j</groupId>
29+
<artifactId>log4j-api</artifactId>
30+
<version>${log4j.version}</version>
31+
</dependency>
32+
<dependency>
33+
<groupId>org.apache.logging.log4j</groupId>
34+
<artifactId>log4j-api</artifactId>
35+
<version>${log4j.version}</version>
36+
</dependency>
2237
</dependencies>
2338

2439
</project>

gxcloudstorage-googlecloudstorage/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
<name>GeneXus Google Cloud Storage</name>
1515

1616
<dependencies>
17+
<dependency>
18+
<groupId>com.genexus</groupId>
19+
<artifactId>gxclassR</artifactId>
20+
<version>${project.version}</version>
21+
<scope>test</scope>
22+
</dependency>
1723
<dependency>
1824
<groupId>com.genexus</groupId>
1925
<artifactId>gxcloudstorage-common</artifactId>

gxcloudstorage-googlecloudstorage/src/main/java/com/genexus/db/driver/ExternalProviderGoogle.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.genexus.db.driver;
22

3-
import com.genexus.Application;
43
import com.genexus.StructSdtMessages_Message;
54
import com.genexus.util.GXService;
65
import com.genexus.util.StorageUtils;
@@ -57,10 +56,6 @@ public ExternalProviderGoogle() throws Exception{
5756
initialize();
5857
}
5958

60-
public ExternalProviderGoogle(String service) throws Exception{
61-
this(Application.getGXServices().get(service));
62-
}
63-
6459
public ExternalProviderGoogle(GXService providerService) throws Exception{
6560
super(providerService);
6661
initialize();

gxcloudstorage-ibmcos/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
<name>GeneXus IBM Cloud Storage</name>
1515

1616
<dependencies>
17+
<dependency>
18+
<groupId>com.genexus</groupId>
19+
<artifactId>gxclassR</artifactId>
20+
<version>${project.version}</version>
21+
<scope>test</scope>
22+
</dependency>
1723
<dependency>
1824
<groupId>com.genexus</groupId>
1925
<artifactId>gxcloudstorage-common</artifactId>

gxcloudstorage-ibmcos/src/main/java/com/genexus/db/driver/ExternalProviderIBM.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package com.genexus.db.driver;
22

3-
import com.genexus.Application;
43
import com.genexus.StructSdtMessages_Message;
54
import com.genexus.util.GXService;
6-
import com.genexus.util.GXServices;
75
import com.genexus.util.StorageUtils;
86
import com.ibm.cloud.objectstorage.ClientConfiguration;
97
import com.ibm.cloud.objectstorage.HttpMethod;
@@ -57,14 +55,10 @@ public class ExternalProviderIBM extends ExternalProviderBase implements Externa
5755
private String endpointUrl;
5856
private int defaultExpirationMinutes = DEFAULT_EXPIRATION_MINUTES;
5957

60-
/* For compatibility reasons with GX16 U6 or lower*/
61-
public ExternalProviderIBM() throws Exception {
62-
this(GXServices.STORAGE_SERVICE);
63-
}
64-
65-
public ExternalProviderIBM(String service) throws Exception {
66-
this(Application.getGXServices().get(service));
67-
}
58+
public ExternalProviderIBM() throws Exception{
59+
super();
60+
init();
61+
}
6862

6963
public ExternalProviderIBM(GXService providerService) throws Exception {
7064
super(providerService);

java/src/main/java/com/genexus/Application.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ private static ExternalProvider getExternalProviderImpl(String service)
184184
throw new InternalError("Unrecognized External Provider class (ClassNotFound) : " + providerService.getName() + " / " + providerService.getClassName());
185185
}
186186
try {
187-
externalProviderImpl = (ExternalProvider) providerClass.getConstructor(String.class).newInstance(service);
187+
externalProviderImpl = (ExternalProvider) providerClass.getConstructor(GXService.class).newInstance(providerService);
188188
}
189189
catch (Exception e)
190190
{

0 commit comments

Comments
 (0)