package org.jenkinsci.plugins.p4.credentials; import com.cloudbees.plugins.credentials.CredentialsScope; import com.cloudbees.plugins.credentials.impl.BaseStandardCredentials; import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; import hudson.Util; public abstract class P4BaseCredentials extends BaseStandardCredentials implements P4Credentials { private static final long serialVersionUID = 1L; @NonNull private final String p4port; @CheckForNull private final TrustImpl ssl; @NonNull private final String username; @CheckForNull private final String retry; @CheckForNull private final String timeout; /** * Constructor. * * @param scope the scope. * @param id the id. * @param description the description. * @param p4port Perforce port * @param ssl Perforce SSL options * @param username Perforce username * @param retry Perforce connection retry option * @param timeout Perforce connection timeout option */ public P4BaseCredentials(CredentialsScope scope, String id, String description, @NonNull String p4port, @CheckForNull TrustImpl ssl, @NonNull String username, @CheckForNull String retry, @CheckForNull String timeout) { super(scope, id, description); this.p4port = Util.fixNull(p4port); this.ssl = ssl; this.username = Util.fixNull(username); this.retry = retry; this.timeout = timeout; } @NonNull public String getP4port() { return p4port; } public boolean isSsl() { return (ssl == null) ? false : true; } @CheckForNull public String getTrust() { return (ssl == null) ? null : ssl.getTrust(); } @NonNull public String getUsername() { return username; } public int getRetry() { if (retry != null && !retry.isEmpty()) { return Integer.parseInt(retry); } else { return 0; } } public int getTimeout() { if (timeout != null && !timeout.isEmpty()) { return Integer.parseInt(timeout); } else { return 0; } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 23685 | Paul Allen | Copy main -> dev | ||
#1 | 20641 | Paul Allen | Copy main -> dev (jenkinsci/p4-plugin) | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/credentials/P4BaseCredentials.java | |||||
#4 | 20598 | Paul Allen |
P4Credentials Interfaces for Mixins. Updated test cases to match changes from CredentialsNameProvider. @stephenc |
||
#3 | 20179 | Paul Allen | Javadoc fixes for java 8 builds. | ||
#2 | 16502 | Paul Allen |
Advanced Credentials option for RPC_SOCKET_SO_TIMEOUT_NICK JENKINS-31196 |
||
#1 | 15656 | Paul Allen |
Updated credentials to extend BaseStandardCredentials. Allows users to set the ID at creation. JENKINS-29702 |
||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/credentials/P4StandardCredentials.java | |||||
#4 | 15293 | Paul Allen |
Add retry attempts to Perforce Tasks. If a task fails due to an exception then the task will retry based on the value specified in the connection Credential. |
||
#3 | 11142 | Paul Allen |
Remove redundant code for Credential name fix Only the `@NameWith` annotation is required to report the Credential name. JENKINS-25682 |
||
#2 | 11132 | Paul Allen |
Fix Credential name for Template plugin Added `@NameWith` annotation to allow the implementation to override the reported Credential name. JENKINS-25682 |
||
#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 |