public class

EditFileRequest

extends Object
java.lang.Object
   ↳ com.atlassian.bitbucket.content.EditFileRequest

Class Overview

Represents a request to edit a file, this request can be used to create a new file as well as updating an existing file.

The following properties are required:

  • getBranch() ()}: The name of the branch on which the edit should happen
  • getPath() ()}: The path of the file
  • getRepository(): The repository in which the edit operation should be done
  • getContent(): A supplier providing access to the file content
If getSourceCommitId() is not provided, it's assumed the file doesn't exist on the branch and a new file will be created.

Summary

Nested Classes
class EditFileRequest.Builder  
Public Methods
@Nonnull String getBranch()
@Nonnull InputSupplier<InputStream> getContent()
@Nonnull Optional<String> getMessage()
@Nonnull String getPath()
@Nonnull Repository getRepository()
@Nonnull String getSourceBranch()
@Nonnull Optional<String> getSourceCommitId()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

@Nonnull public String getBranch ()

Returns
  • the branch on which the edit operation would happen

@Nonnull public InputSupplier<InputStream> getContent ()

Returns
  • a supplier providing access to the file content

@Nonnull public Optional<String> getMessage ()

Returns
  • the commit message

@Nonnull public String getPath ()

Returns
  • the file path

@Nonnull public Repository getRepository ()

Returns
  • the repository in which the edit operation would be executed

@Nonnull public String getSourceBranch ()

Returns
  • the name of the branch that should serve as the start point for the edit operation

@Nonnull public Optional<String> getSourceCommitId ()

Returns
  • the commit ID of the existing file in the repository, or Optional#empty if this is a new file