com.atlassian.bitbucket.content.ContentService |
Retrieves the diff, the content or the the blame information of a file.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns
Blame for the lines included by the provided PageRequest for the specified objectId+path
in the specified repository. | |||||||||||
Performs a directory listing for the specified objectId+path from the specified repository, streaming the results
to the provided
callback . | |||||||||||
Streams the raw content of the file into an OutputStream obtained from the given TypeAwareOutputSupplier.
|
Returns Blame
for the lines included by the provided PageRequest
for the specified objectId+path
in the specified repository.
The objectId provided here can be several things:
Blame is returned in a List
rather than a Page
because paging is
implicitly handled by the lines in the PageRequest
--no more than 1 Blame
instance per-line can
ever be generated, so there is no need to page the returned blame (and doing so would require the use of two
PageRequest
s, one to page the lines and one to page the blame).
repository | the repository to use |
---|---|
objectId | an identifier (name or hash) for the branch, tag or commit at which blame should be retrieved |
path | the path for which blame should be retrieved |
pageRequest | defines the set of lines within the file for which blame should be generated |
Blame
objects, ordered by the line at which they start in the file
Performs a directory listing for the specified objectId+path from the specified repository, streaming the results
to the provided callback
.
The objectId provided here can be several things:
The listing is provided to the caller via a callback mechanism - the supplied ContentTreeCallback
parameter. This method promises to call onStart(ContentTreeContext)
on the supplied instance
once followed by zero or more onTreeNode(ContentTreeNode)
for each path in the directory and finally followed by a onEnd(ContentTreeSummary)
.
The caller may force the directory to be performed recursively by supplying the appropriate flag. When recursive,
only files will be listed, not sub directories.
repository | the repository to use |
---|---|
objectId | an identifier (name or hash) for the branch, tag or commit at which blame should be retrieved |
path | the path for which blame should be retrieved |
recursive | whether the directory listing should be recursive |
callback | the callback instance to call as the page starts, the children nodes are encountered and as the page ends |
pageRequest | defines the range of children in the listing the caller is interested in |
repository | the repository |
---|---|
objectId | the identifier for a point in the repository. Can be a commit ID, a branch or a tag |
path | the path to the file |
pageRequest | the page request for the start and limit of the page |
withBlame | true to include blame information for content; otherwise, false to omit it |
fileContentCallback | the callback for receiving lines and page information |
ServiceException | if the stream file operation fails |
---|
Streams the raw content of the file into an OutputStream obtained from the given TypeAwareOutputSupplier. The implementation might try to detect the mime-type of the file, and pass that information to the TypeAwareOutputSupplier. Note: this method is not paged.
repository | the repository to use |
---|---|
objectId | the identifier for a point in the repository. Can be a commit ID, branch or tag |
path | the path to the file |
supplier | an object that can return an OutputStream given a mime-type |
ServiceException | if the stream operation fails. |
---|