Class ScmContentProvider
java.lang.Object
io.jenkins.blueocean.rest.impl.pipeline.ScmContentProvider
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
AbstractScmContentProvider
SCM content specific APIs
- Author:
- Vivek Pandey
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionList<ScmContentProvider>
all()
abstract String
Get the SCM API URL for the provided itemabstract Object
getContent
(org.kohsuke.stapler.StaplerRequest staplerRequest, Item item) Gives content of scm file.abstract String
getScmId()
Get the "scmId" for the content provider as defined in Scm.getId()static ScmContentProvider
ResolveScmContentProvider
for givenItem
.abstract Object
saveContent
(org.kohsuke.stapler.StaplerRequest staplerRequest, Item item) Save contentabstract boolean
ScmContentProvider
instance that supports givenSCMNavigator
.
-
Constructor Details
-
ScmContentProvider
public ScmContentProvider()
-
-
Method Details
-
getScmId
Get the "scmId" for the content provider as defined in Scm.getId()- Returns:
- SCM identifier
-
getApiUrl
Get the SCM API URL for the provided item- Parameters:
item
-Item
item to resolve backing SCM API URL- Returns:
- SCM API URL
-
getContent
@CheckForNull public abstract Object getContent(@NonNull org.kohsuke.stapler.StaplerRequest staplerRequest, @NonNull Item item) Gives content of scm file.- Parameters:
staplerRequest
-StaplerRequest
request specific to this SCMitem
-Item
in context. e.g.OrganizationFolder
orMultiBranchProject
- Returns:
- scm content
-
saveContent
@CheckForNull public abstract Object saveContent(@NonNull org.kohsuke.stapler.StaplerRequest staplerRequest, @NonNull Item item) Save content- Parameters:
staplerRequest
-StaplerRequest
request specific to this SCMitem
-Item
in context. e.g.OrganizationFolder
orMultiBranchProject
- Returns:
- SCM specific save content response
-
support
ScmContentProvider
instance that supports givenSCMNavigator
.- Returns:
- true if this provide can handle it.
-
resolve
ResolveScmContentProvider
for givenItem
.- Parameters:
item
- item for whichScmContentProvider
is resolved- Returns:
- resolved ScmContentProvider
-
all
-