org.eclipse.egit.github.core.service
Class DataService

java.lang.Object
  extended by org.eclipse.egit.github.core.service.GitHubService
      extended by org.eclipse.egit.github.core.service.DataService

public class DataService
extends GitHubService

Data service class for low-level access to Git repository data.

See Also:
GitHub data API documentation

Field Summary
 
Fields inherited from class org.eclipse.egit.github.core.service.GitHubService
ACCEPT_FULL, ACCEPT_HTML, ACCEPT_TEXT, client
 
Constructor Summary
DataService()
          Create data service
DataService(GitHubClient client)
          Create data service
 
Method Summary
 String createBlob(IRepositoryIdProvider repository, Blob blob)
          Create blob with given content
 Commit createCommit(IRepositoryIdProvider repository, Commit commit)
          Create commit in given repository
 Reference createReference(IRepositoryIdProvider repository, Reference reference)
          Create reference
 Tag createTag(IRepositoryIdProvider repository, Tag tag)
          Create tag object in given repository
 Tree createTree(IRepositoryIdProvider repository, Collection<TreeEntry> entries)
          Create tree
 Tree createTree(IRepositoryIdProvider repository, Collection<TreeEntry> entries, String baseTree)
          Create tree
 Reference editReference(IRepositoryIdProvider repository, Reference reference)
          Edit reference
 Reference editReference(IRepositoryIdProvider repository, Reference reference, boolean force)
          Edit reference
 Blob getBlob(IRepositoryIdProvider repository, String sha)
          Get blob for given SHA-1
 Commit getCommit(IRepositoryIdProvider repository, String sha)
          Get commit for given SHA-1
 Reference getReference(IRepositoryIdProvider repository, String name)
          Get reference with given name
 List<Reference> getReferences(IRepositoryIdProvider repository)
          Get references for given repository
 Tag getTag(IRepositoryIdProvider repository, String sha)
          Get tag for given SHA-1
 Tree getTree(IRepositoryIdProvider repository, String sha)
          Get tree with given SHA-1
 Tree getTree(IRepositoryIdProvider repository, String sha, boolean recursive)
          Get tree with given SHA-1
 
Methods inherited from class org.eclipse.egit.github.core.service.GitHubService
check, createPagedRequest, createPagedRequest, createPageIterator, createRequest, getAll, getAll, getClient, getId, verifyRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataService

public DataService()
Create data service


DataService

public DataService(GitHubClient client)
Create data service

Parameters:
client -
Method Detail

getBlob

public Blob getBlob(IRepositoryIdProvider repository,
                    String sha)
             throws IOException
Get blob for given SHA-1

Parameters:
repository -
sha -
Returns:
blob
Throws:
IOException

createBlob

public String createBlob(IRepositoryIdProvider repository,
                         Blob blob)
                  throws IOException
Create blob with given content

Parameters:
repository -
blob -
Returns:
SHA-1 of created blob
Throws:
IOException

getTree

public Tree getTree(IRepositoryIdProvider repository,
                    String sha)
             throws IOException
Get tree with given SHA-1

Parameters:
repository -
sha -
Returns:
tree
Throws:
IOException

getTree

public Tree getTree(IRepositoryIdProvider repository,
                    String sha,
                    boolean recursive)
             throws IOException
Get tree with given SHA-1

Parameters:
repository -
sha -
recursive -
Returns:
tree
Throws:
IOException

createTree

public Tree createTree(IRepositoryIdProvider repository,
                       Collection<TreeEntry> entries)
                throws IOException
Create tree

Parameters:
repository -
entries -
Returns:
created tree
Throws:
IOException

createTree

public Tree createTree(IRepositoryIdProvider repository,
                       Collection<TreeEntry> entries,
                       String baseTree)
                throws IOException
Create tree

Parameters:
repository -
entries -
baseTree -
Returns:
created tree
Throws:
IOException

getReference

public Reference getReference(IRepositoryIdProvider repository,
                              String name)
                       throws IOException
Get reference with given name

Parameters:
repository -
name -
Returns:
reference
Throws:
IOException

getReferences

public List<Reference> getReferences(IRepositoryIdProvider repository)
                              throws IOException
Get references for given repository

Parameters:
repository -
Returns:
non-null but possibly empty list of references
Throws:
IOException

createReference

public Reference createReference(IRepositoryIdProvider repository,
                                 Reference reference)
                          throws IOException
Create reference

Parameters:
repository -
reference -
Returns:
created reference
Throws:
IOException

editReference

public Reference editReference(IRepositoryIdProvider repository,
                               Reference reference)
                        throws IOException
Edit reference

Parameters:
repository -
reference -
Returns:
updated reference
Throws:
IOException

editReference

public Reference editReference(IRepositoryIdProvider repository,
                               Reference reference,
                               boolean force)
                        throws IOException
Edit reference

Parameters:
repository -
reference -
force -
Returns:
updated reference
Throws:
IOException

getCommit

public Commit getCommit(IRepositoryIdProvider repository,
                        String sha)
                 throws IOException
Get commit for given SHA-1

Parameters:
repository -
sha -
Returns:
commit
Throws:
IOException

createCommit

public Commit createCommit(IRepositoryIdProvider repository,
                           Commit commit)
                    throws IOException
Create commit in given repository

Parameters:
repository -
commit -
Returns:
created commit
Throws:
IOException

getTag

public Tag getTag(IRepositoryIdProvider repository,
                  String sha)
           throws IOException
Get tag for given SHA-1

Parameters:
repository -
sha -
Returns:
tag
Throws:
IOException

createTag

public Tag createTag(IRepositoryIdProvider repository,
                     Tag tag)
              throws IOException
Create tag object in given repository

Parameters:
repository -
tag -
Returns:
created tag
Throws:
IOException


Copyright © 2012. All Rights Reserved.