package org.jenkinsci.plugins.p4.credentials; import hudson.Util; import org.kohsuke.stapler.export.Exported; import com.cloudbees.plugins.credentials.CredentialsScope; import com.cloudbees.plugins.credentials.common.IdCredentials; import com.cloudbees.plugins.credentials.common.StandardCredentials; import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; public abstract class P4StandardCredentials extends P4Credentials implements StandardCredentials { private static final long serialVersionUID = 1L; @NonNull private final String id; @NonNull private final String description; @NonNull private final String p4port; @NonNull private final TrustImpl ssl; @NonNull private final String username; /** * Constructor. * * @param id * the id. * @param description * the description. */ public P4StandardCredentials(@CheckForNull String id, @CheckForNull String description, @CheckForNull String p4port, @CheckForNull TrustImpl ssl, @CheckForNull String username) { super(); this.id = IdCredentials.Helpers.fixEmptyId(id); this.description = Util.fixNull(description); this.p4port = Util.fixNull(p4port); this.ssl = ssl; this.username = Util.fixNull(username); } /** * Constructor. * * @param scope * the scope. * @param id * the id. * @param description * the description. */ public P4StandardCredentials(@CheckForNull CredentialsScope scope, @CheckForNull String id, @CheckForNull String description, @CheckForNull String p4port, @CheckForNull TrustImpl ssl, @CheckForNull String username) { super(scope); this.id = IdCredentials.Helpers.fixEmptyId(id); this.description = Util.fixNull(description); this.p4port = Util.fixNull(p4port); this.ssl = ssl; this.username = Util.fixNull(username); } @NonNull public String getDescription() { return description; } @NonNull @Exported public String getId() { return id; } @NonNull public String getP4port() { return p4port; } public boolean isSsl() { return (ssl == null) ? false : true; } public String getTrust() { return (ssl == null) ? null : ssl.getTrust(); } @NonNull public String getUsername() { return username; } @Override public final boolean equals(Object o) { return IdCredentials.Helpers.equals(this, o); } @Override public final int hashCode() { return IdCredentials.Helpers.hashCode(this); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 10123 | dawn_foundry | Branching using dawn_foundry_p4jenkins | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/credentials/P4StandardCredentials.java | |||||
#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/credentials/P4StandardCredentials.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/credentials/P4StandardCredentials.java | |||||
#7 | 8737 | Paul Allen |
Added basic Help for SCM Configuration page. Tidy up descriptions and fix (null:null) in Credential summary. |
||
#6 | 8660 | Paul Allen | Added P4TRUST for SSL connections in the Credentials plugin and ConnectionFactory. | ||
#5 | 8640 | Paul Allen |
Added Workspace and Singleton descriptor. Removed old connection code. |
||
#4 | 8639 | Paul Allen |
Added hint URL to Credentials page when no Credentials are defined. Minor refactor and UX changes. |
||
#3 | 8629 | Paul Allen |
Added p4java with connection/authorisation helper classes. Included SSL support and detection of Unicode servers. |
||
#2 | 8612 | Paul Allen | Job can now select and save/load Credential choice (some cleanup TODO) | ||
#1 | 8611 | Paul Allen | Basic implementation of Credentials Store |