Package jetbrains.buildServer.vcs.impl
Class MixedContentProvider
- java.lang.Object
-
- jetbrains.buildServer.vcs.impl.MixedContentProvider
-
- All Implemented Interfaces:
ContentProvider
public class MixedContentProvider extends Object implements ContentProvider
Works with absolute paths on local disk as well as with paths in Version control. Local paths have higher priority.- Author:
- Kir
-
-
Constructor Summary
Constructors Constructor Description MixedContentProvider(SBuildServer server, VcsWorkspaceAccess vcs, ValueResolver valueResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
getContent(String relativePath)
Get a content of the file from data source represented by this content provider.List<VcsItem>
listItems(String relativePath)
List available items for given path (both files and directories)
-
-
-
Constructor Detail
-
MixedContentProvider
public MixedContentProvider(@NotNull SBuildServer server, @NotNull VcsWorkspaceAccess vcs, @NotNull ValueResolver valueResolver)
-
-
Method Detail
-
getContent
public InputStream getContent(@Nullable String relativePath) throws VcsException, FileNotFoundException
Description copied from interface:ContentProvider
Get a content of the file from data source represented by this content provider.- Specified by:
getContent
in interfaceContentProvider
- Parameters:
relativePath
- path for the requested item- Returns:
- input stream for the data located for the given path. input stream should be closed by the calling code
- Throws:
VcsException
- when there is some error while obtaining input file for the requested fileFileNotFoundException
- when there is no file for the given relative path
-
listItems
public List<VcsItem> listItems(@NotNull String relativePath) throws VcsException, FileNotFoundException
Description copied from interface:ContentProvider
List available items for given path (both files and directories)- Specified by:
listItems
in interfaceContentProvider
- Parameters:
relativePath
- path for the requested directory- Returns:
- list of items available for the given path. Root path is represented by "." or empty string
- Throws:
VcsException
- when there is some error while obtaining list of sub-itemsFileNotFoundException
- when there is no file for the given relative path
-
-