public interface Repositories
Modifier and Type | Method and Description |
---|---|
StatusHolder |
copy(RepoPath source,
RepoPath target)
Copies the source repoPath to the targetRepoPath
|
StatusHolder |
delete(RepoPath repoPath)
Deletes the specified repoPath
|
void |
deleteProperty(RepoPath repoPath,
String propertyName)
Deletes the property from the item.
|
StatusHolder |
deploy(RepoPath repoPath,
InputStream inputStream)
Deploy an artifact
|
boolean |
exists(RepoPath repoPath) |
RepoPath |
getArtifactRepoPath(FileLayoutInfo layoutInfo,
String repoKey)
Returns actual repository path for layout information (group, artifact, version, etc.) of an artifact
as it is built according to the layout of the repository.
|
long |
getArtifactsCount(RepoPath repoPath)
Returns the total number of file artifacts under the provided directory repo path.
|
long |
getArtifactsSize(RepoPath repoPath)
Returns the total storage size of the file artifacts under the given directory repo path.
|
List<ItemInfo> |
getChildren(RepoPath repoPath) |
ResourceStreamHandle |
getContent(RepoPath repoPath)
Get a stream handle for the file content
|
RepoPath |
getDescriptorRepoPath(FileLayoutInfo layoutInfo,
String repoKey)
Returns actual repository path for layout information (group, artifact, version, etc.) of a descriptor
as it is built according to the layout of the repository.
|
FileInfo |
getFileInfo(RepoPath repoPath) |
ItemInfo |
getItemInfo(RepoPath repoPath) |
FileLayoutInfo |
getLayoutInfo(RepoPath repoPath)
Returns module related information (group, artifact, version, etc.) for given file, as it was extracted according
to the layout of the repository the file is part of.
|
List<String> |
getLocalRepositories()
Returns a list of keys of local repositories
|
Properties |
getProperties(RepoPath repoPath) |
String |
getProperty(RepoPath repoPath,
String propertyName) |
Set<String> |
getPropertyValues(RepoPath repoPath,
String propertyName) |
List<String> |
getRemoteRepositories()
Returns a list of keys of remote repositories
|
RepositoryConfiguration |
getRepositoryConfiguration(String repoKey) |
StatsInfo |
getStats(RepoPath repoPath)
Returns statistics for the
repoPath , which include downloads count, last download time and last
downloader's name. |
String |
getStringContent(FileInfo fileInfo)
Deprecated.
Use
getStringContent(RepoPath) ()} |
String |
getStringContent(RepoPath repoPath)
Get the content of a file as a string
|
List<String> |
getVirtualRepositories()
Returns a list of keys of virtual repositories
|
boolean |
hasProperty(RepoPath repoPath,
String propertyName) |
boolean |
isLcoalRepoPathHandled(RepoPath repoPath)
Deprecated.
Use
isRepoPathHandled(RepoPath) ()} |
boolean |
isLocalRepoPathAccepted(RepoPath repoPath)
Deprecated.
Use
isRepoPathAccepted(RepoPath) ()} |
boolean |
isRepoPathAccepted(RepoPath repoPath)
Checks if the specified repoPath is accepted by the include/exclude rules of the repoPath's repository.
|
boolean |
isRepoPathHandled(RepoPath repoPath)
Checks if the specified repoPath is handled by the snapshot(integration)/release policy of the repoPath's
repository.
|
StatusHolder |
move(RepoPath source,
RepoPath target)
Moves the source repoPath to the targetRepoPath
|
Properties |
setProperty(RepoPath repoPath,
String propertyName,
String... values) |
Properties |
setPropertyRecursively(RepoPath repoPath,
String propertyName,
String... values) |
String |
translateFilePath(RepoPath source,
String targetRepoKey)
Translates the path of a file from source repository layout to target's one.
|
StatusHolder |
undeploy(RepoPath repoPath)
Deprecated.
Use
delete(RepoPath) instead |
List<String> getLocalRepositories()
List<String> getRemoteRepositories()
List<String> getVirtualRepositories()
RepositoryConfiguration getRepositoryConfiguration(String repoKey)
ItemInfo getItemInfo(RepoPath repoPath)
repoPath
- Repository path of the itemFileInfo getFileInfo(RepoPath repoPath)
repoPath
- Repository path of the file@Deprecated String getStringContent(FileInfo fileInfo)
getStringContent(RepoPath)
()}fileInfo
- String getStringContent(RepoPath repoPath)
repoPath
- The repoPath of the fileResourceStreamHandle getContent(RepoPath repoPath)
repoPath
- The repoPath of the fileResourceStreamHandle.close()
on the resourceStreamHandle after
usage, to avoid leaking resources!Properties getProperties(RepoPath repoPath)
Properties setProperty(RepoPath repoPath, String propertyName, String... values)
Properties setPropertyRecursively(RepoPath repoPath, String propertyName, String... values)
void deleteProperty(RepoPath repoPath, String propertyName)
repoPath
- The item repo pathpropertyName
- Property name to deleteboolean exists(RepoPath repoPath)
StatusHolder deploy(RepoPath repoPath, InputStream inputStream)
repoPath
- inputStream
- StatusHolder delete(RepoPath repoPath)
repoPath
- The repository path to delete@Deprecated StatusHolder undeploy(RepoPath repoPath)
delete(RepoPath)
insteadrepoPath
- boolean isRepoPathHandled(RepoPath repoPath)
repoPath
- @Deprecated boolean isLcoalRepoPathHandled(RepoPath repoPath)
isRepoPathHandled(RepoPath)
()}boolean isRepoPathAccepted(RepoPath repoPath)
repoPath
- @Deprecated boolean isLocalRepoPathAccepted(RepoPath repoPath)
isRepoPathAccepted(RepoPath)
()}StatusHolder move(RepoPath source, RepoPath target)
source
- - A source repository pathtarget
- - A target repository pathStatusHolder copy(RepoPath source, RepoPath target)
source
- - A source repository pathtarget
- - A target repository pathFileLayoutInfo getLayoutInfo(RepoPath repoPath)
String translateFilePath(RepoPath source, String targetRepoKey)
source
- the source repository pathtargetRepoKey
- the target repository keyRepoPath getArtifactRepoPath(FileLayoutInfo layoutInfo, String repoKey)
layoutInfo
- the layout information to build the path fromrepoKey
- the repository the path will be inRepoPath getDescriptorRepoPath(FileLayoutInfo layoutInfo, String repoKey)
layoutInfo
- the layout information to build the path fromrepoKey
- the repository the path will be inlong getArtifactsCount(RepoPath repoPath)
repoPath
- Repo path to count artifacts underlong getArtifactsSize(RepoPath repoPath)
repoPath
- Repo path to return total storage underCopyright © 2015. All rights reserved.