java.lang.Object
org.nasdanika.models.gitlab.util.GitLabURIHandler
- All Implemented Interfaces:
URIHandler
A very simple implementation of
URIHandler to retrieve content from GitLab using REST API
URI format: gitlab://projectid/ref/path-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected org.gitlab4j.api.GitLabApiprotected org.gitlab4j.api.RepositoryApiprotected org.gitlab4j.api.RepositoryFileApiFields inherited from interface org.eclipse.emf.ecore.resource.URIHandler
DEFAULT_HANDLERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontentDescription(URI uri, Map<?, ?> options) createInputStream(URI uri, Map<?, ?> options) createOutputStream(URI uri, Map<?, ?> options) voidbooleangetAttributes(URI uri, Map<?, ?> options) protected Stringprotected ObjectgetProjectIdOrPath(URI uri) This method returns URI authority parsed as Long.protected StringThis method returns the first (0) URI segmentvoidsetAttributes(URI uri, Map<String, ?> attributes, Map<?, ?> options)
-
Field Details
-
GITLAB_URI_SCHEME
- See Also:
-
repositoryFileApi
-
gitLabApi
-
repositoryApi
-
-
Constructor Details
-
GitLabURIHandler
-
-
Method Details
-
canHandle
- Specified by:
canHandlein interfaceURIHandler
-
createInputStream
- Specified by:
createInputStreamin interfaceURIHandler- Throws:
IOException
-
getProjectIdOrPath
This method returns URI authority parsed as Long. Override as needed- Parameters:
uri-- Returns:
-
getRef
This method returns the first (0) URI segment- Parameters:
uri-- Returns:
-
getPath
-
createOutputStream
- Specified by:
createOutputStreamin interfaceURIHandler- Throws:
IOException
-
delete
- Specified by:
deletein interfaceURIHandler- Throws:
IOException
-
contentDescription
- Specified by:
contentDescriptionin interfaceURIHandler- Throws:
IOException
-
exists
- Specified by:
existsin interfaceURIHandler
-
getAttributes
- Specified by:
getAttributesin interfaceURIHandler
-
setAttributes
- Specified by:
setAttributesin interfaceURIHandler- Throws:
IOException
-