Class BitbucketFilePathClientImpl
java.lang.Object
com.atlassian.bitbucket.jenkins.internal.client.BitbucketFilePathClientImpl
- All Implemented Interfaces:
BitbucketFilePathClient
-
Constructor Summary
ConstructorDescriptionBitbucketFilePathClientImpl
(BitbucketRequestExecutor bitbucketRequestExecutor, String projectKey, String repositorySlug) -
Method Summary
Modifier and TypeMethodDescriptionList<jenkins.scm.api.SCMFile>
getDirectoryContent
(BitbucketSCMFile directory) Retrieves the list of all files and directories that can be found.jenkins.scm.api.SCMFile.Type
getFileType
(String path, String ref) Retrieves thefile type
for the specified file path and ref.getRawFileStream
(BitbucketSCMFile scmFile) Retrieve the bytes of a file in a repository.
-
Constructor Details
-
BitbucketFilePathClientImpl
public BitbucketFilePathClientImpl(BitbucketRequestExecutor bitbucketRequestExecutor, String projectKey, String repositorySlug)
-
-
Method Details
-
getDirectoryContent
Description copied from interface:BitbucketFilePathClient
Retrieves the list of all files and directories that can be found.- Specified by:
getDirectoryContent
in interfaceBitbucketFilePathClient
- Parameters:
directory
- the directory to retrieve- Returns:
- a list of all
SCMFile
s directly contained in the directory
-
getFileType
Description copied from interface:BitbucketFilePathClient
Retrieves thefile type
for the specified file path and ref.- Specified by:
getFileType
in interfaceBitbucketFilePathClient
- Parameters:
path
- the path of the file or directory to retrieveref
- The commit ID or ref to retrieve the file for- Returns:
- the
type
for the specified file
-
getRawFileStream
Description copied from interface:BitbucketFilePathClient
Retrieve the bytes of a file in a repository. The bytes are encapsulated in anInputStream
object. The caller of this method is responsible for closing the stream.- Specified by:
getRawFileStream
in interfaceBitbucketFilePathClient
- Parameters:
scmFile
- the file to retrieve- Returns:
- the bytes of the file in an
InputStream
object.
-