@DeclareRoles(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) @RolesAllowed(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) public class ReportService extends Object
| Constructor and Description |
|---|
ReportService() |
| Modifier and Type | Method and Description |
|---|---|
static Calendar |
computeDynamicDate(String xmlDate)
This method parses a
|
static String |
customNumberFormat(String pattern,
String locale,
double value)
This method converts a double value into a custom number format including an
optional locale.
|
List<ItemCollection> |
findAllReports()
Returns a list of all reports sorted by name.
|
ItemCollection |
findReport(String reportID)
Returns a Report Entity by its identifier.
|
List<ItemCollection> |
getDataSource(ItemCollection reportEntity,
int pageSize,
int pageIndex,
String sortBy,
boolean sortReverse,
Map<String,String> params)
Returns the data source defined by a report.
|
static String |
replaceDateString(String content)
This method replaces all occurrences of tags with the corresponding
dynamic date.
|
FileData |
transformDataSource(ItemCollection report,
List<ItemCollection> data,
String fileName)
Transforms a datasource based on the XSL template from a report into a
FileData object.
|
void |
updateReport(ItemCollection aReport)
updates a Entity Report Object.
|
public ItemCollection findReport(String reportID)
reportID - - name of the report or its $uniqueId.public List<ItemCollection> findAllReports()
public void updateReport(ItemCollection aReport) throws AccessDeniedException
report - InvalidItemValueExceptionAccessDeniedExceptionpublic List<ItemCollection> getDataSource(ItemCollection reportEntity, int pageSize, int pageIndex, String sortBy, boolean sortReverse, Map<String,String> params) throws QueryException
The method executes the JQPL statement of a Report Entity. The values of the returned entities will be cloned and formated in case a itemList is provided.
The method parses the attribute txtname for a formating expression to format the item value. E.g.:
datDate<format locale="de" label="Date">yy-dd-mm</format>
reportName - - name of the report to be executedstartPos - - optional start position to query entitiesmaxcount - - optional max count of entities to queryparams - - optional parameter list to be mapped to the JQPL
statementitemList - - optional attribute list of items to be returnedQueryExceptionpublic FileData transformDataSource(ItemCollection report, List<ItemCollection> data, String fileName) throws JAXBException, TransformerException, IOException
report - - the report definitiondata - - the data sourcefileName - JAXBExceptionTransformerExceptionIOExceptionpublic static Calendar computeDynamicDate(String xmlDate)
e.g.
results in 1. February of the current year
results in 30.November of current year
xmlDate - public static String replaceDateString(String content)
content - public static String customNumberFormat(String pattern, String locale, double value)
"###,###.###", "en_UK", 123456.789
"EUR #,###,##0.00", "de_DE", 1456.781
pattern - value - Copyright © 2006–2019 Imixs Software Solutions GmbH. All rights reserved.