public class


extends 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.


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()
Inherited Methods
From class java.lang.Object

Public Methods

@Nonnull public String getBranch ()

  • the branch on which the edit operation would happen

@Nonnull public InputSupplier<InputStream> getContent ()

  • a supplier providing access to the file content

@Nonnull public Optional<String> getMessage ()

  • the commit message

@Nonnull public String getPath ()

  • the file path

@Nonnull public Repository getRepository ()

  • the repository in which the edit operation would be executed

@Nonnull public String getSourceBranch ()

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

@Nonnull public Optional<String> getSourceCommitId ()

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