Package com.atlassian.bitbucket.content
Class EditFileRequest
java.lang.Object
com.atlassian.bitbucket.content.EditFileRequest
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 happengetPath()
: The path of the filegetRepository()
: The repository in which the edit operation should be donegetContent()
: A supplier providing access to the file content
getSourceCommitId()
is not provided, it's assumed the file doesn't exist on the branch and a
new file will be created.- Since:
- 4.13
- See Also:
-
Nested Class Summary
-
Method Summary
-
Method Details
-
getAuthor
The author of the commit, if provided. If not provided, the author of the commit will be the currently authenticated user.- Since:
- 7.13
-
getBranch
- Returns:
- the branch on which the edit operation would happen
-
getContent
- Returns:
- a supplier providing access to the file content
-
getMessage
- Returns:
- the commit message
-
getPath
- Returns:
- the file path
-
getRepository
- Returns:
- the repository in which the edit operation would be executed
-
getSourceBranch
- Returns:
- the name of the branch that should serve as the start point for the edit operation
- Since:
- 5.2
-
getSourceCommitId
- Returns:
- the commit ID of the existing file in the repository, or
Optional#empty
if this is a new file
-