org.apache.archiva.web.api
Class DefaultFileUploadService

java.lang.Object
  extended by org.apache.archiva.rest.services.AbstractRestService
      extended by org.apache.archiva.web.api.DefaultFileUploadService
All Implemented Interfaces:
FileUploadService

@Service(value="fileUploadService#rest")
public class DefaultFileUploadService
extends org.apache.archiva.rest.services.AbstractRestService
implements FileUploadService

Author:
Olivier Lamy

Field Summary
 
Fields inherited from class org.apache.archiva.rest.services.AbstractRestService
config, repositoryContentFactory, repositorySessionFactory, repositoryTaskScheduler, userRepositories
 
Fields inherited from interface org.apache.archiva.web.api.FileUploadService
FILES_SESSION_KEY
 
Constructor Summary
DefaultFileUploadService()
           
 
Method Summary
 Boolean clearUploadedFiles()
           
 Boolean deleteFile(String fileName)
           
 List<FileMetadata> getSessionFileMetadatas()
           
protected  List<FileMetadata> getSessionFilesList()
          FIXME must be per session synchronized not globally
 FileMetadata post(org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipartBody)
           
 Boolean save(String repositoryId, String groupId, String artifactId, String version, String packaging, boolean generatePom)
           
protected  void saveFile(String repositoryId, FileMetadata fileMetadata, boolean generatePom, String groupId, String artifactId, String version, String packaging)
           
protected  void savePomFile(String repositoryId, FileMetadata fileMetadata, String groupId, String artifactId, String version, String packaging)
           
 
Methods inherited from class org.apache.archiva.rest.services.AbstractRestService
buildArtifacts, doScanRepository, getArtifactUrl, getAuditInformation, getAuditListeners, getBaseUrl, getBeansOfType, getModelMapper, getObservableRepos, getPrincipal, setAuditListeners, triggerAuditEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFileUploadService

public DefaultFileUploadService()
Method Detail

post

public FileMetadata post(org.apache.cxf.jaxrs.ext.multipart.MultipartBody multipartBody)
                  throws ArchivaRestServiceException
Specified by:
post in interface FileUploadService
Throws:
ArchivaRestServiceException

getSessionFilesList

protected List<FileMetadata> getSessionFilesList()
FIXME must be per session synchronized not globally

Returns:

deleteFile

public Boolean deleteFile(String fileName)
                   throws ArchivaRestServiceException
Specified by:
deleteFile in interface FileUploadService
Throws:
ArchivaRestServiceException

clearUploadedFiles

public Boolean clearUploadedFiles()
                           throws ArchivaRestServiceException
Specified by:
clearUploadedFiles in interface FileUploadService
Throws:
ArchivaRestServiceException

getSessionFileMetadatas

public List<FileMetadata> getSessionFileMetadatas()
                                           throws ArchivaRestServiceException
Specified by:
getSessionFileMetadatas in interface FileUploadService
Throws:
ArchivaRestServiceException

save

public Boolean save(String repositoryId,
                    String groupId,
                    String artifactId,
                    String version,
                    String packaging,
                    boolean generatePom)
             throws ArchivaRestServiceException
Specified by:
save in interface FileUploadService
Throws:
ArchivaRestServiceException

savePomFile

protected void savePomFile(String repositoryId,
                           FileMetadata fileMetadata,
                           String groupId,
                           String artifactId,
                           String version,
                           String packaging)
                    throws ArchivaRestServiceException
Throws:
ArchivaRestServiceException

saveFile

protected void saveFile(String repositoryId,
                        FileMetadata fileMetadata,
                        boolean generatePom,
                        String groupId,
                        String artifactId,
                        String version,
                        String packaging)
                 throws ArchivaRestServiceException
Throws:
ArchivaRestServiceException


Copyright © 2006–2014 The Apache Software Foundation. All rights reserved.