This repository has been archived on 2025-12-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
tcommon-studio-se/main/plugins/org.talend.librariesmanager/resources/java/routines/system/Constant.java
Yu aea4bfad67 feat(TBD-5415) Add GCS User Agent String in Constant class (#1303)
* feature(TBD-5415) Add GCS User Agent String in Constant class

* change the way of getting studio version

I changed the way of getting version of studio because there are some problems for the previous commit.

It doesn't work because the org.talend.commons.utils.VersionUtils class is in fact in code generating (eclipse) level. So we will not have it in the generated project in Studio, so I moved it (version retrieving) to javajet level as shown in the 3 other related commits, to get the version correctly.

* rename variable
2017-12-01 16:44:18 +01:00

30 lines
777 B
Java

package routines.system;
/**
* store some global constant
*
* @author Administrator
*
*/
public class Constant {
/**
* the default pattern for date parse and format
*/
public static final String dateDefaultPattern = "dd-MM-yyyy";
/**
* the default user agent string for AWS and Azure components
*/
public static String getUserAgent(String studioVersion) {
return "APN/1.0 Talend/" + studioVersion + " Studio/" + studioVersion;
}
/**
* the default user agent string for GCS components
*/
public static String getUserAgentGCS(String studioVersion) {
return "Studio/" + studioVersion + " (GPN:Talend) DataIntegration/" + studioVersion + " Jets3t/0.9.1";
}
}