Class PutDataSetService

  • All Implemented Interfaces:
    ch.systemsx.cisd.openbis.dss.generic.shared.IPutDataSetService

    public class PutDataSetService
    extends java.lang.Object
    implements ch.systemsx.cisd.openbis.dss.generic.shared.IPutDataSetService
    Helper class that maintains the state for handling put requests. The requests themselves are serviced by the PutDataSetExecutor.
    • Constructor Summary

      Constructors 
      Constructor Description
      PutDataSetService​(ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService openBisService, org.apache.log4j.Logger operationLog)
      The designated constructor.
      PutDataSetService​(ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService openBisService, org.apache.log4j.Logger operationLog, java.io.File store, ch.systemsx.cisd.etlserver.api.v1.DataSetTypeToRegistratorMapper map, IMailClient mail, java.lang.String dsCode, ch.systemsx.cisd.etlserver.validation.IDataSetValidator validator)
      A constructor for testing purposes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cleanupSession​(java.lang.String sessionToken)  
      java.io.File createTemporaryIncomingDir​(java.lang.String dataSetTypeCodeOrNull)  
      java.lang.String getShareId​(java.lang.String dataSetTypeOrNull)  
      java.io.File getStoreRootDirectory()  
      java.io.File getTemporaryIncomingRoot​(java.lang.String dataSetTypeCodeOrNull)  
      java.lang.String getValidationScript​(java.lang.String dataSetTypeOrNull)
      Return the validation script for the new data set, or null if none if applicable.
      java.lang.String putDataSet​(java.lang.String sessionToken, NewDataSetDTO newDataSet, java.io.InputStream inputStream)  
      java.util.List<ch.systemsx.cisd.openbis.dss.generic.shared.dto.DataSetInformation> putDataSet​(java.lang.String sessionToken, NewDataSetDTO newDataSet, java.lang.String uploadId)  
      java.lang.String putDataSet​(java.lang.String sessionToken, java.lang.String dropboxName, ch.systemsx.cisd.openbis.generic.shared.basic.dto.CustomImportFile customImportFile)  
      void putFileToStoreShare​(java.lang.String sessionToken, java.lang.String folderPathOrNull, java.lang.String filePath, java.lang.String dataSetType, java.lang.String uploadId, java.io.InputStream inputStream)  
      void setStoreDirectory​(java.io.File storeDirectory)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PutDataSetService

        public PutDataSetService​(ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService openBisService,
                                 org.apache.log4j.Logger operationLog)
        The designated constructor.
        Parameters:
        openBisService -
        operationLog -
      • PutDataSetService

        public PutDataSetService​(ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService openBisService,
                                 org.apache.log4j.Logger operationLog,
                                 java.io.File store,
                                 ch.systemsx.cisd.etlserver.api.v1.DataSetTypeToRegistratorMapper map,
                                 IMailClient mail,
                                 java.lang.String dsCode,
                                 ch.systemsx.cisd.etlserver.validation.IDataSetValidator validator)
        A constructor for testing purposes. Not useful outside of testing.
        Parameters:
        openBisService -
        operationLog -
        store -
        map -
        mail -
        dsCode -
    • Method Detail

      • putDataSet

        public java.lang.String putDataSet​(java.lang.String sessionToken,
                                           java.lang.String dropboxName,
                                           ch.systemsx.cisd.openbis.generic.shared.basic.dto.CustomImportFile customImportFile)
      • putDataSet

        public java.lang.String putDataSet​(java.lang.String sessionToken,
                                           NewDataSetDTO newDataSet,
                                           java.io.InputStream inputStream)
                                    throws IOExceptionUnchecked,
                                           java.lang.IllegalArgumentException
        Throws:
        IOExceptionUnchecked
        java.lang.IllegalArgumentException
      • putDataSet

        public java.util.List<ch.systemsx.cisd.openbis.dss.generic.shared.dto.DataSetInformation> putDataSet​(java.lang.String sessionToken,
                                                                                                             NewDataSetDTO newDataSet,
                                                                                                             java.lang.String uploadId)
                                                                                                      throws IOExceptionUnchecked,
                                                                                                             java.lang.IllegalArgumentException
        Throws:
        IOExceptionUnchecked
        java.lang.IllegalArgumentException
      • putFileToStoreShare

        public void putFileToStoreShare​(java.lang.String sessionToken,
                                        java.lang.String folderPathOrNull,
                                        java.lang.String filePath,
                                        java.lang.String dataSetType,
                                        java.lang.String uploadId,
                                        java.io.InputStream inputStream)
      • getValidationScript

        public java.lang.String getValidationScript​(java.lang.String dataSetTypeOrNull)
        Return the validation script for the new data set, or null if none if applicable.
      • getShareId

        public java.lang.String getShareId​(java.lang.String dataSetTypeOrNull)
      • getStoreRootDirectory

        public java.io.File getStoreRootDirectory()
      • setStoreDirectory

        public void setStoreDirectory​(java.io.File storeDirectory)
      • createTemporaryIncomingDir

        public java.io.File createTemporaryIncomingDir​(java.lang.String dataSetTypeCodeOrNull)
      • getTemporaryIncomingRoot

        public java.io.File getTemporaryIncomingRoot​(java.lang.String dataSetTypeCodeOrNull)
      • cleanupSession

        public void cleanupSession​(java.lang.String sessionToken)