package org.jenkinsci.plugins.p4.client; import java.io.Serializable; import org.jenkinsci.plugins.p4.credentials.P4StandardCredentials; import com.perforce.p4java.server.IOptionsServer; import com.perforce.p4java.server.IServerInfo; 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(); if (ssl) { this.serverUri = "p4javassl://" + p4port; } else { this.serverUri = "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 | |
---|---|---|---|---|---|
#9 | 26617 | Paul Allen |
Prevent `ssl:` string from appearing in the P4PORT Jelly field. Jelly uses getP4port() method for binding the fields; adding the ssl prefix was causing issues. JENKINS-63246 |
||
#8 | 26312 | Paul Allen |
Added a getSsl method into the Perforce credential classes to enable support for the Configuration as code plugin. JENKINS-58249 |
||
#7 | 21154 | Paul Allen | P4HOST support for connection. | ||
#6 | 20980 | Paul Allen |
Functional test upgrade. Switched to RSH pipe for Perforce connection and upgraded to 15.1 P4D binaries. Made use of ClassRule for Jenkins (faster startup) and a Rule for Perforce with separate roots (to allow for parallel test runs). |
||
#5 | 16502 | Paul Allen |
Advanced Credentials option for RPC_SOCKET_SO_TIMEOUT_NICK JENKINS-31196 |
||
#4 | 15656 | Paul Allen |
Updated credentials to extend BaseStandardCredentials. Allows users to set the ID at creation. JENKINS-29702 |
||
#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. |