Class ArtifactManagingServiceImpl
java.lang.Object
org.exoplatform.services.jcr.ext.artifact.ArtifactManagingServiceImpl
- All Implemented Interfaces:
ArtifactManagingService,org.picocontainer.Startable
public class ArtifactManagingServiceImpl
extends Object
implements ArtifactManagingService, org.picocontainer.Startable
Created by The eXo Platform SAS .
Service responsible for Administration Maven repository the served JCR structure inside workspaceName is: rootPath (maven-root)/ ---part-of-group-folder1/ (nt:folder + exo:groupId) ---part-of-group-foldern/ ------artifact-root-folder/(nt:folder + exo:artifactId) ---------maven-metadata.xml(nt:file) ---------maven-metadata.xml.sha1(nt:file) ---------artifact-version-folder/(nt:folder + exo:versionId) ------------artifactId-version.jar (nt:file + exo:mavenjar / nt:resource) ------------artifactId-version.jar.sha1 (nt:file + exo:mavensha1 / nt:resource ) ------------artifactId-version.pom (nt:file + exo:mavenpom / nt:resource) ------------artifactId-version.pom.sha1 (nt:file + exo:mavensha1/ (nt:resource) ------------maven-metadata.xml (nt:file +exo:mavenmetadata / (nt:resource ) ------------maven-metadata.xml.sha1(nt:file + exo:mavensha1 / (nt:resource)
Service responsible for Administration Maven repository the served JCR structure inside workspaceName is: rootPath (maven-root)/ ---part-of-group-folder1/ (nt:folder + exo:groupId) ---part-of-group-foldern/ ------artifact-root-folder/(nt:folder + exo:artifactId) ---------maven-metadata.xml(nt:file) ---------maven-metadata.xml.sha1(nt:file) ---------artifact-version-folder/(nt:folder + exo:versionId) ------------artifactId-version.jar (nt:file + exo:mavenjar / nt:resource) ------------artifactId-version.jar.sha1 (nt:file + exo:mavensha1 / nt:resource ) ------------artifactId-version.pom (nt:file + exo:mavenpom / nt:resource) ------------artifactId-version.pom.sha1 (nt:file + exo:mavensha1/ (nt:resource) ------------maven-metadata.xml (nt:file +exo:mavenmetadata / (nt:resource ) ------------maven-metadata.xml.sha1(nt:file + exo:mavensha1 / (nt:resource)
- Version:
- $Id: $
- Author:
- Gennady Azarenkov, Volodymyr Krasnikov
-
Constructor Summary
ConstructorsConstructorDescriptionArtifactManagingServiceImpl(org.exoplatform.container.xml.InitParams params, org.exoplatform.services.jcr.RepositoryService repositoryService) without registry serviceArtifactManagingServiceImpl(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.jcr.ext.registry.RegistryService registryService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArtifact(org.exoplatform.services.jcr.ext.common.SessionProvider sp, ArtifactDescriptor artifact, InputStream jarIStream, InputStream pomIStream) adds (deploys) artifact including creating necessary group folders, pom and checksum filesvoidchangePermission(org.exoplatform.services.jcr.ext.common.SessionProvider sp, Descriptor artifact, String identity, String[] permissions, boolean delete) Changes acess permissions for the specified artifact ang given identityprotected Fileprotected FilecreateSingleMetadata(String groupId, String artifactId, String version) voidexportArtifacts(org.exoplatform.services.jcr.ext.common.SessionProvider sp, FolderDescriptor parentFolder, File destFolder) voidexportArtifacts(org.exoplatform.services.jcr.ext.common.SessionProvider sp, FolderDescriptor parentFolder, OutputStream out) exports list of artifacts from maven repo into output streamgetDescriptors(org.exoplatform.services.jcr.ext.common.SessionProvider sp, FolderDescriptor parentFolder) getPermission(org.exoplatform.services.jcr.ext.common.SessionProvider sp, Descriptor artifact) Returns acess control list for the specified artifactvoidimportArtifacts(org.exoplatform.services.jcr.ext.common.SessionProvider sp, File folder) voidimportArtifacts(org.exoplatform.services.jcr.ext.common.SessionProvider sp, InputStream in) imports list of artifacts into maven repovoidremoveArtifact(org.exoplatform.services.jcr.ext.common.SessionProvider sp, Descriptor artifact) removes artifactsearchArtifacts(org.exoplatform.services.jcr.ext.common.SessionProvider sp, SearchCriteria criteria) voidstart()voidstop()
-
Constructor Details
-
ArtifactManagingServiceImpl
public ArtifactManagingServiceImpl(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.jcr.ext.registry.RegistryService registryService) throws org.exoplatform.services.jcr.config.RepositoryConfigurationException - Parameters:
initParams-repositoryService-registryService-- Throws:
org.exoplatform.services.jcr.config.RepositoryConfigurationException
-
ArtifactManagingServiceImpl
public ArtifactManagingServiceImpl(org.exoplatform.container.xml.InitParams params, org.exoplatform.services.jcr.RepositoryService repositoryService) throws org.exoplatform.services.jcr.config.RepositoryConfigurationException without registry service- Parameters:
params-repositoryService-- Throws:
org.exoplatform.services.jcr.config.RepositoryConfigurationException
-
-
Method Details
-
addArtifact
public void addArtifact(org.exoplatform.services.jcr.ext.common.SessionProvider sp, ArtifactDescriptor artifact, InputStream jarIStream, InputStream pomIStream) throws javax.jcr.RepositoryException Description copied from interface:ArtifactManagingServiceadds (deploys) artifact including creating necessary group folders, pom and checksum files- Specified by:
addArtifactin interfaceArtifactManagingService- Parameters:
sp- the session providerartifact- descriptorjarIStream-pomIStream-- Throws:
javax.jcr.RepositoryException
-
exportArtifacts
public void exportArtifacts(org.exoplatform.services.jcr.ext.common.SessionProvider sp, FolderDescriptor parentFolder, OutputStream out) throws javax.jcr.RepositoryException, FileNotFoundException Description copied from interface:ArtifactManagingServiceexports list of artifacts from maven repo into output stream- Specified by:
exportArtifactsin interfaceArtifactManagingService- Parameters:
sp- the session providerparentFolder- the folder which children we need to getout- output stream to export to- Throws:
javax.jcr.RepositoryExceptionFileNotFoundException
-
exportArtifacts
public void exportArtifacts(org.exoplatform.services.jcr.ext.common.SessionProvider sp, FolderDescriptor parentFolder, File destFolder) throws javax.jcr.RepositoryException, FileNotFoundException - Specified by:
exportArtifactsin interfaceArtifactManagingService- Parameters:
sp-parentFolder-destFolder-- Throws:
javax.jcr.RepositoryExceptionFileNotFoundException
-
getDescriptors
public List<Descriptor> getDescriptors(org.exoplatform.services.jcr.ext.common.SessionProvider sp, FolderDescriptor parentFolder) throws javax.jcr.RepositoryException - Specified by:
getDescriptorsin interfaceArtifactManagingService- Parameters:
sp- the session providerparentFolder- the folder which children we need to get- Returns:
- list of child descriptors
- Throws:
javax.jcr.RepositoryException
-
importArtifacts
public void importArtifacts(org.exoplatform.services.jcr.ext.common.SessionProvider sp, InputStream in) throws javax.jcr.RepositoryException, FileNotFoundException Description copied from interface:ArtifactManagingServiceimports list of artifacts into maven repo- Specified by:
importArtifactsin interfaceArtifactManagingService- Parameters:
sp- the session providerin- input stream which contains artifact related files- Throws:
javax.jcr.RepositoryExceptionFileNotFoundException
-
importArtifacts
public void importArtifacts(org.exoplatform.services.jcr.ext.common.SessionProvider sp, File folder) throws javax.jcr.RepositoryException, FileNotFoundException - Specified by:
importArtifactsin interfaceArtifactManagingService- Parameters:
sp- - Session providerfolder-- Throws:
javax.jcr.RepositoryExceptionFileNotFoundException
-
removeArtifact
public void removeArtifact(org.exoplatform.services.jcr.ext.common.SessionProvider sp, Descriptor artifact) throws javax.jcr.RepositoryException Description copied from interface:ArtifactManagingServiceremoves artifact- Specified by:
removeArtifactin interfaceArtifactManagingService- Parameters:
sp- the session providerartifact- descriptor- Throws:
javax.jcr.RepositoryException
-
getPermission
public List getPermission(org.exoplatform.services.jcr.ext.common.SessionProvider sp, Descriptor artifact) throws javax.jcr.RepositoryException Description copied from interface:ArtifactManagingServiceReturns acess control list for the specified artifact- Specified by:
getPermissionin interfaceArtifactManagingService- Parameters:
sp- the session providerartifact- the artifact which ACL we need to get- Throws:
javax.jcr.RepositoryException
-
changePermission
public void changePermission(org.exoplatform.services.jcr.ext.common.SessionProvider sp, Descriptor artifact, String identity, String[] permissions, boolean delete) throws javax.jcr.RepositoryException Description copied from interface:ArtifactManagingServiceChanges acess permissions for the specified artifact ang given identity- Specified by:
changePermissionin interfaceArtifactManagingService- Parameters:
sp- the session providerartifact- the artifact which will be changedidentity- identity for addin/removing permissionspermissions- array of permissions to set/removedelete-- Throws:
javax.jcr.RepositoryException
-
searchArtifacts
public List<Descriptor> searchArtifacts(org.exoplatform.services.jcr.ext.common.SessionProvider sp, SearchCriteria criteria) throws javax.jcr.RepositoryException - Specified by:
searchArtifactsin interfaceArtifactManagingService- Parameters:
sp- the session providercriteria- for search- Returns:
- list of descriptors
- Throws:
javax.jcr.RepositoryException
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-
createSingleMetadata
protected File createSingleMetadata(String groupId, String artifactId, String version) throws FileNotFoundException - Throws:
FileNotFoundException
-
createMultiMetadata
protected File createMultiMetadata(String groupId, String artifactId, String current_version, List<String> v_list) throws FileNotFoundException - Throws:
FileNotFoundException
-
getListErrors
- Specified by:
getListErrorsin interfaceArtifactManagingService
-