java.lang.Object
org.apereo.cas.configuration.model.support.git.services.BaseGitProperties
All Implemented Interfaces:
Serializable, CasFeatureModule
Direct Known Subclasses:
GitSamlMetadataProperties, GitServiceRegistryProperties

@RequiresModule(name="cas-server-support-git-core") public abstract class BaseGitProperties extends Object implements CasFeatureModule, Serializable
Since:
6.1.0
See Also:
  • Constructor Details

    • BaseGitProperties

      public BaseGitProperties()
  • Method Details

    • getRepositoryUrl

      public String getRepositoryUrl()
      The address of the git repository. Could be a URL or a file-system path.
    • getActiveBranch

      public String getActiveBranch()
      The branch to checkout and activate, defaults to master.
    • getBranchesToClone

      public String getBranchesToClone()
      If the repository is to be cloned, this will allow a select list of branches to be fetched. List the branch names separated by commas or use * to clone all branches. Defaults to all branches.
    • getUsername

      public String getUsername()
      Username used to access or push to the repository.
    • getPassword

      public String getPassword()
      Password used to access or push to the repository.
    • isPushChanges

      public boolean isPushChanges()
      Decide whether changes should be pushed back into the remote repository.
    • isSignCommits

      public boolean isSignCommits()
      Whether commits should be signed.
    • isRebase

      public boolean isRebase()
      Whether to rebase on pulls.
    • getPrivateKeyPassphrase

      public String getPrivateKeyPassphrase()
      Password for the SSH private key.
    • getPrivateKey

      public SpringResourceProperties getPrivateKey()
      Path to the SSH private key identity. Must be a resource that can resolve to an absolute file on disk due to Jsch library needing String path. Classpath resource would work if file on disk rather than inside archive.
    • getSshSessionPassword

      public String getSshSessionPassword()
      As with using SSH with public keys, an SSH session with ssh://[email protected]/repo.git must be specified to use password-secured SSH connections.
    • isStrictHostKeyChecking

      public boolean isStrictHostKeyChecking()
      Whether on not to turn on strict host key checking. true will be "yes", false will be "no", "ask" not supported.
    • isClearExistingIdentities

      public boolean isClearExistingIdentities()
      When establishing an ssh session, determine if default identities loaded on the machine should be excluded/removed and identity should only be limited to those loaded from given keys.
    • getTimeout

      public String getTimeout()
      Timeout for git operations such as push and pull in seconds.
    • getCloneDirectory

      public SpringResourceProperties getCloneDirectory()
      Directory into which the repository would be cloned.
    • getHttpClientType

      public BaseGitProperties.HttpClientTypes getHttpClientType()
      Implementation of HTTP client to use when doing git operations via http/https. The jgit library sets the connection factory statically (globally) so this property should be set to the same value for all git repositories (services, saml, etc). Not doing so might result in one connection factory being used for clone and another for subsequent fetches.
    • setRepositoryUrl

      public BaseGitProperties setRepositoryUrl(String repositoryUrl)
      The address of the git repository. Could be a URL or a file-system path.
      Returns:
      this.
    • setActiveBranch

      public BaseGitProperties setActiveBranch(String activeBranch)
      The branch to checkout and activate, defaults to master.
      Returns:
      this.
    • setBranchesToClone

      public BaseGitProperties setBranchesToClone(String branchesToClone)
      If the repository is to be cloned, this will allow a select list of branches to be fetched. List the branch names separated by commas or use * to clone all branches. Defaults to all branches.
      Returns:
      this.
    • setUsername

      public BaseGitProperties setUsername(String username)
      Username used to access or push to the repository.
      Returns:
      this.
    • setPassword

      public BaseGitProperties setPassword(String password)
      Password used to access or push to the repository.
      Returns:
      this.
    • setPushChanges

      public BaseGitProperties setPushChanges(boolean pushChanges)
      Decide whether changes should be pushed back into the remote repository.
      Returns:
      this.
    • setSignCommits

      public BaseGitProperties setSignCommits(boolean signCommits)
      Whether commits should be signed.
      Returns:
      this.
    • setRebase

      public BaseGitProperties setRebase(boolean rebase)
      Whether to rebase on pulls.
      Returns:
      this.
    • setPrivateKeyPassphrase

      public BaseGitProperties setPrivateKeyPassphrase(String privateKeyPassphrase)
      Password for the SSH private key.
      Returns:
      this.
    • setPrivateKey

      public BaseGitProperties setPrivateKey(SpringResourceProperties privateKey)
      Path to the SSH private key identity. Must be a resource that can resolve to an absolute file on disk due to Jsch library needing String path. Classpath resource would work if file on disk rather than inside archive.
      Returns:
      this.
    • setSshSessionPassword

      public BaseGitProperties setSshSessionPassword(String sshSessionPassword)
      As with using SSH with public keys, an SSH session with ssh://[email protected]/repo.git must be specified to use password-secured SSH connections.
      Returns:
      this.
    • setStrictHostKeyChecking

      public BaseGitProperties setStrictHostKeyChecking(boolean strictHostKeyChecking)
      Whether on not to turn on strict host key checking. true will be "yes", false will be "no", "ask" not supported.
      Returns:
      this.
    • setClearExistingIdentities

      public BaseGitProperties setClearExistingIdentities(boolean clearExistingIdentities)
      When establishing an ssh session, determine if default identities loaded on the machine should be excluded/removed and identity should only be limited to those loaded from given keys.
      Returns:
      this.
    • setTimeout

      public BaseGitProperties setTimeout(String timeout)
      Timeout for git operations such as push and pull in seconds.
      Returns:
      this.
    • setCloneDirectory

      public BaseGitProperties setCloneDirectory(SpringResourceProperties cloneDirectory)
      Directory into which the repository would be cloned.
      Returns:
      this.
    • setHttpClientType

      public BaseGitProperties setHttpClientType(BaseGitProperties.HttpClientTypes httpClientType)
      Implementation of HTTP client to use when doing git operations via http/https. The jgit library sets the connection factory statically (globally) so this property should be set to the same value for all git repositories (services, saml, etc). Not doing so might result in one connection factory being used for clone and another for subsequent fetches.
      Returns:
      this.