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

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

public class OrganizationService
extends GitHubService

Organization service class

See Also:
GitHub organization API documentation, GitHub organization membership API documentation

Field Summary
 
Fields inherited from class org.eclipse.egit.github.core.service.GitHubService
ACCEPT_FULL, ACCEPT_HTML, ACCEPT_TEXT, client
 
Constructor Summary
OrganizationService()
          Create organization service
OrganizationService(GitHubClient client)
          Create organization service
 
Method Summary
protected  PagedRequest<User> createOrgRequest(String user, int start, int size)
          Create org request
 User editOrganization(User organization)
          Edit given organization
 List<User> getMembers(String organization)
          Get members of organization
 User getOrganization(String name)
          Get organization with the given name
 List<User> getOrganizations()
          Get organizations that the currently authenticated user is a member of
 List<User> getOrganizations(String user)
          Get organizations that the given user is a member of
 List<User> getPublicMembers(String organization)
          Get public members of organization
 void hideMembership(String organization, String user)
          Conceal membership of given user in given organization
 boolean isMember(String organization, String user)
          Check if the given user is a member of the given organization
 boolean isPublicMember(String organization, String user)
          Check if the given user is a public member of the given organization
 void removeMember(String organization, String user)
          Remove the given member from the given organization
 void showMembership(String organization, String user)
          Publicize membership of given user in given organization
 
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

OrganizationService

public OrganizationService()
Create organization service


OrganizationService

public OrganizationService(GitHubClient client)
Create organization service

Parameters:
client -
Method Detail

createOrgRequest

protected PagedRequest<User> createOrgRequest(String user,
                                              int start,
                                              int size)
Create org request

Parameters:
user -
start -
size -
Returns:
request

getOrganizations

public List<User> getOrganizations()
                            throws IOException
Get organizations that the currently authenticated user is a member of

Returns:
list of organizations
Throws:
IOException

getOrganizations

public List<User> getOrganizations(String user)
                            throws IOException
Get organizations that the given user is a member of

Parameters:
user -
Returns:
list of organizations
Throws:
IOException

getOrganization

public User getOrganization(String name)
                     throws IOException
Get organization with the given name

Parameters:
name -
Returns:
organization
Throws:
IOException

editOrganization

public User editOrganization(User organization)
                      throws IOException
Edit given organization

Parameters:
organization -
Returns:
edited organization
Throws:
IOException

getMembers

public List<User> getMembers(String organization)
                      throws IOException
Get members of organization

Parameters:
organization -
Returns:
list of all organization members
Throws:
IOException

getPublicMembers

public List<User> getPublicMembers(String organization)
                            throws IOException
Get public members of organization

Parameters:
organization -
Returns:
list of public organization members
Throws:
IOException

isMember

public boolean isMember(String organization,
                        String user)
                 throws IOException
Check if the given user is a member of the given organization

Parameters:
organization -
user -
Returns:
true if member, false if not member
Throws:
IOException

isPublicMember

public boolean isPublicMember(String organization,
                              String user)
                       throws IOException
Check if the given user is a public member of the given organization

Parameters:
organization -
user -
Returns:
true if public member, false if not public member
Throws:
IOException

showMembership

public void showMembership(String organization,
                           String user)
                    throws IOException
Publicize membership of given user in given organization

Parameters:
organization -
user -
Throws:
IOException

hideMembership

public void hideMembership(String organization,
                           String user)
                    throws IOException
Conceal membership of given user in given organization

Parameters:
organization -
user -
Throws:
IOException

removeMember

public void removeMember(String organization,
                         String user)
                  throws IOException
Remove the given member from the given organization

Parameters:
organization -
user -
Throws:
IOException


Copyright © 2012. All Rights Reserved.