|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.egit.github.core.service.GitHubService
org.eclipse.egit.github.core.service.DownloadService
public class DownloadService
Service for accessing, creating, and deleting repositories downloads.
Field Summary | |
---|---|
static String |
UPLOAD_ACL
UPLOAD_ACL |
static String |
UPLOAD_AWS_ACCESS_KEY_ID
UPLOAD_AWS_ACCESS_KEY_ID |
static String |
UPLOAD_CONTENT_TYPE
UPLOAD_CONTENT_TYPE |
static String |
UPLOAD_FILE
UPLOAD_FILE |
static String |
UPLOAD_FILENAME
UPLOAD_FILENAME |
static String |
UPLOAD_KEY
UPLOAD_KEY |
static String |
UPLOAD_POLICY
UPLOAD_POLICY |
static String |
UPLOAD_SIGNATURE
UPLOAD_SIGNATURE |
static String |
UPLOAD_SUCCESS_ACTION_STATUS
UPLOAD_SUCCESS_ACTION_STATUS |
Fields inherited from class org.eclipse.egit.github.core.service.GitHubService |
---|
ACCEPT_FULL, ACCEPT_HTML, ACCEPT_TEXT, client |
Constructor Summary | |
---|---|
DownloadService()
Create download service |
|
DownloadService(GitHubClient client)
Create download service |
Method Summary | |
---|---|
DownloadResource |
createDownload(IRepositoryIdProvider repository,
Download download,
File file)
Create download from content of given file. |
DownloadResource |
createDownload(IRepositoryIdProvider repository,
Download download,
InputStream content,
long size)
Create download and set the content to be the content of given input stream. |
protected PagedRequest<Download> |
createDownloadsRequest(IRepositoryIdProvider repository,
int start,
int size)
Create paged downloads request |
DownloadResource |
createResource(IRepositoryIdProvider repository,
Download download)
Create a new resource for download associated with the given repository |
void |
deleteDownload(IRepositoryIdProvider repository,
int id)
Delete download with given id from given repository |
Download |
getDownload(IRepositoryIdProvider repository,
int id)
Get download metadata for given repository and id |
List<Download> |
getDownloads(IRepositoryIdProvider repository)
Get metadata for all downloads for given repository |
PageIterator<Download> |
pageDownloads(IRepositoryIdProvider repository)
Page metadata for downloads for given repository |
PageIterator<Download> |
pageDownloads(IRepositoryIdProvider repository,
int size)
Page downloads for given repository |
PageIterator<Download> |
pageDownloads(IRepositoryIdProvider repository,
int start,
int size)
Page downloads for given repository |
void |
uploadResource(DownloadResource resource,
InputStream content,
long size)
Upload a resource to be available as the download described by the given resource. |
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 |
Field Detail |
---|
public static final String UPLOAD_KEY
public static final String UPLOAD_ACL
public static final String UPLOAD_SUCCESS_ACTION_STATUS
public static final String UPLOAD_FILENAME
public static final String UPLOAD_AWS_ACCESS_KEY_ID
public static final String UPLOAD_POLICY
public static final String UPLOAD_SIGNATURE
public static final String UPLOAD_FILE
public static final String UPLOAD_CONTENT_TYPE
Constructor Detail |
---|
public DownloadService()
public DownloadService(GitHubClient client)
client
- Method Detail |
---|
public Download getDownload(IRepositoryIdProvider repository, int id) throws IOException
repository
- id
-
IOException
protected PagedRequest<Download> createDownloadsRequest(IRepositoryIdProvider repository, int start, int size)
repository
- start
- size
-
public List<Download> getDownloads(IRepositoryIdProvider repository) throws IOException
repository
-
IOException
public PageIterator<Download> pageDownloads(IRepositoryIdProvider repository)
repository
-
public PageIterator<Download> pageDownloads(IRepositoryIdProvider repository, int size)
repository
- size
-
public PageIterator<Download> pageDownloads(IRepositoryIdProvider repository, int start, int size)
repository
- start
- size
-
public void deleteDownload(IRepositoryIdProvider repository, int id) throws IOException
repository
- id
-
IOException
public DownloadResource createResource(IRepositoryIdProvider repository, Download download) throws IOException
repository
- download
-
IOException
public void uploadResource(DownloadResource resource, InputStream content, long size) throws IOException
resource
- content
- size
-
IOException
public DownloadResource createDownload(IRepositoryIdProvider repository, Download download, InputStream content, long size) throws IOException
createResource(IRepositoryIdProvider, Download)
followed by a
uploadResource(DownloadResource, InputStream, long)
with the
results.
repository
- download
- metadata about the downloadcontent
- raw content of the downloadsize
- size of content in the input stream
IOException
public DownloadResource createDownload(IRepositoryIdProvider repository, Download download, File file) throws IOException
repository
- download
- metadata about the downloadfile
- must be non-null
IOException
createDownload(IRepositoryIdProvider, Download, InputStream, long)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |