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

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

public class LabelService
extends GitHubService

Label service class for listing Label objects in use for a given repository.

See Also:
GitHub labels API documentation

Field Summary
 
Fields inherited from class org.eclipse.egit.github.core.service.GitHubService
ACCEPT_FULL, ACCEPT_HTML, ACCEPT_TEXT, client
 
Constructor Summary
LabelService()
          Create label service
LabelService(GitHubClient client)
          Create label service for client
 
Method Summary
 Label createLabel(IRepositoryIdProvider repository, Label label)
          Create label
 Label createLabel(String user, String repository, Label label)
          Create label
 void deleteLabel(IRepositoryIdProvider repository, String label)
          Delete a label with the given id from the given repository
 void deleteLabel(String user, String repository, String label)
          Delete a label with the given id from the given repository
 Label editLabel(IRepositoryIdProvider repository, Label label)
          Edit the given label in the given repository
 Label getLabel(IRepositoryIdProvider repository, String label)
          Get label with given name
 Label getLabel(String user, String repository, String label)
          Get label with given name
 List<Label> getLabels(IRepositoryIdProvider repository)
          Get labels
 List<Label> getLabels(String user, String repository)
          Get labels
 List<Label> setLabels(IRepositoryIdProvider repository, String issueId, List<Label> labels)
          Set the labels for an issue
 List<Label> setLabels(String user, String repository, String issueId, List<Label> labels)
          Set the labels for an issue
 
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

LabelService

public LabelService()
Create label service


LabelService

public LabelService(GitHubClient client)
Create label service for client

Parameters:
client -
Method Detail

getLabels

public List<Label> getLabels(IRepositoryIdProvider repository)
                      throws IOException
Get labels

Parameters:
repository -
Returns:
list of labels
Throws:
IOException

getLabels

public List<Label> getLabels(String user,
                             String repository)
                      throws IOException
Get labels

Parameters:
user -
repository -
Returns:
list of labels
Throws:
IOException

setLabels

public List<Label> setLabels(IRepositoryIdProvider repository,
                             String issueId,
                             List<Label> labels)
                      throws IOException
Set the labels for an issue

Parameters:
repository -
issueId -
labels -
Returns:
list of labels
Throws:
IOException

setLabels

public List<Label> setLabels(String user,
                             String repository,
                             String issueId,
                             List<Label> labels)
                      throws IOException
Set the labels for an issue

Parameters:
user -
repository -
issueId -
labels -
Returns:
list of labels
Throws:
IOException

createLabel

public Label createLabel(IRepositoryIdProvider repository,
                         Label label)
                  throws IOException
Create label

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

createLabel

public Label createLabel(String user,
                         String repository,
                         Label label)
                  throws IOException
Create label

Parameters:
user -
repository -
label -
Returns:
created label
Throws:
IOException

getLabel

public Label getLabel(IRepositoryIdProvider repository,
                      String label)
               throws IOException
Get label with given name

Parameters:
repository -
label -
Returns:
label
Throws:
IOException

getLabel

public Label getLabel(String user,
                      String repository,
                      String label)
               throws IOException
Get label with given name

Parameters:
user -
repository -
label -
Returns:
label
Throws:
IOException

deleteLabel

public void deleteLabel(IRepositoryIdProvider repository,
                        String label)
                 throws IOException
Delete a label with the given id from the given repository

Parameters:
repository -
label -
Throws:
IOException

deleteLabel

public void deleteLabel(String user,
                        String repository,
                        String label)
                 throws IOException
Delete a label with the given id from the given repository

Parameters:
user -
repository -
label -
Throws:
IOException

editLabel

public Label editLabel(IRepositoryIdProvider repository,
                       Label label)
                throws IOException
Edit the given label in the given repository

Parameters:
repository -
label -
Returns:
edited label
Throws:
IOException


Copyright © 2012. All Rights Reserved.