|Knowledge base: Apia | Language: English | History ||
[ ABR00047 ] Obtener documentos por API Java
SummaryThe method 'getDocument()' of the class 'Attribute' of the Java API returns an object 'DocumentVo', internal to Apia, with which the internal changes in Apia can affect classes which use this method.
It is applied to
This problem is solved by creating a new method which returns an object 'Document', which is not affected by internal changes in Apia as it occurred with "DocumentVo".
The correct way of using the API is described next:
In order to obtain the object 'Document':
Document doc = this.getCurrentEntity().getAttribute("S1").getDocumentValue();
In order to download it to Apia's temporal folder respecting its name and the extension:
String path = doc.download(true);
In order to download it to the temporal folder just as it is stored in the system of files:
String path = d.download();