Class CommonUtil
- java.lang.Object
-
- org.wso2.carbon.reporting.core.utils.CommonUtil
-
public class CommonUtil extends Object
used to include common utility functions
-
-
Constructor Summary
Constructors Constructor Description CommonUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addJrxmlConfigs(org.wso2.carbon.registry.core.Registry systemRegistry)
static void
deleteReportTemplate(String templateName, org.wso2.carbon.registry.core.Registry registry)
static List<String>
getAllReports(org.wso2.carbon.registry.core.Registry registry)
static String
getJRXMLFileContent(String componentName, String reportTemplate, org.wso2.carbon.registry.core.Registry registry)
static String
getReportResources(String componentName, String reportTemplate, org.wso2.carbon.registry.core.Registry registry)
static boolean
updateReport(String fileName, String fileContent, org.wso2.carbon.registry.core.Registry registry)
-
-
-
Method Detail
-
deleteReportTemplate
public static void deleteReportTemplate(String templateName, org.wso2.carbon.registry.core.Registry registry) throws org.wso2.carbon.reporting.api.ReportingException
- Parameters:
templateName
- name of the reportregistry
- Registry- Throws:
org.wso2.carbon.reporting.api.ReportingException
- if failed to delete report template
-
getAllReports
public static List<String> getAllReports(org.wso2.carbon.registry.core.Registry registry) throws org.wso2.carbon.reporting.api.ReportingException
- Parameters:
registry
- Registry- Returns:
- report name list
- Throws:
org.wso2.carbon.reporting.api.ReportingException
- if failed to get report name list
-
getReportResources
public static String getReportResources(String componentName, String reportTemplate, org.wso2.carbon.registry.core.Registry registry) throws org.wso2.carbon.reporting.api.ReportingException, XMLStreamException
- Parameters:
componentName
- name of the report requesting componentreportTemplate
- name of the templateregistry
- Registry- Returns:
- report template as string
- Throws:
org.wso2.carbon.reporting.api.ReportingException
- if failed to get report templateXMLStreamException
-
getJRXMLFileContent
public static String getJRXMLFileContent(String componentName, String reportTemplate, org.wso2.carbon.registry.core.Registry registry) throws org.wso2.carbon.reporting.api.ReportingException
- Throws:
org.wso2.carbon.reporting.api.ReportingException
-
updateReport
public static boolean updateReport(String fileName, String fileContent, org.wso2.carbon.registry.core.Registry registry) throws org.wso2.carbon.reporting.api.ReportingException, net.sf.jasperreports.engine.JRException
- Parameters:
fileName
- name of the modifying report namefileContent
- modified contentregistry
- Registry- Returns:
- status of the update process
- Throws:
org.wso2.carbon.reporting.api.ReportingException
net.sf.jasperreports.engine.JRException
-
addJrxmlConfigs
public static void addJrxmlConfigs(org.wso2.carbon.registry.core.Registry systemRegistry) throws org.wso2.carbon.registry.core.exceptions.RegistryException
- Throws:
org.wso2.carbon.registry.core.exceptions.RegistryException
-
-