public interface RegistryStorage
Modifier and Type | Method and Description |
---|---|
CompletionStage<ArtifactMetaDataDto> |
createArtifact(String artifactId,
ArtifactType artifactType,
ContentHandle content)
Creates a new artifact (from the given value) in the storage.
|
default void |
createArtifactRule(String artifactId,
RuleType rule,
RuleConfigurationDto config)
Creates an artifact rule for a specific Artifact.
|
CompletionStage<Void> |
createArtifactRuleAsync(String artifactId,
RuleType rule,
RuleConfigurationDto config) |
CompletionStage<ArtifactMetaDataDto> |
createArtifactWithMetadata(String artifactId,
ArtifactType artifactType,
ContentHandle content,
EditableArtifactMetaDataDto metaData)
Creates a new artifact (from the given value including metadata) in the storage.
|
void |
createGlobalRule(RuleType rule,
RuleConfigurationDto config)
Creates a single global rule.
|
SortedSet<Long> |
deleteArtifact(String artifactId)
Deletes an artifact by its unique id.
|
void |
deleteArtifactRule(String artifactId,
RuleType rule)
Deletes a single stored/configured rule for a given artifact.
|
void |
deleteArtifactRules(String artifactId)
Deletes all rules stored/configured for the artifact.
|
void |
deleteArtifactVersion(String artifactId,
long version)
Deletes a single version of a given artifact.
|
void |
deleteArtifactVersionMetaData(String artifactId,
long version)
Deletes the user-editable meta-data for a singel version of a given artifact.
|
void |
deleteGlobalRule(RuleType rule)
Deletes a single global rule.
|
void |
deleteGlobalRules()
Deletes all of the globally configured rules.
|
StoredArtifact |
getArtifact(String artifactId)
Gets the most recent version of the value of the artifact with the given ID.
|
Set<String> |
getArtifactIds(Integer limit)
Get all artifact ids.
|
ArtifactMetaDataDto |
getArtifactMetaData(long id)
Gets the stored meta-data for an artifact by global ID.
|
ArtifactMetaDataDto |
getArtifactMetaData(String artifactId)
Gets the stored meta-data for an artifact by ID.
|
ArtifactMetaDataDto |
getArtifactMetaData(String artifactId,
ContentHandle content)
Gets the metadata of the version that matches content, or 404
|
RuleConfigurationDto |
getArtifactRule(String artifactId,
RuleType rule)
Gets all of the information for a single rule configured on a given artifact.
|
List<RuleType> |
getArtifactRules(String artifactId)
Gets a list of rules configured for a specific Artifact (by ID).
|
StoredArtifact |
getArtifactVersion(long id)
Gets the most recent version of the content of the artifact with the given global ID.
|
StoredArtifact |
getArtifactVersion(String artifactId,
long version)
Gets the stored value for a single version of a given artifact.
|
ArtifactVersionMetaDataDto |
getArtifactVersionMetaData(String artifactId,
long version)
Gets the stored meta-data for a single version of an artifact.
|
SortedSet<Long> |
getArtifactVersions(String artifactId)
Gets a sorted set of all artifact versions that exist for a given artifact.
|
RuleConfigurationDto |
getGlobalRule(RuleType rule)
Gets all information about a single global rule.
|
List<RuleType> |
getGlobalRules()
Gets a list of all global rule names.
|
default boolean |
isAlive()
Is the storage alive?
|
default boolean |
isReady()
Is the storage ready?
|
ArtifactSearchResults |
searchArtifacts(String search,
int offset,
int limit,
SearchOver searchOver,
SortOrder sortOrder)
Search artifacts by given criteria
|
VersionSearchResults |
searchVersions(String artifactId,
int offset,
int limit)
Fetch the versions of the given artifact
|
CompletionStage<ArtifactMetaDataDto> |
updateArtifact(String artifactId,
ArtifactType artifactType,
ContentHandle content)
Updates the artifact value by storing the given value as a new version of the artifact.
|
void |
updateArtifactMetaData(String artifactId,
EditableArtifactMetaDataDto metaData)
Updates the stored meta-data for an artifact by ID.
|
void |
updateArtifactRule(String artifactId,
RuleType rule,
RuleConfigurationDto config)
Updates the configuration information for a single rule on a given artifact.
|
void |
updateArtifactState(String artifactId,
ArtifactState state)
Update artifact state.
|
void |
updateArtifactState(String artifactId,
ArtifactState state,
Integer version)
Update artifact state.
|
void |
updateArtifactVersionMetaData(String artifactId,
long version,
EditableArtifactMetaDataDto metaData)
Updates the user-editable meta-data for a single version of a given artifact.
|
CompletionStage<ArtifactMetaDataDto> |
updateArtifactWithMetadata(String artifactId,
ArtifactType artifactType,
ContentHandle content,
EditableArtifactMetaDataDto metaData)
Updates the artifact value by storing the given value and metadata as a new version of the artifact.
|
void |
updateGlobalRule(RuleType rule,
RuleConfigurationDto config)
Updates the configuration settings for a single global rule.
|
default boolean isReady()
By default we check if it can access list of global rules.
default boolean isAlive()
By default it's true.
void updateArtifactState(String artifactId, ArtifactState state)
artifactId
- state
- void updateArtifactState(String artifactId, ArtifactState state, Integer version)
artifactId
- state
- version
- CompletionStage<ArtifactMetaDataDto> createArtifact(String artifactId, ArtifactType artifactType, ContentHandle content) throws ArtifactAlreadyExistsException, RegistryStorageException
artifactId
- artifactType
- content
- ArtifactAlreadyExistsException
RegistryStorageException
CompletionStage<ArtifactMetaDataDto> createArtifactWithMetadata(String artifactId, ArtifactType artifactType, ContentHandle content, EditableArtifactMetaDataDto metaData) throws ArtifactAlreadyExistsException, RegistryStorageException
artifactId
- artifactType
- content
- metaData
- ArtifactAlreadyExistsException
RegistryStorageException
SortedSet<Long> deleteArtifact(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
artifactId
- ArtifactNotFoundException
RegistryStorageException
StoredArtifact getArtifact(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
artifactId
- ArtifactNotFoundException
RegistryStorageException
CompletionStage<ArtifactMetaDataDto> updateArtifact(String artifactId, ArtifactType artifactType, ContentHandle content) throws ArtifactNotFoundException, RegistryStorageException
artifactId
- artifactType
- content
- ArtifactNotFoundException
RegistryStorageException
CompletionStage<ArtifactMetaDataDto> updateArtifactWithMetadata(String artifactId, ArtifactType artifactType, ContentHandle content, EditableArtifactMetaDataDto metaData) throws ArtifactNotFoundException, RegistryStorageException
artifactId
- artifactType
- content
- metaData
- ArtifactNotFoundException
RegistryStorageException
Set<String> getArtifactIds(Integer limit)
limit
- the limit of artifactsArtifactSearchResults searchArtifacts(String search, int offset, int limit, SearchOver searchOver, SortOrder sortOrder)
search
- the text to search in the artifact metadatalimit
- the result size limitoffset
- the number of artifacts to skipsearchOver
- the fields to search oversortOrder
- the ordering usedArtifactMetaDataDto getArtifactMetaData(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
artifactId
- ArtifactNotFoundException
RegistryStorageException
ArtifactMetaDataDto getArtifactMetaData(String artifactId, ContentHandle content) throws ArtifactNotFoundException, RegistryStorageException
artifactId
- content
- ArtifactNotFoundException
RegistryStorageException
ArtifactMetaDataDto getArtifactMetaData(long id) throws ArtifactNotFoundException, RegistryStorageException
id
- ArtifactNotFoundException
RegistryStorageException
void updateArtifactMetaData(String artifactId, EditableArtifactMetaDataDto metaData) throws ArtifactNotFoundException, RegistryStorageException
artifactId
- metaData
- ArtifactNotFoundException
RegistryStorageException
List<RuleType> getArtifactRules(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
artifactId
- ArtifactNotFoundException
RegistryStorageException
default void createArtifactRule(String artifactId, RuleType rule, RuleConfigurationDto config) throws ArtifactNotFoundException, RuleAlreadyExistsException, RegistryStorageException
artifactId
- rule
- config
- ArtifactNotFoundException
RuleAlreadyExistsException
RegistryStorageException
CompletionStage<Void> createArtifactRuleAsync(String artifactId, RuleType rule, RuleConfigurationDto config) throws ArtifactNotFoundException, RuleAlreadyExistsException, RegistryStorageException
void deleteArtifactRules(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
artifactId
- ArtifactNotFoundException
RegistryStorageException
RuleConfigurationDto getArtifactRule(String artifactId, RuleType rule) throws ArtifactNotFoundException, RuleNotFoundException, RegistryStorageException
artifactId
- rule
- ArtifactNotFoundException
RuleNotFoundException
RegistryStorageException
void updateArtifactRule(String artifactId, RuleType rule, RuleConfigurationDto config) throws ArtifactNotFoundException, RuleNotFoundException, RegistryStorageException
artifactId
- rule
- config
- ArtifactNotFoundException
RuleNotFoundException
RegistryStorageException
void deleteArtifactRule(String artifactId, RuleType rule) throws ArtifactNotFoundException, RuleNotFoundException, RegistryStorageException
artifactId
- rule
- ArtifactNotFoundException
RuleNotFoundException
RegistryStorageException
SortedSet<Long> getArtifactVersions(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
artifactId
- ArtifactNotFoundException
RegistryStorageException
VersionSearchResults searchVersions(String artifactId, int offset, int limit)
artifactId
- the artifact used to fetch versionslimit
- the result size limitoffset
- the number of versions to skipStoredArtifact getArtifactVersion(long id) throws ArtifactNotFoundException, RegistryStorageException
id
- ArtifactNotFoundException
RegistryStorageException
StoredArtifact getArtifactVersion(String artifactId, long version) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
artifactId
- version
- ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
void deleteArtifactVersion(String artifactId, long version) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
artifactId
- version
- ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
ArtifactVersionMetaDataDto getArtifactVersionMetaData(String artifactId, long version) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
artifactId
- version
- ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
void updateArtifactVersionMetaData(String artifactId, long version, EditableArtifactMetaDataDto metaData) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
artifactId
- version
- metaData
- ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
void deleteArtifactVersionMetaData(String artifactId, long version) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
artifactId
- version
- ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
List<RuleType> getGlobalRules() throws RegistryStorageException
RegistryStorageException
void createGlobalRule(RuleType rule, RuleConfigurationDto config) throws RuleAlreadyExistsException, RegistryStorageException
rule
- config
- RuleAlreadyExistsException
RegistryStorageException
void deleteGlobalRules() throws RegistryStorageException
RegistryStorageException
RuleConfigurationDto getGlobalRule(RuleType rule) throws RuleNotFoundException, RegistryStorageException
rule
- RuleNotFoundException
RegistryStorageException
void updateGlobalRule(RuleType rule, RuleConfigurationDto config) throws RuleNotFoundException, RegistryStorageException
rule
- config
- RuleNotFoundException
RegistryStorageException
void deleteGlobalRule(RuleType rule) throws RuleNotFoundException, RegistryStorageException
rule
- RuleNotFoundException
RegistryStorageException
Copyright © 2020 Red Hat. All rights reserved.