|
|
|
@ -5,28 +5,36 @@ import com.fr.design.env.DesignerWorkspaceInfo;
|
|
|
|
|
import com.fr.general.locale.LocaleCenter; |
|
|
|
|
import com.fr.general.locale.LocaleMark; |
|
|
|
|
import com.fr.locale.InterProviderFactory; |
|
|
|
|
import com.fr.workspace.connect.WorkspaceConnectionInfo; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 错误提示中的跳转链接管理 |
|
|
|
|
* |
|
|
|
|
* @author hades |
|
|
|
|
* @version 10.0 |
|
|
|
|
* Created by hades on 2021/8/9 |
|
|
|
|
*/ |
|
|
|
|
public class HelpLink { |
|
|
|
|
|
|
|
|
|
private static WorkspaceConnectionInfo connectionInfo; |
|
|
|
|
|
|
|
|
|
public static String getLink(String solution) { |
|
|
|
|
Map<String, String> map = new HashMap<>(); |
|
|
|
|
String currentName = DesignerEnvManager.getEnvManager().getCurEnvName(); |
|
|
|
|
DesignerWorkspaceInfo workspaceInfo = DesignerEnvManager.getEnvManager().getWorkspaceInfo(currentName); |
|
|
|
|
LocaleMark<String> linkMark = LocaleCenter.getMark(RemoteDesignLocaleMark.class); |
|
|
|
|
String link = linkMark.getValue(); |
|
|
|
|
map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Change_PassWord"), workspaceInfo.getConnection().getUrl() + RemoteWorkspaceURL.SYSTEM_LOGIN_PATH); |
|
|
|
|
String url = connectionInfo == null ? workspaceInfo.getConnection().getUrl() : connectionInfo.getUrl(); |
|
|
|
|
map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Change_PassWord"), url + RemoteWorkspaceURL.SYSTEM_LOGIN_PATH); |
|
|
|
|
map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Cert_Error_Solution"), link); |
|
|
|
|
map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Connection_Unknown_Error_Solution"), link); |
|
|
|
|
map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_NetWork_Connection_Error_Solution"), link); |
|
|
|
|
return map.get(solution); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void setConnectionInfo(WorkspaceConnectionInfo connectionInfo) { |
|
|
|
|
HelpLink.connectionInfo = connectionInfo; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|