Class Scm

  • All Implemented Interfaces:
    Direct Known Subclasses:

    public abstract class Scm
    Scm Resource
    Vivek Pandey
    • Constructor Detail

      • Scm

        public Scm()
    • Method Detail

      • getId

        public abstract String getId()
        SCM id. For example, github, bitbucket etc.
      • getUri

        public abstract String getUri()
        SCM URI
      • getCredentialId

        public abstract String getCredentialId()
        credentialId attached to this scm
      • getOrganizations

        public abstract<ScmOrganization> getOrganizations()
        Pageable list of ScmOrganizations. Credential Id to use with github must be provided either as credentialId query parameter or as X-CREDENTIAL-NAME http header. credentialId query parameter overrides X-CREDENTIAL-NAME http header.
        Pageable ScmOrganizations.
      • validateAndCreate

        public abstract org.kohsuke.stapler.HttpResponse validateAndCreate​(@JsonBody
                                                                           net.sf.json.JSONObject request)
        Validate given credential parameters for authentication and authorization. Response is { "credentialId": "....." } Validation of provided credential is scm dependent. If provided credential parameters (username, password or accessToken etc.) are not valid or do not carry expected scope (such as permission to update repo, basic user info, email etc.) then an error is returned. If there is already a Credentials object present then it's updated with provided credential parameters, otherwise new Credentials object is created and it's credential id is returned in the response.
        request - request object carrying credential parameters for this SCM
        credential id. If accessToken is not applicable to this SCM, null is returned.