Package org.bonitasoft.engine.dependency
Interface DependencyService
- All Known Implementing Classes:
AbstractDependencyService,PlatformDependencyService,TenantDependencyService
public interface DependencyService
- Since:
- 6.0
- Author:
- Matthieu Chaffotte, Celine Souchet
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateMappedDependency(String name, byte[] jarContent, String fileName, long artifactId, ScopeType scopeType) voiddeleteDependencies(long id, ScopeType type) voiddeleteDependency(String name) Delete the dependency specified by namevoiddeleteDependency(AbstractSDependency dependency) Delete the specific dependencygetDependencies(Collection<Long> ids) Get dependencies for the specified idsgetDependenciesResources(ScopeType type, long id) getDependency(long id) Get dependency by its idgetDependencyContentOnly(long id) Get only the content and file name of a dependency.getDependencyIds(long artifactId, ScopeType artifactType, int startIndex, int maxResult) Get all dependency ids for specific artifactgetDependencyMappings(QueryOptions queryOptions) Get all dependencyMappings for specific the queryOptionsgetDependencyOfArtifact(long artifactId, ScopeType artifactType, String fileName) updateDependencyOfArtifact(String name, byte[] jarContent, String fileName, long artifactId, ScopeType scopeType)
-
Field Details
-
DEPENDENCY
- See Also:
-
DEPENDENCYMAPPING
- See Also:
-
-
Method Details
-
deleteDependency
Delete the specific dependency- Parameters:
dependency- The dependency will be deleted- Throws:
SDependencyNotFoundException- Error thrown if the dependency not found.SDependencyDeletionException- Error thrown if has exception during the dependency deletion.SDependencyException
-
deleteDependency
Delete the dependency specified by name- Parameters:
name-- Throws:
SDependencyNotFoundException- Error thrown if no dependency have a name corresponding to the parameter.SDependencyDeletionException- Error thrown if has exception during the dependency deletion.SDependencyException
-
getDependency
Get dependency by its id- Parameters:
id- Identifier of dependency- Returns:
- Throws:
SDependencyNotFoundException- Error thrown if no dependency have an id corresponding to the parameter.
-
getDependencyContentOnly
DependencyContent getDependencyContentOnly(long id) throws SDependencyNotFoundException, SBonitaReadException Get only the content and file name of a dependency. This object will not be connected to the hibernate session and therefore will avoid issues related to dirty checking mechanism, see https://bonitasoft.atlassian.net/browse/BS-19262- Parameters:
id- of the dependency- Returns:
- an object containing the file content and name
- Throws:
SDependencyNotFoundExceptionSBonitaReadException
-
getDependencies
Get dependencies for the specified ids- Parameters:
ids- Identifiers of dependencies- Returns:
- a list of SDependency object
- Throws:
SDependencyException
-
getDependencyMappings
List<SDependencyMapping> getDependencyMappings(QueryOptions queryOptions) throws SDependencyException Get all dependencyMappings for specific the queryOptions- Parameters:
queryOptions- QueryOptions object, it contains some query conditions.- Returns:
- a list of SDependencyMapping objects
- Throws:
SDependencyException
-
getDependenciesResources
Stream<BonitaResource> getDependenciesResources(ScopeType type, long id) throws SDependencyException - Throws:
SDependencyException
-
getDependencyIds
List<Long> getDependencyIds(long artifactId, ScopeType artifactType, int startIndex, int maxResult) throws SDependencyException Get all dependency ids for specific artifact- Parameters:
artifactId- Identifier of artifactartifactType- Type of artifactstartIndex-maxResult-- Returns:
- a list of Long objects
- Throws:
SDependencyException
-
deleteDependencies
- Parameters:
id-type-- Throws:
SDependencyException
-
createMappedDependency
AbstractSDependency createMappedDependency(String name, byte[] jarContent, String fileName, long artifactId, ScopeType scopeType) throws SDependencyException - Throws:
SDependencyException
-
updateDependencyOfArtifact
AbstractSDependency updateDependencyOfArtifact(String name, byte[] jarContent, String fileName, long artifactId, ScopeType scopeType) throws SDependencyException - Throws:
SDependencyException
-
getDependencyOfArtifact
AbstractSDependency getDependencyOfArtifact(long artifactId, ScopeType artifactType, String fileName) throws SBonitaReadException - Throws:
SBonitaReadException
-