Top Description Fields Constructors Methods
org.eclipse.jgit.api

public Class AddNoteCommand

extends GitCommand<Note>
Class Inheritance
Imports
java.io.IOException, org.eclipse.jgit.api.errors.GitAPIException, .JGitInternalException, org.eclipse.jgit.lib.CommitBuilder, .Constants, .ObjectId, .ObjectInserter, .PersonIdent, .Ref, .RefUpdate, .Repository, org.eclipse.jgit.notes.Note, .NoteMap, org.eclipse.jgit.revwalk.RevCommit, .RevObject, .RevWalk

Add object notes.
See Also
Git documentation about Notes

Field Summary

Modifier and TypeField and Description
private RevObject
private String
private String
Inherited from org.eclipse.jgit.api.GitCommand:
repo

Constructor Summary

AccessConstructor and Description
protected
AddNoteCommand(Repository repo)

Constructor for AddNoteCommand

Method Summary

Modifier and TypeMethod and Description
public Note
call()

Implements abstract org.eclipse.jgit.api.GitCommand.call.

Implements java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.

pack-priv static void
commitNoteMap(Repository r, String ref, RevWalk walk, NoteMap map, RevCommit notesCommit, ObjectInserter inserter, String msg)

public AddNoteCommand

Returns:

this
setMessage
(String
the notes message used when adding a note
message
)

Set the notes message

public AddNoteCommand

Returns:

this
setNotesRef
(String
the ref to read notes from. Note, the default value of org.eclipse.jgit.lib.Constants#R_NOTES_COMMITS will be used if nothing is set
notesRef
)

Set name of a Ref to read notes from

public AddNoteCommand

Returns:

this
setObjectId
(RevObject id)

Sets the object id of object you want a note on.

Inherited from org.eclipse.jgit.api.GitCommand:
checkCallablegetRepositorysetCallable

Field Detail

idback to summary
private RevObject id
messageback to summary
private String message
notesRefback to summary
private String notesRef

Constructor Detail

AddNoteCommandback to summary
protected AddNoteCommand(Repository repo)

Constructor for AddNoteCommand

Parameters
repo:Repository

the org.eclipse.jgit.lib.Repository

Method Detail

callback to summary
public Note call() throws GitAPIException

Implements abstract org.eclipse.jgit.api.GitCommand.call.

Implements java.util.concurrent.Callable.call.

Doc from org.eclipse.jgit.api.GitCommand.call.

Computes a result, or throws an exception if unable to do so.

Execute the command

Returns:Note

Doc from java.util.concurrent.Callable.call.

computed result

Annotations
@Override
commitNoteMapback to summary
pack-priv static void commitNoteMap(Repository r, String ref, RevWalk walk, NoteMap map, RevCommit notesCommit, ObjectInserter inserter, String msg) throws IOException
setMessageback to summary
public AddNoteCommand setMessage(String message)

Set the notes message

Parameters
message:String

the notes message used when adding a note

Returns:AddNoteCommand

this

setNotesRefback to summary
public AddNoteCommand setNotesRef(String notesRef)

Set name of a Ref to read notes from

Parameters
notesRef:String

the ref to read notes from. Note, the default value of org.eclipse.jgit.lib.Constants#R_NOTES_COMMITS will be used if nothing is set

Returns:AddNoteCommand

this

See Also
Constants#R_NOTES_COMMITS
setObjectIdback to summary
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:RevObject

a org.eclipse.jgit.revwalk.RevObject

Returns:AddNoteCommand

this