Class P4BaseCredentials

java.lang.Object
com.cloudbees.plugins.credentials.BaseCredentials
com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
org.jenkinsci.plugins.p4.credentials.P4BaseCredentials
All Implemented Interfaces:
com.cloudbees.plugins.credentials.common.IdCredentials, com.cloudbees.plugins.credentials.common.StandardCredentials, com.cloudbees.plugins.credentials.common.StandardUsernameCredentials, com.cloudbees.plugins.credentials.common.UsernameCredentials, com.cloudbees.plugins.credentials.Credentials, ExtensionPoint, Describable<com.cloudbees.plugins.credentials.Credentials>, Serializable, P4Credentials
Direct Known Subclasses:
P4PasswordImpl, P4TicketImpl

public abstract class P4BaseCredentials extends com.cloudbees.plugins.credentials.impl.BaseStandardCredentials implements P4Credentials
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials

    com.cloudbees.plugins.credentials.impl.BaseStandardCredentials.BaseStandardCredentialsDescriptor

    Nested classes/interfaces inherited from interface hudson.ExtensionPoint

    ExtensionPoint.LegacyInstancesAreScopedToHudson

    Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials

    com.cloudbees.plugins.credentials.common.IdCredentials.Helpers

    Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials

    com.cloudbees.plugins.credentials.common.StandardCredentials.NameProvider

    Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardUsernameCredentials

    com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.NameProvider
  • Constructor Summary

    Constructors
    Constructor
    Description
    P4BaseCredentials(com.cloudbees.plugins.credentials.CredentialsScope scope, String id, String description, String p4port, TrustImpl ssl, String username, String retry, String timeout, String p4host)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
     
    int
     
    long
     
     
    int
     
    int
     
     
     
    boolean
     
    boolean
     
    void
    setSessionEnabled(boolean sessionEnabled)
     
    void
    setSessionLife(long sessionLife)
     
    void
     

    Methods inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials

    equals, getDescription, getId, hashCode

    Methods inherited from class com.cloudbees.plugins.credentials.BaseCredentials

    getDescriptor, getScope

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.cloudbees.plugins.credentials.Credentials

    forRun, getDescriptor, getScope

    Methods inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials

    getId

    Methods inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials

    getDescription

    Methods inherited from interface com.cloudbees.plugins.credentials.common.UsernameCredentials

    isUsernameSecret
  • Constructor Details

    • P4BaseCredentials

      public P4BaseCredentials(com.cloudbees.plugins.credentials.CredentialsScope scope, String id, String description, @NonNull String p4port, @CheckForNull TrustImpl ssl, @NonNull String username, @CheckForNull String retry, @CheckForNull String timeout, @CheckForNull String p4host)
      Constructor.
      Parameters:
      scope - the scope.
      id - the id.
      description - the description.
      p4port - Perforce port
      ssl - Perforce SSL options
      username - Perforce username
      retry - Perforce connection retry option
      timeout - Perforce connection timeout option
      p4host - Perforce HOST (optional)
  • Method Details

    • setTick

      @DataBoundSetter public void setTick(String tick)
    • setSessionEnabled

      @DataBoundSetter public void setSessionEnabled(boolean sessionEnabled)
    • setSessionLife

      @DataBoundSetter public void setSessionLife(long sessionLife)
    • getP4port

      public String getP4port()
      Specified by:
      getP4port in interface P4Credentials
      Returns:
      p4port in the form 'hostname:port' Only used for Jelly binding; use getFullP4port()
    • getFullP4port

      public String getFullP4port()
      Returns:
      p4port including 'ssl:' if set JENKINS-62253
    • getP4JavaUri

      public String getP4JavaUri()
    • getSsl

      public TrustImpl getSsl()
      Specified by:
      getSsl in interface P4Credentials
      Returns:
      SSL object if enabled
    • isSslEnabled

      public boolean isSslEnabled()
      Specified by:
      isSslEnabled in interface P4Credentials
      Returns:
      true if SSL is selected Do not use isSsl() JENKINS-58249
    • getTrust

      @CheckForNull public String getTrust()
      Specified by:
      getTrust in interface P4Credentials
      Returns:
      The P4 trust fingerprint
    • getUsername

      public String getUsername()
      Specified by:
      getUsername in interface com.cloudbees.plugins.credentials.common.UsernameCredentials
    • getRetry

      public int getRetry()
    • getTimeout

      public int getTimeout()
    • getP4host

      public String getP4host()
    • getTick

      public int getTick()
    • isSessionEnabled

      public boolean isSessionEnabled()
    • getSessionLife

      public long getSessionLife()