Compare commits

...

4 Commits

3 changed files with 28 additions and 12 deletions

View File

@@ -577,10 +577,11 @@ LoginProjectPage.previous=Previous
LoginProjectPage.finish=Finish
LoginProjectPage.remote=Remote
LoginProjectPage.remote.talend=Remote TAC
LoginProjectPage.cloud.us=Cloud US
LoginProjectPage.cloud.eu=Cloud EU
LoginProjectPage.cloud.apac=Cloud APAC
LoginProjectPage.cloud.custom=Cloud Custom
LoginProjectPage.cloud.aws_us=AWS - USA East
LoginProjectPage.cloud.aws_eu=AWS - Europe
LoginProjectPage.cloud.aws_apac=AWS - Asia Pacific
LoginProjectPage.cloud.usa_west=Azure - USA West
LoginProjectPage.cloud.cloud_custom=Cloud - Custom
LoginProjectPage.local=Local
LoginProjectPage.restart=Restart
LoginProjectPage.update=Update

View File

@@ -241,16 +241,18 @@ public class LoginHelper {
}
/**
* if the connection is Cloud US/EU/APAC/Custom
* if the connection is AWS USA East/AWS Europe/AWS Asia Pacific/Azure USA West/Cloud Custom
*
* @param connectionBean
* @return true if connection is Cloud US or Cloud EU or Cloud APAC or Cloud Custom
* @return true if connection is USA East or AWS Europe or AWS Asia Pacific or Azure USA West or Cloud
* Custom
*/
public static boolean isCloudConnection(ConnectionBean connectionBean) {
if (connectionBean == null) {
return false;
}
return isCloudUSConnection(connectionBean) || isCloudEUConnection(connectionBean) || isCloudAPACConnection(connectionBean)
return isCloudUSConnection(connectionBean) || isCloudUSWestConnection(connectionBean)
|| isCloudEUConnection(connectionBean) || isCloudAPACConnection(connectionBean)
|| isCloudCustomConnection(connectionBean);
}
@@ -275,6 +277,13 @@ public class LoginHelper {
return RepositoryConstants.REPOSITORY_CLOUD_APAC_ID.equals(connectionBean.getRepositoryId());
}
public static boolean isCloudUSWestConnection(ConnectionBean connectionBean) {
if (connectionBean == null) {
return false;
}
return RepositoryConstants.REPOSITORY_CLOUD_US_WEST_ID.equals(connectionBean.getRepositoryId());
}
public static boolean isCloudCustomConnection(ConnectionBean connectionBean) {
if (connectionBean == null) {
return false;
@@ -284,7 +293,7 @@ public class LoginHelper {
public static boolean isCloudRepository(String repositoryId) {
return isCloudUSRepository(repositoryId) || isCloudEURepository(repositoryId) || isCloudAPACRepository(repositoryId)
|| isCloudCustomRepository(repositoryId);
|| isCloudCustomRepository(repositoryId) || isCloudUSWestRepository(repositoryId);
}
public static boolean isCloudUSRepository(String repositoryId) {
@@ -299,6 +308,10 @@ public class LoginHelper {
return RepositoryConstants.REPOSITORY_CLOUD_APAC_ID.equals(repositoryId);
}
public static boolean isCloudUSWestRepository(String repositoryId) {
return RepositoryConstants.REPOSITORY_CLOUD_US_WEST_ID.equals(repositoryId);
}
public static boolean isCloudCustomRepository(String repositoryId) {
return RepositoryConstants.REPOSITORY_CLOUD_CUSTOM_ID.equals(repositoryId);
}

View File

@@ -2088,13 +2088,15 @@ public class LoginProjectPage extends AbstractLoginActionPage {
}
connectionName = connectionName + " (" + remoteLabel; //$NON-NLS-1$
} else if (LoginHelper.isCloudUSConnection(prj)) {
connectionName = connectionName + " (" + Messages.getString("LoginProjectPage.cloud.us"); //$NON-NLS-1$//$NON-NLS-2$
connectionName = connectionName + " (" + Messages.getString("LoginProjectPage.cloud.aws_us"); //$NON-NLS-1$//$NON-NLS-2$
} else if (LoginHelper.isCloudEUConnection(prj)) {
connectionName = connectionName + " (" + Messages.getString("LoginProjectPage.cloud.eu"); //$NON-NLS-1$//$NON-NLS-2$
connectionName = connectionName + " (" + Messages.getString("LoginProjectPage.cloud.aws_eu"); //$NON-NLS-1$//$NON-NLS-2$
} else if (LoginHelper.isCloudAPACConnection(prj)) {
connectionName = connectionName + " (" + Messages.getString("LoginProjectPage.cloud.apac"); //$NON-NLS-1$//$NON-NLS-2$
connectionName = connectionName + " (" + Messages.getString("LoginProjectPage.cloud.aws_apac"); //$NON-NLS-1$//$NON-NLS-2$
} else if (LoginHelper.isCloudUSWestConnection(prj)) {
connectionName = connectionName + " (" + Messages.getString("LoginProjectPage.cloud.usa_west"); //$NON-NLS-1$//$NON-NLS-2$
} else if (LoginHelper.isCloudCustomConnection(prj)) {
connectionName = connectionName + " (" + Messages.getString("LoginProjectPage.cloud.custom"); //$NON-NLS-1$//$NON-NLS-2$
connectionName = connectionName + " (" + Messages.getString("LoginProjectPage.cloud.cloud_custom"); //$NON-NLS-1$//$NON-NLS-2$
} else {
connectionName = connectionName + " (" + Messages.getString("LoginProjectPage.local"); //$NON-NLS-1$//$NON-NLS-2$
}