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(); 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 | |
---|---|---|---|---|---|
#3 | 9964 | Paul Allen | More updates to code for new 1.569 plugin version. | ||
#2 | 9840 | Paul Allen |
Minor improvments. - Protection against undefined workspaces - Logging improvments for Perforce - Performance for Perforce connections |
||
#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. |