服务接口名称 | 描述 |
---|---|
smartbi.sdk.service.analysisreport.AnalysisReportService | 多维服务接口。 |
smartbi.sdk.service.catalog.CatalogService | 资源目录服务接口。 |
smartbi.sdk.service.managereport.ManageReportService | 指标类报表和复杂报表服务对象,包括取报表对象、汇总报表、校验报表等。 |
smartbi.sdk.service.operationLog.OperationLogService | 此类为smartbi操作日志的服务接口,提供对日志操作需要的方法。 |
smartbi.sdk.service.simplereport.SimpleReportService | 提供Report对象的工厂方法,实现报表的相关操作。 |
smartbi.sdk.service.systemconfig.SystemConfigService | 此类为系统设置的服务接口,获取系统设置选取项。 |
smartbi.sdk.service.user.UserManagerService | 此类为用户管理模块的服务接口,提供对用户进行管理时需要的方法,包括新建、修改、删除用户,新建、修改、删除组,新建、修改、删除角色, 给用户设置所属组、给角色添加用户等。 |
2.调用示例
SDK的调用必须先建立连接,建立连接后即可调用对应的接口操作资源目录树,报表,用户管理模块等,请参考以下调用示例代码。
代码块 | ||||
---|---|---|---|---|
| ||||
// 获取本地连接 LocalClientConnector conn = new LocalClientConnector(); conn.open("admin","manager"); //资源目录树 CatalogService catalogService = new CatalogService(conn); String elementId = "I8a8ae5d7016deda9eda993d3016df15e437011a3"; String elementType = "SIMPLE_REPORT"; boolean result = catalogService.isCatalogElementAccessible(elementId, elementType); System.out.println(result); //灵活报表 SimpleReportService simpleReportService = new SimpleReportService(conn); String reportId = "I8a8ae5d7016ca887a887d66c016cacad5e9118f0"; Report report = simpleReportService.openReport(reportId); System.out.println(report.getCurrentReportName()); //指标类报表 ManageReportService reportService = new ManageReportService(conn); //用户管理 UserManagerService userManagerService = new UserManagerService(conn); String departmentId = "DEPARTMENT"; IDepartment department = userManagerService.getDepartmentById(departmentId); System.out.println(department.getName()); |