package org.jenkinsci.plugins.p4.client; import java.io.Serializable; import org.jenkinsci.plugins.p4.credentials.P4StandardCredentials; public class ConnectionConfig implements Serializable { private static final long serialVersionUID = 1L; private final String p4port; private final boolean ssl; private final String serverUri; private final String trust; public ConnectionConfig(P4StandardCredentials credential) { this.p4port = credential.getP4port(); this.ssl = credential.isSsl(); this.trust = credential.getTrust(); this.serverUri = toUri(); } public ConnectionConfig(String p4port, boolean ssl, String trust) { this.p4port = p4port; this.ssl = ssl; this.trust = trust; this.serverUri = toUri(); } private String toUri() { if (ssl) { return "p4javassl://" + p4port; } else { return "p4java://" + p4port; } } public String getPort() { return p4port; } public boolean isSsl() { return ssl; } public String getTrust() { return trust; } public String getServerUri() { return serverUri; } public String toString() { return serverUri; } @Override public boolean equals(Object obj) { if (obj instanceof ConnectionConfig) { ConnectionConfig comp = (ConnectionConfig) obj; return this.toString().equals(comp.toString()); } else { return false; } } @Override public int hashCode() { int hash = 7; hash = (int) (1777 * hash + this.toString().hashCode()); return hash; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11053 | Paul Allen | Branching using p4-jenkins | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/client/ConnectionConfig.java | |||||
#3 | 10031 | Paul Allen |
Test URI path before connection. Report Perforce Errors and Trust fingerprint if using SSL. |
||
#2 | 9851 | Paul Allen | Merging using p4-jenkins | ||
#1 | 9690 | Paul Allen |
[Branching using p4-jenkins] Release 1.0.1 |
||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/main/java/org/jenkinsci/plugins/p4/client/ConnectionConfig.java | |||||
#1 | 9672 | Paul Allen | Refactor name from 'p4_client' to 'p4'. | ||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/main/java/org/jenkinsci/plugins/p4_client/client/ConnectionConfig.java | |||||
#4 | 8940 | Paul Allen |
Major refactor for the ConnectionHelper class to simplify serialisation. Fixed remote Jenkins JNLP slave connection issue. ClientHelper now extends ConnectionHelper and takes on all methods that require a client workspace. P4StandardCredentials is sent to the remote node instead of Credentials ID due to an issue accessing the Credentials store over a remote connection. For simplicity Client ID (workspace name) is serialised instead of the Workspace object. |
||
#3 | 8660 | Paul Allen | Added P4TRUST for SSL connections in the Credentials plugin and ConnectionFactory. | ||
#2 | 8639 | Paul Allen |
Added hint URL to Credentials page when no Credentials are defined. Minor refactor and UX changes. |
||
#1 | 8629 | Paul Allen |
Added p4java with connection/authorisation helper classes. Included SSL support and detection of Unicode servers. |