public interface CodeArtifacts
This resource API entry point does not use the define() pattern for creating new code
artifact resources, because in practice users always want to "upload" a file as a new code
artifact; therefore, this type exposes "upload" methods for transferring local files to Contrast
Scan as code artifacts.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
CodeArtifacts.Factory
Factory for
CodeArtifacts |
| Modifier and Type | Method and Description |
|---|---|
CodeArtifact |
upload(java.nio.file.Path file)
Transfers a file from the file system to Contrast Scan to create a new code artifact for static
analysis.
|
CodeArtifact |
upload(java.nio.file.Path file,
java.lang.String name)
Transfers a file from the file system to Contrast Scan to create a new code artifact for static
analysis.
|
CodeArtifact upload(java.nio.file.Path file, java.lang.String name) throws java.io.IOException
file - the code artifact to uploadname - the name of the code artifactCodeArtifact from Contrastjava.io.IOException - when an IO error occurs while making the request to the Contrast APIUnauthorizedException - when Contrast rejects the credentials used to send the requestResourceNotFoundException - when the requested resource does not existHttpResponseException - when Contrast rejects this request with an error codeServerResponseException - when Contrast API returns a response that cannot be understoodCodeArtifact upload(java.nio.file.Path file) throws java.io.IOException
file - the code artifact to uploadCodeArtifact from Contrastjava.io.IOException - when an IO error occurs while making the request to the Contrast APIUnauthorizedException - when Contrast rejects the credentials used to send the requestResourceNotFoundException - when the requested resource does not existHttpResponseException - when Contrast rejects this request with an error codeServerResponseException - when Contrast API returns a response that cannot be understoodCopyright © 2021 Contrast Security, Inc.. All rights reserved.