Class DocumentServiceBase

  • All Implemented Interfaces:
    com.soffid.iam.doc.service.DocumentService
    Direct Known Subclasses:
    DocumentServiceImpl

    public abstract class DocumentServiceBase
    extends Object
    implements com.soffid.iam.doc.service.DocumentService

    Spring Service base class for com.soffid.iam.doc.service.DocumentService, provides access to all services and entities referenced by this service.

    see com.soffid.iam.doc.service.DocumentService
    • Constructor Detail

      • DocumentServiceBase

        public DocumentServiceBase()
    • Method Detail

      • setDocSignDao

        public void setDocSignDao​(DocSignDao docSignDao)
        Sets reference to docSignDao.
      • getDocSignDao

        public DocSignDao getDocSignDao()
        Gets reference to docSignDao.
      • setDocumentEntityDao

        public void setDocumentEntityDao​(DocumentEntityDao documentEntityDao)
        Sets reference to documentEntityDao.
      • getDocumentEntityDao

        public DocumentEntityDao getDocumentEntityDao()
        Gets reference to documentEntityDao.
      • setFileSystemDao

        public void setFileSystemDao​(FileSystemDao fileSystemDao)
        Sets reference to fileSystemDao.
      • getFileSystemDao

        public FileSystemDao getFileSystemDao()
        Gets reference to fileSystemDao.
      • nextDownloadPackage

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       readOnly=true)
        public byte[] nextDownloadPackage​(int length)
                                   throws es.caib.seycon.ng.exception.InternalErrorException,
                                          com.soffid.iam.doc.exception.DocumentBeanException
        Specified by:
        nextDownloadPackage in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        com.soffid.iam.doc.exception.DocumentBeanException
      • handleNextDownloadPackage

        protected abstract byte[] handleNextDownloadPackage​(int length)
                                                     throws Exception
        Throws:
        Exception
      • getReference

        @Transactional(rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.doc.api.DocumentReference getReference()
                                                              throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getReference in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetReference

        protected abstract com.soffid.iam.doc.api.DocumentReference handleGetReference()
                                                                                throws Exception
        Throws:
        Exception
      • getExternalName

        @Transactional(rollbackFor=java.lang.Exception.class)
        public String getExternalName()
                               throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getExternalName in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • getFsPath

        @Transactional(rollbackFor=java.lang.Exception.class)
        public String getFsPath()
                         throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getFsPath in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • getMimeType

        @Transactional(rollbackFor=java.lang.Exception.class)
        public String getMimeType()
                           throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getMimeType in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • getSigns

        @Transactional(rollbackFor=java.lang.Exception.class)
        public List<es.caib.signatura.api.Signature> getSigns()
                                                       throws es.caib.seycon.ng.exception.InternalErrorException,
                                                              com.soffid.iam.doc.exception.NASException
        Specified by:
        getSigns in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        com.soffid.iam.doc.exception.NASException
      • handleGetSigns

        protected abstract List<es.caib.signatura.api.Signature> handleGetSigns()
                                                                         throws Exception
        Throws:
        Exception
      • addSign

        @Transactional(rollbackFor=java.lang.Exception.class)
        public void addSign​(es.caib.signatura.api.Signature firma)
                     throws es.caib.seycon.ng.exception.InternalErrorException,
                            com.soffid.iam.doc.exception.NASException
        Specified by:
        addSign in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        com.soffid.iam.doc.exception.NASException
      • handleAddSign

        protected abstract void handleAddSign​(es.caib.signatura.api.Signature firma)
                                       throws Exception
        Throws:
        Exception
      • closeDocument

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRES_NEW)
        public void closeDocument()
                           throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        closeDocument in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleCloseDocument

        protected abstract void handleCloseDocument()
                                             throws Exception
        Throws:
        Exception
      • createDocument

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRES_NEW)
        public void createDocument​(String mimeType,
                                   String externalName,
                                   String application)
                            throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        createDocument in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • deleteDocument

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRES_NEW,
                       noRollbackFor={es.caib.seycon.ng.exception.InternalErrorException.class,com.soffid.iam.doc.exception.DocumentBeanException.class})
        public void deleteDocument​(com.soffid.iam.doc.api.DocumentReference reference)
                            throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        deleteDocument in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleDeleteDocument

        protected abstract void handleDeleteDocument​(com.soffid.iam.doc.api.DocumentReference reference)
                                              throws Exception
        Throws:
        Exception
      • endDownloadTransfer

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       readOnly=true)
        public void endDownloadTransfer()
                                 throws es.caib.seycon.ng.exception.InternalErrorException,
                                        com.soffid.iam.doc.exception.DocumentBeanException
        Specified by:
        endDownloadTransfer in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        com.soffid.iam.doc.exception.DocumentBeanException
      • handleEndDownloadTransfer

        protected abstract void handleEndDownloadTransfer()
                                                   throws Exception
        Throws:
        Exception
      • endUploadTransfer

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRES_NEW)
        public void endUploadTransfer()
                               throws es.caib.seycon.ng.exception.InternalErrorException,
                                      com.soffid.iam.doc.exception.DocumentBeanException
        Specified by:
        endUploadTransfer in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        com.soffid.iam.doc.exception.DocumentBeanException
      • handleEndUploadTransfer

        protected abstract void handleEndUploadTransfer()
                                                 throws Exception
        Throws:
        Exception
      • exportDocuments

        @Transactional(isolation=DEFAULT,
                       propagation=NEVER,
                       readOnly=true)
        public void exportDocuments​(OutputStream out)
                             throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        exportDocuments in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • importDocuments

        @Transactional(isolation=DEFAULT,
                       propagation=NEVER)
        public void importDocuments​(InputStream out)
                             throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        importDocuments in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • nextUploadPackage

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRES_NEW)
        public void nextUploadPackage​(byte[] filePackage,
                                      int length)
                               throws es.caib.seycon.ng.exception.InternalErrorException,
                                      com.soffid.iam.doc.exception.DocumentBeanException
        Specified by:
        nextUploadPackage in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        com.soffid.iam.doc.exception.DocumentBeanException
      • handleNextUploadPackage

        protected abstract void handleNextUploadPackage​(byte[] filePackage,
                                                        int length)
                                                 throws Exception
        Throws:
        Exception
      • openDocument

        @Transactional(rollbackFor=java.lang.Exception.class)
        public void openDocument​(com.soffid.iam.doc.api.DocumentReference reference)
                          throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        openDocument in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleOpenDocument

        protected abstract void handleOpenDocument​(com.soffid.iam.doc.api.DocumentReference reference)
                                            throws Exception
        Throws:
        Exception
      • openDownloadTransfer

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       readOnly=true)
        public void openDownloadTransfer()
                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                         com.soffid.iam.doc.exception.DocumentBeanException
        Specified by:
        openDownloadTransfer in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        com.soffid.iam.doc.exception.DocumentBeanException
      • handleOpenDownloadTransfer

        protected abstract void handleOpenDownloadTransfer()
                                                    throws Exception
        Throws:
        Exception
      • openUploadTransfer

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRES_NEW)
        public void openUploadTransfer()
                                throws es.caib.seycon.ng.exception.InternalErrorException,
                                       com.soffid.iam.doc.exception.DocumentBeanException
        Specified by:
        openUploadTransfer in interface com.soffid.iam.doc.service.DocumentService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        com.soffid.iam.doc.exception.DocumentBeanException
      • handleOpenUploadTransfer

        protected abstract void handleOpenUploadTransfer()
                                                  throws Exception
        Throws:
        Exception
      • getPrincipal

        protected Principal getPrincipal()
        Gets the current principal if one has been set, otherwise returns null.
        Returns:
        the current principal