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
This commit is contained in:
@@ -6,7 +6,7 @@ package routines.system;
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
public abstract class Constant {
|
||||
public class Constant {
|
||||
|
||||
/**
|
||||
* the default pattern for date parse and format
|
||||
@@ -14,8 +14,16 @@ public abstract class Constant {
|
||||
public static final String dateDefaultPattern = "dd-MM-yyyy";
|
||||
|
||||
/**
|
||||
* the default user agent string for AWS components
|
||||
* the default user agent string for AWS and Azure components
|
||||
*/
|
||||
public static final String TALEND_USER_AGENT = "APN/1.0 Talend/6.4 Studio/6.4";
|
||||
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user