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

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

public class CollaboratorService
extends GitHubService

Service for interacting with the collaborators on a GitHub repository

See Also:
GitHub collaborator API documentation

Field Summary
 
Fields inherited from class org.eclipse.egit.github.core.service.GitHubService
ACCEPT_FULL, ACCEPT_HTML, ACCEPT_TEXT, client
 
Constructor Summary
CollaboratorService()
          Create collaborator service
CollaboratorService(GitHubClient client)
          Create collaborator service
 
Method Summary
 void addCollaborator(IRepositoryIdProvider repository, String user)
          Add given user as a collaborator on the given repository
protected  String createUpdateUri(IRepositoryIdProvider repository, String user)
          Create URI for updating collaborators
 List<User> getCollaborators(IRepositoryIdProvider repository)
          Get collaborators for given repository
 boolean isCollaborator(IRepositoryIdProvider repository, String user)
          Is given user a collaborator on the given repository?
 void removeCollaborator(IRepositoryIdProvider repository, String user)
          Remove given user as a collaborator on the given repository
 
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

CollaboratorService

public CollaboratorService()
Create collaborator service


CollaboratorService

public CollaboratorService(GitHubClient client)
Create collaborator service

Parameters:
client -
Method Detail

getCollaborators

public List<User> getCollaborators(IRepositoryIdProvider repository)
                            throws IOException
Get collaborators for given repository

Parameters:
repository -
Returns:
non-null list of collaborators
Throws:
IOException

createUpdateUri

protected String createUpdateUri(IRepositoryIdProvider repository,
                                 String user)
Create URI for updating collaborators

Parameters:
repository -
user -
Returns:
URI

isCollaborator

public boolean isCollaborator(IRepositoryIdProvider repository,
                              String user)
                       throws IOException
Is given user a collaborator on the given repository?

Parameters:
repository -
user -
Returns:
true if collaborator, false otherwise
Throws:
IOException

addCollaborator

public void addCollaborator(IRepositoryIdProvider repository,
                            String user)
                     throws IOException
Add given user as a collaborator on the given repository

Parameters:
repository -
user -
Throws:
IOException

removeCollaborator

public void removeCollaborator(IRepositoryIdProvider repository,
                               String user)
                        throws IOException
Remove given user as a collaborator on the given repository

Parameters:
repository -
user -
Throws:
IOException


Copyright © 2012. All Rights Reserved.