public class LfsConnectionFactory extends Object
| Constructor and Description |
|---|
LfsConnectionFactory() |
| Modifier and Type | Method and Description |
|---|---|
static HttpConnection |
getLfsConnection(Repository db,
String method,
String purpose)
Determine URL of LFS server by looking into config parameters lfs.url,
lfs.[remote].url or remote.[remote].url.
|
static HttpConnection |
getLfsContentConnection(Repository repo,
Protocol.Action action,
String method)
Create a connection for the specified
Protocol.Action. |
static Protocol.Request |
toRequest(String operation,
LfsPointer... resources) |
public static HttpConnection getLfsConnection(Repository db, String method, String purpose) throws IOException
db - the repository to work withmethod - the method (GET,PUT,...) of the request this connection will
be used forpurpose - the action, e.g. Protocol.OPERATION_DOWNLOADIOException@NonNull public static HttpConnection getLfsContentConnection(Repository repo, Protocol.Action action, String method) throws IOException
Protocol.Action.repo - the repo to fetch required configuration fromaction - the action for which to create a connectionmethod - the target method (GET or PUT)IOException - in case of any error.public static Protocol.Request toRequest(String operation, LfsPointer... resources)
operation - the operation to perform, e.g. Protocol.OPERATION_DOWNLOADresources - the LFS resources affectedCopyright © 2020 Eclipse JGit Project. All rights reserved.