Package com.soffid.iam.doc.service
Class DocumentServiceBase
- java.lang.Object
-
- com.soffid.iam.doc.service.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
see com.soffid.iam.doc.service.DocumentServicecom.soffid.iam.doc.service.DocumentService
, provides access to all services and entities referenced by this service.
-
-
Constructor Summary
Constructors Constructor Description DocumentServiceBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addSign(es.caib.signatura.api.Signature firma)
void
closeDocument()
void
createDocument(String mimeType, String externalName, String application)
void
deleteDocument(com.soffid.iam.doc.api.DocumentReference reference)
void
endDownloadTransfer()
void
endUploadTransfer()
void
exportDocuments(OutputStream out)
DocSignDao
getDocSignDao()
Gets reference todocSignDao
.DocumentEntityDao
getDocumentEntityDao()
Gets reference todocumentEntityDao
.String
getExternalName()
FileSystemDao
getFileSystemDao()
Gets reference tofileSystemDao
.String
getFsPath()
String
getMimeType()
protected Principal
getPrincipal()
Gets the currentprincipal
if one has been set, otherwise returnsnull
.com.soffid.iam.doc.api.DocumentReference
getReference()
List<es.caib.signatura.api.Signature>
getSigns()
protected abstract void
handleAddSign(es.caib.signatura.api.Signature firma)
protected abstract void
handleCloseDocument()
protected abstract void
handleCreateDocument(String mimeType, String externalName, String application)
protected abstract void
handleDeleteDocument(com.soffid.iam.doc.api.DocumentReference reference)
protected abstract void
handleEndDownloadTransfer()
protected abstract void
handleEndUploadTransfer()
protected abstract void
handleExportDocuments(OutputStream out)
protected abstract String
handleGetExternalName()
protected abstract String
handleGetFsPath()
protected abstract String
handleGetMimeType()
protected abstract com.soffid.iam.doc.api.DocumentReference
handleGetReference()
protected abstract List<es.caib.signatura.api.Signature>
handleGetSigns()
protected abstract void
handleImportDocuments(InputStream out)
protected abstract byte[]
handleNextDownloadPackage(int length)
protected abstract void
handleNextUploadPackage(byte[] filePackage, int length)
protected abstract void
handleOpenDocument(com.soffid.iam.doc.api.DocumentReference reference)
protected abstract void
handleOpenDownloadTransfer()
protected abstract void
handleOpenUploadTransfer()
void
importDocuments(InputStream out)
byte[]
nextDownloadPackage(int length)
void
nextUploadPackage(byte[] filePackage, int length)
void
openDocument(com.soffid.iam.doc.api.DocumentReference reference)
void
openDownloadTransfer()
void
openUploadTransfer()
void
setDocSignDao(DocSignDao docSignDao)
Sets reference todocSignDao
.void
setDocumentEntityDao(DocumentEntityDao documentEntityDao)
Sets reference todocumentEntityDao
.void
setFileSystemDao(FileSystemDao fileSystemDao)
Sets reference tofileSystemDao
.
-
-
-
Method Detail
-
setDocSignDao
public void setDocSignDao(DocSignDao docSignDao)
Sets reference todocSignDao
.
-
getDocSignDao
public DocSignDao getDocSignDao()
Gets reference todocSignDao
.
-
setDocumentEntityDao
public void setDocumentEntityDao(DocumentEntityDao documentEntityDao)
Sets reference todocumentEntityDao
.
-
getDocumentEntityDao
public DocumentEntityDao getDocumentEntityDao()
Gets reference todocumentEntityDao
.
-
setFileSystemDao
public void setFileSystemDao(FileSystemDao fileSystemDao)
Sets reference tofileSystemDao
.
-
getFileSystemDao
public FileSystemDao getFileSystemDao()
Gets reference tofileSystemDao
.
-
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 interfacecom.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 interfacecom.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 interfacecom.soffid.iam.doc.service.DocumentService
- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleGetExternalName
protected abstract String handleGetExternalName() throws Exception
- Throws:
Exception
-
getFsPath
@Transactional(rollbackFor=java.lang.Exception.class) public String getFsPath() throws es.caib.seycon.ng.exception.InternalErrorException
- Specified by:
getFsPath
in interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.soffid.iam.doc.service.DocumentService
- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleCreateDocument
protected abstract void handleCreateDocument(String mimeType, String externalName, String application) throws Exception
- Throws:
Exception
-
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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.soffid.iam.doc.service.DocumentService
- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleExportDocuments
protected abstract void handleExportDocuments(OutputStream out) throws Exception
- Throws:
Exception
-
importDocuments
@Transactional(isolation=DEFAULT, propagation=NEVER) public void importDocuments(InputStream out) throws es.caib.seycon.ng.exception.InternalErrorException
- Specified by:
importDocuments
in interfacecom.soffid.iam.doc.service.DocumentService
- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleImportDocuments
protected abstract void handleImportDocuments(InputStream out) throws Exception
- Throws:
Exception
-
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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 currentprincipal
if one has been set, otherwise returnsnull
.- Returns:
- the current principal
-
-