* 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
30 lines
777 B
Java
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";
|
|
}
|
|
}
|