@Service public final class DocumentServiceImpl extends Object implements DocumentService
| Constructor and Description |
|---|
DocumentServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDocumentContent(Document document,
String clientFileName,
String contentType,
byte[] content)
Manage attached file data as image and image thumbnail if possible.
|
void |
createTypeDocument(TypeDocument typeDocument)
Create a document type
|
void |
deleteTypeDocument(TypeDocument typeDocument)
Delete a document type
|
List<String> |
listDocumentContrainteLegales()
Liste les programmes des organismes déjà saisis
|
List<String> |
listDocumentEditeurs()
Editeurs already registered into documents.
|
List<TypeDocument> |
listTypeDocuments()
List the document types available
|
TypeDocument |
loadTypeDocument(Integer idTypeDocument)
Load a document type
|
TypeDocument |
loadTypeDocument(String nom)
Charger a document type
|
void |
updateDocumentAttachable(DocumentAttachable documentAttachable)
Modify a document attachable
|
boolean |
updateOrdeleteDocumentEnabled(Document document,
Utilisateur utilisateur)
Détermine si un utilisateur peut modifier ou supprimer un document.
|
void |
updateTypeDocument(TypeDocument typeDocument)
Modify a document type
|
public List<TypeDocument> listTypeDocuments()
listTypeDocuments in interface DocumentServicepublic void createTypeDocument(TypeDocument typeDocument) throws DataConstraintException
createTypeDocument in interface DocumentServicetypeDocument - The document type to createDataConstraintException - If the document type already exists (unique constraints)public TypeDocument loadTypeDocument(Integer idTypeDocument) throws DataNotFoundException
loadTypeDocument in interface DocumentServiceidTypeDocument - IDDataNotFoundException - If not foundpublic TypeDocument loadTypeDocument(String nom) throws DataNotFoundException
loadTypeDocument in interface DocumentServicenom - The document type nameDataNotFoundException - If not foundpublic void updateTypeDocument(TypeDocument typeDocument) throws DataConstraintException
updateTypeDocument in interface DocumentServicetypeDocument - The document type to modifyDataConstraintException - If an unique constraint is broken with another document typepublic void deleteTypeDocument(TypeDocument typeDocument) throws DataConstraintException
deleteTypeDocument in interface DocumentServicetypeDocument - The document type to deleteDataConstraintException - If the document type has linked datapublic void updateDocumentAttachable(DocumentAttachable documentAttachable) throws DataConstraintException
updateDocumentAttachable in interface DocumentServicedocumentAttachable - The document attachable to modifyDataConstraintException - If an unique constraint is broken with another documentpublic List<String> listDocumentEditeurs()
listDocumentEditeurs in interface DocumentServicepublic List<String> listDocumentContrainteLegales()
listDocumentContrainteLegales in interface DocumentServicepublic void addDocumentContent(Document document, String clientFileName, String contentType, byte[] content) throws InvalidFileExtensionException
addDocumentContent in interface DocumentServicedocument - current documentclientFileName - file namecontentType - content typecontent - content dataInvalidFileExtensionException - when file name extension is not validpublic boolean updateOrdeleteDocumentEnabled(Document document, Utilisateur utilisateur)
updateOrdeleteDocumentEnabled in interface DocumentServicedocument - Documentutilisateur - UtilisateurCopyright © 2009–2014 IRD. All rights reserved.