public class Calculator
extends java.lang.Object
Constructor and Description |
---|
Calculator(DioUzorkaZahtjevaVO ldu,
org.apache.poi.ss.usermodel.Workbook templateWorkbook,
java.security.Principal principal)
Initialize global variables
|
Modifier and Type | Method and Description |
---|---|
void |
dumpCalculator(java.lang.String fileName,
java.lang.String fileExtension,
java.util.List<java.lang.Integer> lazIds,
KorisnikProgramaVO korisnik)
Method which dumps workbook and adds it as attachment to changed APU
|
void |
evaluateCalculator()
Method which evaluates only pre-determined cells in workbook.
|
void |
formatResults()
Method which scans algorithm sheet for calculated values.
|
void |
generateAdditionalSheets()
Method which generates additional sheets of workbook.
|
void |
loadAlgorithm(java.lang.String source)
Method which loads workbook from file.
|
java.util.List<java.lang.Integer> |
saveResults(long gazId,
long korId)
Method which saves new calculated values into database.
|
void |
styleSheets()
Method which styles sheet of workbook.
|
void |
updateAlgorithmSheet()
Method which updates algorithm sheet.
|
void |
updateAPUSheet()
Method which updates all APU sheets which workbook contains.
|
void |
updateExaminationSheet()
Method which updates sheet with examinationSheet with APU information.
|
public Calculator(DioUzorkaZahtjevaVO ldu, org.apache.poi.ss.usermodel.Workbook templateWorkbook, java.security.Principal principal) throws java.io.FileNotFoundException, java.io.IOException
ldu
- part of sample objecttemplateWorkbook
- principal
- java.io.FileNotFoundException
java.io.IOException
public void loadAlgorithm(java.lang.String source) throws java.io.IOException
source
- location of file.java.io.IOException
public void dumpCalculator(java.lang.String fileName, java.lang.String fileExtension, java.util.List<java.lang.Integer> lazIds, KorisnikProgramaVO korisnik) throws java.io.IOException
fileName
- - chosen name for filefileExtension
- - extension is usually xlsxlazIds
- - APU IDs in the workbookkorisnik
- - userjava.io.IOException
public void evaluateCalculator()
KalkulatorException
public void generateAdditionalSheets() throws javax.ejb.FinderException
javax.ejb.FinderException
public void updateAlgorithmSheet()
public void updateExaminationSheet()
ldu
- reference to LDU which contains reference to collection of LAZ.InternaPogreskaException
public void updateAPUSheet()
zahtjev
- reference to zahtjev/work order.public void formatResults()
public void styleSheets() throws java.io.IOException
java.io.IOException
public java.util.List<java.lang.Integer> saveResults(long gazId, long korId)
gazId
- ID for group of analyseskorId
- user ID