Package org.eclipse.jgit.api
Class AddNoteCommand
- java.lang.Object
-
- org.eclipse.jgit.api.GitCommand<Note>
-
- org.eclipse.jgit.api.AddNoteCommand
-
public class AddNoteCommand extends GitCommand<Note>
Add object notes.- See Also:
- Git documentation about Notes
-
-
Field Summary
-
Fields inherited from class org.eclipse.jgit.api.GitCommand
repo
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAddNoteCommand(Repository repo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Notecall()Executes the commandAddNoteCommandsetMessage(String message)AddNoteCommandsetNotesRef(String notesRef)AddNoteCommandsetObjectId(RevObject id)Sets the object id of object you want a note on.-
Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
-
-
-
-
Constructor Detail
-
AddNoteCommand
protected AddNoteCommand(Repository repo)
- Parameters:
repo-
-
-
Method Detail
-
call
public Note call() throws GitAPIException
Description copied from class:GitCommandExecutes the command- Specified by:
callin interfaceCallable<Note>- Specified by:
callin classGitCommand<Note>- Returns:
- T a result. Each command has its own return type
- Throws:
GitAPIException- or subclass thereof when an error occurs
-
setObjectId
public AddNoteCommand setObjectId(RevObject id)
Sets the object id of object you want a note on. If the object already has a note, the existing note will be replaced.- Parameters:
id-- Returns:
this
-
setMessage
public AddNoteCommand setMessage(String message)
- Parameters:
message- the notes message used when adding a note- Returns:
this
-
setNotesRef
public AddNoteCommand setNotesRef(String notesRef)
- Parameters:
notesRef- the ref to read notes from. Note, the default value ofConstants.R_NOTES_COMMITSwill be used if nothing is set- Returns:
this- See Also:
Constants.R_NOTES_COMMITS
-
-